PDA

View Full Version : Help with modifying convert.conf file



vrette
2011-03-13, 09:40
I'm running squeezeslave with moose on a Win 7 64-bit machine. Works great except for a problem with some of the radio stations that suffer from the "chipmunk" problem, they play too fast. For example, this is one stream I'm having trouble with:

http://opml.radiotime.com/Tune.ashx?id=s88225&formats=aac,ogg,mp3,wmpro,wma,wmvoice&partnerId=16&serial=a1d6e23d02cc8765a1539e53ef0c3afd

From searching around, it seems I need to modify the convert.conf file so these streams are properly transcoded before they get to squeezeslave.I took a look at the convert.conf file and found it a bit intimidating. Do I need to install lame? Could someone help me with the proper entry instead of messing up the file beyond repair?

SBS 192.168.1.207
Squeezeslave 192.168.1.209

Thanks

vrette
2011-03-15, 14:01
I'm guessing the lack of response means it really isn't a good idea to mess with the convert.conf file, or it is a lot simpler than it looks, and I haven't dug deep enough, Can anyone point me in the right direction? Just an example of a convert.conf that does this would be helpful. TIA

aubuti
2011-03-15, 15:17
I've never had the need to mess with the default convert.conf, but from casual forum browsing I have the impression that you should never edit convert.conf. Instead, if you want to change the defaults you should create a custom-convert.conf file with the appropriate entries, and put that file in the same folder as convert.conf. But I have no idea what those "appropriate entries" should be in your case.

Mnyb
2011-03-15, 15:24
Lame is needed if transcoding to or from mp3 is required.

However i've got no idea what a suitable custom-convert.conf should be.

vrette
2011-03-15, 15:32
I would be nice if the advanced settings page for file types in SBS was set up as matrix with the file types running down the left side (like it is now) but also a couple of drop down boxed across the top where you could pick out specific players on your network if you needed to do what I'm attempting to accomplish. Perhaps I should put that on the feature request / wish list? (that is if I am understanding its function correctly).

vrette
2011-03-15, 15:40
Lame is needed if transcoding to or from mp3 is required.

However i've got no idea what a suitable custom-convert.conf should be.

Thanks. Installing LAME is easy. I don't have that many MP3s,but now I'm wondering in general if it is better to transcode the MP3s on the server, or on the Touch. The server can certainly handle it. That even make sense?

aubuti
2011-03-15, 15:45
Thanks. Installing LAME is easy. I don't have that many MP3s,but now I'm wondering in general if it is better to transcode the MP3s on the server, or on the Touch. The server can certainly handle it. That even make sense?
Huh? The Touch doesn't transcode. But it will play MP3 natively.

Since you refer to the MP3s you have, what would you transcode them to? The more common situation is users in limited bandwidth environments having the server transcode from lossless to MP3 (see 'bitrate limiting', which is a per-player setting).

Mnyb
2011-03-15, 16:00
Touch ? Was it not squeezeslave that was the problem ? ( only 44.1kHz ) . But chipmunks ? That means finding something with lower samplingrate than 44.1 ( more common 48kHz material will sound slightly slower ). Are they such radio streams ?

However another spanner in the works could be syncing...

vrette
2011-03-15, 16:05
Huh? The Touch doesn't transcode. But it will play MP3 natively.

Since you refer to the MP3s you have, what would you transcode them to? The more common situation is users in limited bandwidth environments having the server transcode from lossless to MP3 (see 'bitrate limiting', which is a per-player setting).

I was thinking about it the wrong way and yes, it doesn't make sense. :)

But what I need to do is increase the sample rate of radio station streamed MP3s to a minimum of 44.1 kHz sample rate so they don't sound like the Chipmunks when played with Squeezeslave.

http://forums.slimdevices.com/showthread.php?t=83362&highlight=squeezeslave&page=13 (see top post)

