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

Alessandro Ghedini ghedo at debian.org
Sun Jan 19 16:10:19 UTC 2014


Package: libavcodec54
Version: 6:9.10-2
Severity: normal

Hi,

I recently noticed something weird, but I'm not sure if it's actually a libav
bug (it doesn't happen with ffmpeg though). I noticed this while using mpv's
encoding facility, but it happens when using avconv as well.

So, basically, when I encode an audio file using libav's libmp3lame encoder, and
set a default bitrate (-b:a 320k), and then run  the file command on it, the
printed bitrate is always "64 kbps" even if the file is, in fact, 320 kbps.

To reproduce:

* Generate an audio file (you can also use another audio file, it doesn't
  change anything):

    $ sox -n noise.wav synth 00:05 whitenoise

* Convert the file using avconv:

    $ avconv -i noise.wav -c:a libmp3lame -b:a 320k -vn noise_avconv.mp3

* Run file on it:

    $ file noise_avconv.mp3
    noise_avconv.mp3: Audio file with ID3 version 2.4.0, contains: MPEG ADTS, layer III, v1,  64 kbps, 48 kHz, Monaural

You'll notice that the "64 kbps" doesn't match the "-b:a 320k", but the *.mp3
file *is* 320 kbps (the size of the file match and mp3info reports the correct
bitrate).

The same doesn't happen when using ffmpeg:

    $ ffmpeg -i noise.wav -c:a libmp3lame -b:a 320k -vn noise_ffmpeg.mp3
    $ file noise_ffmpeg.mp3
    noise_ffmpeg.mp3: Audio file with ID3 version 2.4.0, contains: MPEG ADTS, layer III, v1, 320 kbps, 48 kHz, Monaural

Since mp3info reports the correct bitrate on both files (and the file are indeed
320 kbps), this may very well be a bug in file... but why doesn't the file
encoded using ffmpeg have this problem?

Also, yes, the libmp3lame is the same used to build both libav (installed from
Debian archive) and ffmpeg (manually built) and this happens with avconv and
libavcodec55 from experimental as well.

Cheers

-- System Information:
Debian Release: jessie/sid
  APT prefers unstable
  APT policy: (500, 'unstable'), (1, 'experimental')
Architecture: amd64 (x86_64)
Foreign Architectures: i386

Kernel: Linux 3.12-1-amd64 (SMP w/4 CPU cores)
Locale: LANG=it_IT.UTF-8, LC_CTYPE=it_IT.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash

Versions of packages libavcodec54 depends on:
ii  libavutil52            6:9.10-2
ii  libc6                  2.17-97
ii  libgsm1                1.0.13-4
ii  libmp3lame0            3.99.5+repack1-3
ii  libopenjpeg2           1.3+dfsg-4.7+b1
ii  libopus0               1.1-1
ii  libschroedinger-1.0-0  1.0.11-2
ii  libspeex1              1.2~rc1.1-1
ii  libtheora0             1.1.1+dfsg.1-3.1
ii  libva1                 1.2.1-2
ii  libvorbis0a            1.3.2-1.3
ii  libvorbisenc2          1.3.2-1.3
ii  libvpx1                1.3.0-2
ii  libx264-133            2:0.133.2339+git585324f-2+b1
ii  libxvidcore4           2:1.3.2-9
ii  multiarch-support      2.17-97
ii  zlib1g                 1:1.2.8.dfsg-1

libavcodec54 recommends no packages.

libavcodec54 suggests no packages.

-- no debconf information



More information about the pkg-multimedia-maintainers mailing list