Page 1 of 1

Bug - can't export to MP3-128

Posted: Wed Oct 12, 2011 12:57 am
by planetmike
Using OS X 10.5.8, iMac 2.66Ghz Intel Core Duo, 4GB Ram, Audacity 1.3.13, newest lame possible, whenever I try to export a podcast episode as MP3 (constant 128 kbps, Stereo) the file is actually output as 64 kbps. Project rate is 44100Hz. If I copy the project files over to my ancient Powerbook G4, the file exports just fine to 128 kbps, with the same settings. Is there a setting somewhere that I'm missing, or is this really a bug of some sort?

Re: Bug - can't export to MP3-128

Posted: Wed Oct 12, 2011 3:03 am
by bgravato
I can't reproduce that on my MacBookPro OS-X 10.6.8 running Audacity 1.3.13.

If I export a show as mp3, constant bitrate, 128kbps, that's what I get in the exported mp3.

Can you give the exact steps you're taking for it to happen?

How are you checking the exported mp3 bitrate? Are you sure it's 64kbps?

By "newest lame possible" do you mean the lame version available for download from audacity's download page?

You should use the lame version provided at the audacity oficial website. Other version might not work properly...

Re: Bug - can't export to MP3-128

Posted: Wed Oct 12, 2011 4:00 am
by planetmike
Hi, Thanks for taking the time to try to help me.

iMac 2.66Ghz Intel Core 2 Duo.
OS X 10.5.8
Audacity 1.3.13
Lame is "libmp3lame.dylib" 3.98.2, downloaded from the link given on the audacity site. It isn't on the Audacity site, it's over at http://lame1.buanzo.com.ar/

I just typed out all the steps I'm taking, and figured it out. If the Project Rate (Hz) isn't at the same sample rate of the track, then the output is not what is expected. But when the sample rate and project rate are the same, then the export works fine. So I guess it was a pebkac error, sorry for bugging everyone. Mike

Re: Bug - can't export to MP3-128

Posted: Wed Oct 12, 2011 9:53 am
by bgravato
Glad you sorted it out, thank you for the feedback.

The link for lame is right. The domains may mismatch but buanzo is also the one who host this forum and some of the files. You got it right.

Re: Bug - can't export to MP3-128

Posted: Thu Oct 13, 2011 12:42 am
by Gale Andrews
planetmike wrote: If the Project Rate (Hz) isn't at the same sample rate of the track, then the output is not what is expected. But when the sample rate and project rate are the same, then the export works fine.
Not quite, the answer is complex. Were you using a very low project rate? The operative factor is that if the project rate is low, you may well get the bit rate adjusted downwards irrespective of whether the sample rate of the track is the same as the project rate.

For example, if the bit rate is set in Options at 128 kbps, you need a project rate of 16000 Hz or more to get 128 kbps, otherwise at 12000 Hz or below the MP3 will produce 64 kbps instead.

If for example you want to produce a 8000 Hz 128 kbps MP3, you have to use LAME at the command line by choosing "(external program)" when you export, then click "Options" and enter:

Code: Select all

<path to LAME in quotes> lame -b 128 - "%f"


On Mac. I'm guessing you would use the front end (non-dylib file) from http://www.rarewares.org/files/mp3/lame_3.98.2.dmg to point "(external program)" to.

If you omit the "-b 128" above which specifies 128 kbps, LAME at the command line (on Windows) gives you only 24 kbps (constant bit rate). This is probably because LAME tends to regard higher bit rate/ low sample rate (and lower bit rate / high sample rate) combinations as being problematic for quality.

Without a lot of digging, I''m not sure why Audacity only gives you 64 kbps at 8000 to 12000 Hz when you ask for 128 kbps, but it may be due to how Audacity is set up to control the dynamic LAME library used for "MP3 Files" export. Or it may be due to confusion in the MPEG 2.5 specification for very low 8000 to 12000 Hz sample rates - 2.5 is only an unofficial extension of the MP3 standard. On http://lame.cvs.sourceforge.net/viewvc/lame/lame/USAGE, it quotes MPEG-2.5 as

Code: Select all

For MPEG-2.5 (sampling frequencies of 8, 11.025 and 12 kHz)
bit rate = 8, 16, 24, 32, 40, 48, 56, 64
which shows that 64 kbps is the maximum permitted bit rate with those low sample rates, which might explain what Audacity does when exporting using "MP3 files". However, other definitions including the one that Lame.exe 3.98.3 at the command line gives show:

Code: Select all

MPEG-2.5 layer III sample frequencies (kHz):   8  12  11.025
bitrates (kbps):  8 16 24 32 40 48 56 64 80 96 112 128 144 160
thus providing support for higher bit rates at low sample rates.

I would certainly listen to what 8000 Hz files sound like at 128 kbps to see if 64 kbps might not sound better.


Gale

Re: Bug - can't export to MP3-128

Posted: Thu Oct 13, 2011 5:23 pm
by kozikowski
That's not the stand-alone Mac lame. That file blows out to another dylib.

Re: Bug - can't export to MP3-128

Posted: Thu Oct 13, 2011 11:08 pm
by Gale Andrews
kozikowski wrote:That's not the stand-alone Mac lame. That file blows out to another dylib.
That DMG defeated my Windows dmg extractor so I had to rely on the description which said "A universal binary (lybrary + frontend) which will run on both PowerPC and Intel powered Mac's". This one would probably work http://www.rarewares.org/files/mp3/lame ... SX_64b.zip which has a "Lame" file but it's only for "OSX 64 bits (Snow Leopard)". Perhaps we should prevail on Leland to provide a command-line Lame binary with the Mac Lame installer?

There is a command-line FFmpeg binary with the Mac FFmpeg zip ( http://www.audacity.homerow.net/cgi-bin ... on_OSX.zip ) so you could use that to export MP3s at forced bit rate. Does the FFmpeg installer ( http://www.audacity.homerow.net/cgi-bin ... on_OSX.dmg ) also have the command -line binary?


Gale