2

First I tested Jahzzar_-02-_FM.mp3:

ffprobe Jahzzar_-_02_-_FM.mp3

and I found out that it was encoded with 224 kbps:

Duration: 00:02:15.11, start: 0.025056, bitrate: 224 kb/s 

I encoded Jahzzar_-02-_FM.mp3 with 128 kbps:

ffmpeg -i Jahzzar_-_02_-_FM.mp3 -b:a 128k output128.aac

and then I tested again:

ffprobe output128.aac

I get the following statement:

Duration: 00:02:36.34, bitrate: 113 kb/s
Stream #0:0: Audio: aac (LC), 44100 Hz, stereo, fltp, 113 kb/s
  • Why is the duration changed?
  • What is the difference between the first bitrate (from Duration: ) and the second one (from Stream: )? For some tracks they are different, here for instance:

    Duration: 00:02:15.11, start: 0.025056, bitrate: 138 kb/s
    Stream #0:0: Audio: mp3, 44100 Hz, stereo, fltp, 128 kb/s
    
  • Why is it encoded with 113 kbps (I used b:a 128k)?

1 Answer 1

4
  1. Why is the duration changed?

    MP3s may not display accurate duration, depending on whether a Xing header was written, and whether the MP3 encoding is Variable Bit Rate (VBR) or a Constant Bit Rate (CBR).

  2. What is the difference between the first bitrate (from Duration: ) and the second one (from Stream: )?

    The first one is the division of the total file size (including metadata) by the probed media duration. The second is the division of the media data size by the probed media duration.

  3. Why is it encoded with 113 kbps (I used b:a 128k)?

    The native AAC encoder does not have a CBR mode. It will treat the target bitrate as an average target. This is fine and more efficient than forcing a CBR mode encode.

If you insist on CBR, then get or compile an ffmpeg build with the fdk-aac encoder, which does do CBR encoding.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.