tcutting
2011-03-15, 16:18
Yes, that's true. I modified a custom-convert.conf file. I'll try to remember to post when I get home from work. The result is all files sent to squeezeslave are transcoded to 44.1kHz.

aubuti
2011-03-15, 16:18
But what I need to do is increase the sample rate of radio station streamed MP3s to a minimum of 44.1 kHz sample rate so they don't sound like the Chipmunks when played with Squeezeslave.
Well, good luck with that, but before you spend a lot of hours figuring it out you may find that an easier solution is to use a hardware SB. Your present SBs are just crying out for a new brother or sister....

Phil Leigh
2011-03-15, 16:20
have you tried using squeezeplay instead of softsqueeze?

vrette
2011-03-15, 16:22
Yes, that's true. I modified a custom-convert.conf file. I'll try to remember to post when I get home from work. The result is all files sent to squeezeslave are transcoded to 44.1kHz.

Perfect! Please do. Thanks!

bpa
2011-03-15, 16:25
have you tried using squeezeplay instead of softsqueeze?

Softsqueeze can play 48kHz streams - only squeezeslave has this problem.

Phil Leigh
2011-03-15, 16:28
Well, good luck with that, but before you spend a lot of hours figuring it out you may find that an easier solution is to use a hardware SB. Your present SBs are just crying out for a new brother or sister....

It's easy enough to create a custom-convert.conf that forces everything MP3 to 44.1 via SOX...

vrette
2011-03-15, 16:29
I trried Squeezeplay, and it is nice, but I prefer using the Squeezeslave/Moose combo on my PC because it is very quick and light on resources and space. Not much gets written to the registry either. I don't mind a challenge.

Phil Leigh
2011-03-15, 17:10
I trried Squeezeplay, and it is nice, but I prefer using the Squeezeslave/Moose combo on my PC because it is very quick and light on resources and space. Not much gets written to the registry either. I don't mind a challenge.

why do you need both? - doesn't Moose on its own work?

aubuti
2011-03-15, 17:30
why do you need both? - doesn't Moose on its own work?
Does Moose have a player?

tcutting
2011-03-15, 17:42
Moose is a UI. It does however support running squeezeslave or Softsqueeze. What's nice is that you can have Moose run at startup in Windows, with an icon in the task tray, and it can fire off squeezeslave without any command window.

vrette
2011-03-15, 18:06
Moose is a UI. It does however support running squeezeslave or Softsqueeze. What's nice is that you can have Moose run at startup in Windows, with an icon in the task tray, and it can fire off squeezeslave without any command window.

What he said... :)

