[Ffmpeg-devel] MP3 VBR bitrate and duration

Ronen Mizrahi ronen
Sun Sep 3 01:31:26 CEST 2006


The xing or vbri headers when present contain the number of frames, this 
is how other tools I believe are dealing with this issue. This should 
allow calculation of duration, based on which it should also be possible 
to calculate the average bitrate and use this value instead of the one 
derived from the bitrate index.

M?ns Rullg?rd wrote:
> Ronen Mizrahi <ronen at tversity.com> writes:
>
>   
>> Hi,
>>
>> When invoking ffmpeg -i on an mp3 VBR file, the duration and bitrate
>> reported on the command line are incorrect.
>> Looking at mpegaudiodec.c there doesn't seem to be code there to
>> handle VBR files when reading the header. Is this correct or is ffmpeg
>> supposed to be handling this kind of files correctly and there is a
>> bug?
>>     
>
> The duration of a vbr mp3 can only be determined by parsing the file
> and counting all the frames.
>
>   





More information about the ffmpeg-devel mailing list