PDA

View Full Version : MP3 Transcode Settings



DJBenson
2005-06-16, 09:03
Could somebody please point me in the right direction of the file that contains the settings for the MP3 transcode feature (Bitrate Limiting)?

I want to be able to add a very low bitrate (24kbps/22050) option to the list for streaming to a Windows Smartphone.

I've looked through several of the "most obvious" files but can see no reference to the transcode settings.

jth
2005-06-16, 09:42
I think you'll want to modify Web/Setup.pm

kdf
2005-06-16, 10:20
or force the change in the prefs file.
change maxBitrate for the given player to whatever valid mp3 bitrate that you
want.

DJBenson
2005-06-16, 12:27
Neither methods appeared to work :(

I've changed the bitrate list so it now reads:



'maxBitrate' => {
'validate' => \&validateInList
,'validateArgs' => [0, 24, 64, 96, 128, 160, 192, 256, 320]
,'optionSort' => 'V'
,'currentValue' => sub { return Slim::Utils::Prefs::maxRate(shift, 1); }
,'options' => {
'0' => ' '.string('NO_LIMIT')
,'24' => ' 24 '.string('KBPS')
,'64' => ' 64 '.string('KBPS')
,'96' => ' 96 '.string('KBPS')
,'128' => '128 '.string('KBPS')
,'160' => '160 '.string('KBPS')
,'192' => '192 '.string('KBPS')
,'256' => '256 '.string('KBPS')
,'320' => '320 '.string('KBPS')
} }


(notice the added line for 24kbps). The drop down list does not contain the 24kbps option.

I also changed the maxbitrate value for the IP address of the player with no joy.

Edit : Just out of curiosity, I changed the "64" value to "32" in the Setup.pm file, reloaded the server, and "64" is still listed instead of "32". Are the bitrates read from another file other than "Setup.pm"

Robert Moser
2005-06-16, 13:25
DJBenson wrote:
> Neither methods appeared to work :(
>
> I've changed the bitrate list so it now reads:
> -snip-
> (notice the added line for 24kbps). The drop down list does not contain
> the 24kbps option.
>
> I also changed the maxbitrate value for the IP address of the player
> with no joy.
>
>

Did you restart the server after making the change to setup.pm (I'm also
assuming that you are using the perl script version rather than
slim.exe)? For the pref hack, did you do that with the server down?

DJBenson
2005-06-16, 13:47
DJBenson wrote:
> Neither methods appeared to work :(
>
> I've changed the bitrate list so it now reads:
> -snip-
> (notice the added line for 24kbps). The drop down list does not contain
> the 24kbps option.
>
> I also changed the maxbitrate value for the IP address of the player
> with no joy.
>
>

Did you restart the server after making the change to setup.pm (I'm also
assuming that you are using the perl script version rather than
slim.exe)? For the pref hack, did you do that with the server down?

I'm using the Windows binary version (sorry for not stating in original post).

I closed the server down and manually closed slim.exe using task manager (because it was still running even when I closed the server program). The changes have not worked.

Can the Win32 version not be "hacked" like the perl script version can?

kdf
2005-06-16, 14:27
Quoting DJBenson <DJBenson.1qqllb (AT) no-mx (DOT) forums.slimdevices.com>:


> I'm using the Windows binary version (sorry for not stating in original
> post).
>
> I closed the server down and manually closed slim.exe using task
> manager (because it was still running even when I closed the server
> program). The changes have not worked.
>
> Can the Win32 version not be "hacked" like the perl script version can?

it cannot, since it is compiled with all the modules ahead of time. You would
need to download ActivePerl and run slimserver.pl to get a live change.

The change in the pref file should have worked. Maybe there is some last minute
validation that I'm not remembering. It may be that 24 kbps isn't allowed with
44100Hz sampling, which is what slimserver needs to send to squeezebox.

running from command line, I'm seeing some messages along this line generated
from LAME. Unfortunately, lame seems to be slow to spit them out so they are
getting interlaced with slimserver debug messages. I've tried to clean it up
so you can see what I am talking about:

2005-06-16 14:23:38.5021 openSong: this is an mp3 file:
file:///D:/mp3/LINKIN%20PARK/Meteora/LINKIN%20PARK%20-%20(03)%20Somewhere%20I%20Belong.mp3
2005-06-16 14:23:38.5025 file type: mp3 format: mp3 inrate: 232 maxRate: 24
2005-06-16 14:23:38.5032 command: [lame] --resample 44100 --silent -q
$QUALITY$ -b $BITRATE$ $FILE$ -
2005-06-16 14:23:38.5060 Using command for conversion:
"D:\slim\server\Bin\lame.exe" --resample 44100 --silent -q 9 -b 24
"D:\mp3\LINKIN PARK\Meteora\LINKIN PARK - (03) Somewhere I Belong.mp
3" - |
2005-06-16 14:23:38.5095 Streaming with format: mp3

MPEG-1 layer III sample frequencies (kHz): 32 48 44.1
bitrates (kbps): 32 40 48 56 64 80 96 112 128 160 192 224 256 320

MPEG-2 layer III sample frequencies (kHz): 16 24 22.05
bitrates (kbps): 8 16 24 32 40 48 56 64 80 96 112 128 144 160