variable bitrate

  • desp

    desp - 2009-06-02


    I clicked on the checkbox "Variable bitrate". The produced mp3-files seem to be in constant bitrate anyway...

    Does anybody here know that problem or the solution?


    • Dave Kaye

      Dave Kaye - 2009-06-12

      There are actually two issues here.

      First, you are using Amarok to display the encoded bitrate.  Amarok, like many players, will display the bitrate for constant bitrate sampling and the average bitrate (which is embedded in the mp3 file by LAME) for variable bitrate sampling - but there is no indicator that there is a variable bitrate being used.  If you open the mp3 file in EasyTAG, an id3 tag editor, you will be able to see the difference.  EasyTAG indicates a variable bitrate file by a tilde (~) before the number, i.e., a constant bitrate of 128 and a variable bitrate of ~185.  You can see the actual bitrates for the songs as they play using VLC (versions 0.8-0.9).  Just look in View -> Stream and Media Info -> Statistics for the input bitrate.

      Second, you seem to be producing a constant bitrate.  I am using the image attached to your question to set the conditions for ripperX.  This version of ripperX issues both the information from the constant bitrate and variable bitrate configurations to the encoder.  For your setup, this command line is:

      lame -b 320 --nohist -v -h  -V 0

      You are requesting the variable bitrate by the -v setting.  You are requesting a high quality variable encoding by the -V0 setting (VBR quality slider control).  This setting  influences parameters of LAME's psycho acoustic model.  You are requesting high quality mode by the -h setting (high quality checkbox).  This affects the algorithms used to determine the best scalefactors and huffman encoding (noise shaping).  You are also requesting a minimum bitrate of 320 by the -b setting.

      You are getting a variable bitrate file which cannot be slower than 320 bits per second.  I assume that within the songs there are sections that may be encoded at a faster bitrate for a short period of time.  Overall, your speed will be a near constant 320 bits per second.

      I duplicated your settings for several songs, and all of them came back with a 320 bits per second encoding speed.  Then I dropped the constant bitrate setting to 128, thus reducing the minimum encoding rate, and obtained true variable bitrate encodings of approximately 189 bits per second.

      Your minimum bitrate setting (via the constant bitrate setting) is so high that LAME is encoding at that high rate and produces a near constant bitrate encoding.  Lower the minimum setting and you should have true variable encoding.

      I hope this helps you.

      p.s.  In your home directory is a hidden file .ripperXrc with an entry Encoder::fullCommand.  If you look at this entry you can see all the settings being passed to the encoder.  You can then look at the encoder's documentation to see the effects of your settings.  This works for any encoder selected, not just LAME.


Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:

JavaScript is required for this form.

No, thanks