Bug#736088: libavcodec54: file command reports wrong bitrate on mp3 file encoded by libav

Alessandro Ghedini ghedo at debian.org
Sat Mar 8 15:27:04 UTC 2014


On sab, mar 08, 2014 at 09:25:35 -0500, Reinhard Tartler wrote:
> tags 736088 +upstream
> stop
> 
> On Fri, Mar 07, 2014 at 12:04:25PM +0100, Alessandro Ghedini wrote:
> > So, I've done a bit of investigation, and it turns out that this is caused by
> > the way libavformat writes the XING header to mp3 files. Essentially, it uses
> > a fixed value for bitrate_idx... for any bitrate values.
> > 
> > This also makes tools like mediainfo detect an avconv-encoded mp3 file as
> > using constant bitrate, while in fact it might be using a variable bitrate
> > (though I'm not sure if this is actually the same bug, or a different bug in the
> > same code).
> > 
> > More or less copy-pasting the mp3_write_xing() function (libavformat/mp3enc.c)
> > from ffmpeg to libav seems to fix the problem.
> 
> Could you please provide a patch, and send (or copy) it to libav-devel at libav.org, please?

TBQH I don't really care much about this being fixed... now that I know what's
the problem I'm simply using "write_xing=0" since I'm only interested in
constant bitrate.

Also, I found that my "copy what ffmpeg does" patch introduces another bug that
makes mediainfo print some garbage (just after the LAME version), so it would
require someone who actually knows what the code is supposed to do to debug
this.

I'll try to look into this as soon as I have a bit of time, but I can't really
promise anything.

Cheers

-- 
perl -E '$_=q;$/= @{[@_]};and s;\S+;<inidehG ordnasselA>;eg;say~~reverse'
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: Digital signature
URL: <http://lists.alioth.debian.org/pipermail/pkg-multimedia-maintainers/attachments/20140308/2fc0b315/attachment.sig>


More information about the pkg-multimedia-maintainers mailing list