LAME vbr mp3 export wasting space

This section is now closed.
Forum rules
Audacity 1.3.x is now obsolete. Please use the current Audacity 2.1.x version.

Mac 0S X 10.3 and earlier are no longer supported but you can download legacy versions of Audacity for those systems HERE.
steve
Site Admin
Posts: 80677
Joined: Sat Dec 01, 2007 11:43 am
Operating System: Linux *buntu

Re: LAME vbr mp3 export wasting space

Post by steve » Wed Mar 16, 2011 11:33 pm

Gale Andrews wrote: I understand -b sets a minimum, but I read you to say that -b 32 explicitly makes the file size smaller.
The "-b 32" argument is not necessary to remove the padding.
I only put in the -b 32 so that we were not packing it tighter than a standard "Lame preset Medium" should pack it, but I think your right, it's exactly the same with or without the -b 32.

The more important issue is that using the normal Audacity MP3 export produces MP3 files that are significantly bigger than using Lame as an external encoder.
I'm not seeing quite such a big difference as 10%, more like about 6%.
9/10 questions are answered in the FREQUENTLY ASKED QUESTIONS (FAQ)

Gale Andrews
Quality Assurance
Posts: 41761
Joined: Fri Jul 27, 2007 12:02 am
Operating System: Windows 10

Re: LAME vbr mp3 export wasting space

Post by Gale Andrews » Wed Mar 16, 2011 11:40 pm

Sorry for any confusion, but I edited Vinylivo's last post instead of replying to it. Fixed it now, but Steve was actually replying to me rather than to Vinylivo, so I also edited Steve's post to suit. :?




Gale
________________________________________FOR INSTANT HELP: (Click on Link below)
* * * * * Tips * * * * * Tutorials * * * * * Quick Start Guide * * * * * Audacity Manual

vinylivo
Posts: 32
Joined: Wed Mar 02, 2011 3:41 am
Operating System: Please select

Re: LAME vbr mp3 export wasting space

Post by vinylivo » Thu Mar 17, 2011 12:27 am

Gale Andrews wrote:1. If you export from Audacity as WAV and convert to AIFF in iTunes, then use iTunes-LAME, did/does that still have the problem?
2. If you used the Audacity AIFF and converted that to MP3 with the native iTunes encoder (not LAME), did/does that still have the problem?
1) if I use WAV export and convert to mp3 with iTunes-LAME the problem doesn't exist. just plays nice and clean.
2) when used AIFF export and then the native iTunes mp3 encoder (192kbps) everything is fine as well.
I now remember why I wanted to use AIFF instead of WAV, it's because that bloody itunes can't read artist and album info from the WAV files. I don't wanna type in all this info several times. but with aiff all infos remain when exported from audacity.
Anyway, I don't care too much anymore. Now I just use audacity projects to manage everything until final export. with the multiple export option and the new metadata editor there's no need for iTunes-LAME anymore. I just use the iTunes to rip CDs and ther it works fine with iTunes-LAME.

the only pity with the audacity lame export is the wasted space with VBR encoding which I use exclusively. I prefer to set quality instead of bitrate. btw all modern audio formats like mp4 (aac) or ogg are vbr by nature. Now I run all the files thru mp3packer and end up with good results. this is just an unnecessary step imho if the lame export would work correct.

vinylivo
Posts: 32
Joined: Wed Mar 02, 2011 3:41 am
Operating System: Please select

Re: LAME vbr mp3 export wasting space

Post by vinylivo » Thu Mar 17, 2011 12:36 am

steve wrote:The more important issue is that using the normal Audacity MP3 export produces MP3 files that are significantly bigger than using Lame as an external encoder.
I'm not seeing quite such a big difference as 10%, more like about 6%.
probably depends on the source material.
I do a lot of live jazz recordings (from the mixer console) or DJ-set recordings. The last recording I converted today with -preset-medium saved 12% with mp3packer! with -preset-standard the difference was below 8%. I'll make more notes on future exports.

Gale Andrews
Quality Assurance
Posts: 41761
Joined: Fri Jul 27, 2007 12:02 am
Operating System: Windows 10

Re: LAME vbr mp3 export wasting space

Post by Gale Andrews » Thu Mar 17, 2011 11:01 pm

vinylivo wrote:itunes can't read artist and album info from the WAV files.
Standard WAV files only have poor metadata support. Album Title is not valid in RIFF tags. See:
http://wiki.audacityteam.org/wiki/WAV#Metadata
vinylivo wrote:the only pity with the audacity lame export is the wasted space with VBR encoding which I use exclusively
Easily solved though if you choose (external program) when you export, then use LAME at the command-line:
http://manual.audacityteam.org/man/Expo ... al_Program



Gale
________________________________________FOR INSTANT HELP: (Click on Link below)
* * * * * Tips * * * * * Tutorials * * * * * Quick Start Guide * * * * * Audacity Manual

steve
Site Admin
Posts: 80677
Joined: Sat Dec 01, 2007 11:43 am
Operating System: Linux *buntu

Re: LAME vbr mp3 export wasting space

Post by steve » Fri Mar 18, 2011 2:44 am

Gale Andrews wrote: Easily solved though if you choose (external program) when you export, then use LAME at the command-line:
That is a good workaround (and Audacity remembers to settings), but it would be better if it were not necessary to use a workaround. Does anyone know why the problem is occurring?
9/10 questions are answered in the FREQUENTLY ASKED QUESTIONS (FAQ)