tcutting
2011-03-15, 21:15
Here are the lines I added to the custom-convert.conf (Don't know if this is the BEST way (Phil suggested sox), but it seems to work.):

# All squeezeslave players.
mp3 mp3 squeezeslave *
# IFB:{BITRATE=-B %B}D:{RESAMPLE=--resample %D}
[lame] --silent -q $QUALITY$ -v $BITRATE$ --resample 44100 --mp3input $FILE$ -
flc flc squeezeslave *
# FT:{START=--skip=%t}U:{END=--until=%v}D:{RESAMPLE=-r %d}
[flac] -dcs $START$ $END$ -- $FILE$ | [sox] -v0.95 -q -t wav - -t flac -C 0 -r 44100 -

vrette
2011-03-15, 21:47
Here are the lines I added to the custom-convert.conf (Don't know if this is the BEST way (Phil suggested sox), but it seems to work.):

# All squeezeslave players.
mp3 mp3 squeezeslave *
# IFB:{BITRATE=-B %B}D:{RESAMPLE=--resample %D}
[lame] --silent -q $QUALITY$ -v $BITRATE$ --resample 44100 --mp3input $FILE$ -
flc flc squeezeslave *
# FT:{START=--skip=%t}U:{END=--until=%v}D:{RESAMPLE=-r %d}
[flac] -dcs $START$ $END$ -- $FILE$ | [sox] -v0.95 -q -t wav - -t flac -C 0 -r 44100 -

I will give this a go in the morning. Thanks again

Phil Leigh
2011-03-15, 23:51
Here are the lines I added to the custom-convert.conf (Don't know if this is the BEST way (Phil suggested sox), but it seems to work.):

# All squeezeslave players.
mp3 mp3 squeezeslave *
# IFB:{BITRATE=-B %B}D:{RESAMPLE=--resample %D}
[lame] --silent -q $QUALITY$ -v $BITRATE$ --resample 44100 --mp3input $FILE$ -
flc flc squeezeslave *
# FT:{START=--skip=%t}U:{END=--until=%v}D:{RESAMPLE=-r %d}
[flac] -dcs $START$ $END$ -- $FILE$ | [sox] -v0.95 -q -t wav - -t flac -C 0 -r 44100 -

that will work fine

vrette
2011-03-16, 06:43
Note quite there... Here is what I have done.

Installed LAME in the proper directory. SBS indicates that it is properly installed.

I didn't have a custom-convert.conf, so I created one with notepad, and copied the code into that. I then placed the custom-convert.conf in the same folder as the convert.conf.

End result, One of the stations that was playing "fast" before now sounds normal. But several other stations that were playing fine before I installed the custom-convert.conf file now won't play with the custom-convert.conf installed.

Did I miss a step or something?

TIA

tcutting
2011-03-16, 09:39
You will probably want to look at task manager (or whatever equivalent for Windows 7) to try to see what's going on. One thing this change does is that ALL streams will now be transcoded. For example, I believe even a 44.1kHz MP3 will get sent through LAME and "transcoded" to 44.1kHz. I think LAME is "smart enough" to determine this is a trivial process, since when I looked at resources, this case runs LAME, but it doesn't use many resources when compared to a real transcode (from 48kHz to 44.1, for example).
Look for a LAME process or a sox process when running a stream.

Phil Leigh
2011-03-16, 09:48
Note quite there... Here is what I have done.

Installed LAME in the proper directory. SBS indicates that it is properly installed.

I didn't have a custom-convert.conf, so I created one with notepad, and copied the code into that. I then placed the custom-convert.conf in the same folder as the convert.conf.

End result, One of the stations that was playing "fast" before now sounds normal. But several other stations that were playing fine before I installed the custom-convert.conf file now won't play with the custom-convert.conf installed.

Did I miss a step or something?

TIA

When you created the custom-convert.conf file, did you start by copying the entire contents of convert.conf into it? (if not, start again and do that, then replace just the two sections above).

If you need further help you need to enable player.source logging in settings - advanced - logging... set player.source to DEBUG and look in server.log to see what is actually being used when you try to play one of the failing streams...

past the results back here (or attach the server.log file as a zip file...)

vrette
2011-03-16, 13:23
When you created the custom-convert.conf file, did you start by copying the entire contents of convert.conf into it? (if not, start again and do that, then replace just the two sections above).

If you need further help you need to enable player.source logging in settings - advanced - logging... set player.source to DEBUG and look in server.log to see what is actually being used when you try to play one of the failing streams...

past the results back here (or attach the server.log file as a zip file...)

Sure enough, I incorrectly created the custom-convert.conf. I will have to give it another shot later. Thanks for pointing out the error of my ways. :)

tcutting
2011-03-16, 15:18
I posted a txt version of my custom-convert.conf file. It does NOT have all the contents of the convert.conf in it.

Phil Leigh
2011-03-16, 15:34
I posted a txt version of my custom-convert.conf file. It does NOT have all the contents of the convert.conf in it.

I know it doesn't have to... but it helps debugging if all the commands are in one place (file)

JJZolx
2011-03-16, 15:39
I know it doesn't have to... but it helps debugging if all the commands are in one place (file)

How so?

I find it easier knowing which rules are standard by having only custom rules in custom-convert.conf. When editing or debugging it's easy enough to have both files open in an editor.

Phil Leigh
2011-03-16, 15:54
How so?

I find it easier knowing which rules are standard by having only custom rules in custom-convert.conf. When editing or debugging it's easy enough to have both files open in an editor.

Because (for example) if someone was to post or paste here they'd have to post/paste both files... to give us the full picture.

Also, things get particularly tricky to keep track of if you have custom entries by player class and/or MAC...

With all respect, I think you (and I!) are more of a "programmer" than many of the folks needing help with this stuff...

vrette
2011-03-17, 07:30
I still can't get it to work. I'm going to throw the towel in on this one and quite wasting people's time . :) While I really do appreciate the help, it really isn't big enough of a deal to where I want to dedicate more time to debugging, creating logs, etc. Thanks again.

wilbert-vb
2011-04-03, 12:47
Here are the lines I added to the custom-convert.conf (Don't know if this is the BEST way (Phil suggested sox), but it seems to work.):

# All squeezeslave players.
mp3 mp3 squeezeslave *
# IFB:{BITRATE=-B %B}D:{RESAMPLE=--resample %D}
[lame] --silent -q $QUALITY$ -v $BITRATE$ --resample 44100 --mp3input $FILE$ -
flc flc squeezeslave *
# FT:{START=--skip=%t}U:{END=--until=%v}D:{RESAMPLE=-r %d}
[flac] -dcs $START$ $END$ -- $FILE$ | [sox] -v0.95 -q -t wav - -t flac -C 0 -r 44100 -

I downloaded the txt file and it seems that the lines are wrapped different than in your post (which may explain the failure at the poster's system?)

I modified the custom-convert.conf file according to the text in the post, which means _"$FILE#_-"_NOT_on_a_new_line_ and I have my internet radio working fine.
Thank you very very much for your modification!

I searched for SoX and my impression is that this needs liblame for conversion, my point is that the result may be identical to using lame like suggested here.

wilbert-vb
2011-04-05, 14:12
The resampling is working very well, but I notice constant disk activity while listening to internet radio.
I assume that some temp file is generated and I wonder if there is a way to have this temp file stored in ram (/dev/shm, for example)

What do you think, how could this be accomplished?

Phil Leigh
2011-04-05, 15:29
The resampling is working very well, but I notice constant disk activity while listening to internet radio.
I assume that some temp file is generated and I wonder if there is a way to have this temp file stored in ram (/dev/shm, for example)

What do you think, how could this be accomplished?

what operating system?
transcoding as in the convert.conf mods above doesn't write to disk, it is an "in-memory" operation... so unless your system is paging (ie very low on free ram) there should be no disk activity...

wilbert-vb
2011-04-05, 17:18
what operating system?
transcoding as in the convert.conf mods above doesn't write to disk, it is an "in-memory" operation... so unless your system is paging (ie very low on free ram) there should be no disk activity...

I apologize for not mentioning the specs of my system before.
I'm running on OpenSUSE 11.4 (headless text console based server) with 2 GB RAM.
The 'free' command shows 740 MB used, 156 MB for buffers and 0 MB swap (4 GB available).
I notice the disk LED at the front of my system flashing constant.

This afternoon I tried to mount /var/lib/squeezeboxserver/cache/FileCache to tmpfs, but I got an error about write permissions.

Phil Leigh
2011-04-06, 14:09
do you have any verbose logging turned on in SBS? that's all I can Think of...

JJZolx
2011-04-06, 14:31
Does the OP still get 'chipmunks' with the URL in the first post? Plays fine for me on both the Touch and in SqueezePlay desktop.

wilbert-vb
2011-04-06, 15:58
do you have any verbose logging turned on in SBS? that's all I can Think of...
I haven't changed log settings, but I verified the logs.
I also did a tail -f server.log while tuning in an internet radio station. I get a few lines referring to DNS requests. Disk activity is far more than from writing a few log lines.
lsof shows that lame has a pipe open to squeezeboxserver.

It puzzles me. When listening to flac tracks, there is hardly any disk activity.