Leland
Developer
Posts: 174
Joined: Thu Jul 26, 2007 8:55 pm
Operating System: Please select

Re: LAME vbr mp3 export wasting space

Post by Leland » Fri Mar 18, 2011 7:34 am

Okay folks. Just started looking into this and wanted to give y'all an idea of what I'm seeing.

When encoding, there are many parameters that you can set to control the export. Audacity only sets a few relative to the lame command line ute and you'll find a comparison of the final settings. Those marked with an asterisk at the end are the only ones that Audacity specifically sets. All the rest are allowed to default.

The lame command line used to get these values was:

lame -m joint --preset medium ~/1.wav 1.mp3

The Audacity settings were:

Bit Rate Mode: Preset
Quality: Medium, 145-185 kbps
Variable Speed: Standard
Channel Mode: Joint Stereo

Code: Select all

Lame_enc configuration options:
==========================================================
                        Lame            Audacity
version                =0               1
Layer                  =3               3
mode                   =Mono            Mono            *
Input sample rate      =44.1 kHz        44.1 kHz        *
Output sample rate     =44.1 kHz        44.1 kHz        *
bitrate                =0 kbps          0 kbps
Quality Setting        =-1              3
Low pass frequency     =17500           17500
Low pass width         =-1              -1
High pass frequency    =0               0
High pass width        =-1              -1
No short blocks        =-1              0
Force short blocks     =-1              0
de-emphasis            =0               0
private flag           =0               0
copyright flag         =0               0
original flag          =1               1
CRC                    =off             off             *
Fast mode              =enabled         enabled
Force mid/side stereo  =disabled        disabled
Padding Type           =2               2               *
Disable Reservoir      =0               1               *
Allow diff-short       =0               1
Interchannel masking   =-1.000000       0.000000
Strict ISO Encoding    =No              No
Scale                  =-1.00           1.00
VBR                    =enabled,        enabled,        *
                        VBR_q =4,       VBR_q =4,       *
                        method =vbr_rh  method =vbr_rh  *
Vbr Min bitrate        =0 kbps          32 kbps
Vbr Max bitrate        =0 kbps          320 kbps
Write VBR Header       =Yes             Yes             *
VBR Hard min           =0               0
ATH Only               =0               0
ATH short              =0               0
ATH no                 =0               0
ATH type               =-1              4
ATH lower              =-0.000000       1.100000
ATH aa                 =-1              -1
ATH aa  loudapprox     =2               2
ATH aa  sensitivity    =0.000000        -8.000000
Experimental nspsytune =0               3
Experimental X         =-1              9
Experimental Y         =0               1
Experimental Z         =0               0
Now, we can attempt to make our parameters closer to what Lame sets. I'm not sure we'd be able to achieve exactness though without pretty much copying the lame command line frontend. We should be able to get closer though.

Leland

vinylivo
Posts: 32
Joined: Wed Mar 02, 2011 3:41 am
Operating System: Please select

Re: LAME vbr mp3 export wasting space

Post by vinylivo » Fri Mar 18, 2011 9:25 am

Hello Leland,

aren't the presets meant to be used without any other option, I mean aren't they optimized for best performance at the chosen quality setting?
and I guess the 'mode = mono' is a typoo, because stereo does work.

by looking at the VBR mp3 files in a hex editor it's clear that the ones encoded via audacity do a lot of frame padding and therefore wasting space. the intersting thing is that if you compress one of those mp3 files with zip (I normally do this to make archives of whole albums in one zip file) the space saving is about the same as running them thru mp3packer.

steve
Site Admin
Posts: 80677
Joined: Sat Dec 01, 2007 11:43 am
Operating System: Linux *buntu

Re: LAME vbr mp3 export wasting space

Post by steve » Fri Mar 18, 2011 2:11 pm

Leland wrote:Now, we can attempt to make our parameters closer to what Lame sets. I'm not sure we'd be able to achieve exactness though without pretty much copying the lame command line frontend. We should be able to get closer though.
As the Lame command line front end appears to be better optimised, wouldn't it be simpler to just use the command line front end by default (rather than copying it)? Wouldn't that also have the added advantage that if the defaults in the Lame command line front end is optimised further, then Audacity would benefit from those optimisations without the need for changes in Audacity?
9/10 questions are answered in the FREQUENTLY ASKED QUESTIONS (FAQ)

Gale Andrews
Quality Assurance
Posts: 41761
Joined: Fri Jul 27, 2007 12:02 am
Operating System: Windows 10

Re: LAME vbr mp3 export wasting space

Post by Gale Andrews » Sat Mar 19, 2011 8:33 pm

vinylivo wrote:aren't the presets meant to be used without any other option, I mean aren't they optimized for best performance at the chosen quality setting?
I would have said arguments that don't conflict are valid.
steve wrote:As the Lame command line front end appears to be better optimised, wouldn't it be simpler to just use the command line front end by default?
Unfortunately the Audacity CLI (on tests on Windows 7 x64) is up to five time slower than using lame_enc.dll (little difference on Ubuntu and Mac).

I also tried Audacity-encoding MP3s with presets using the libmp3lame-0.dll from FFmpeg, but there is still lots of padding and mp3packer trims the files by around 9%.



Gale
________________________________________FOR INSTANT HELP: (Click on Link below)
* * * * * Tips * * * * * Tutorials * * * * * Quick Start Guide * * * * * Audacity Manual

Locked