[Karmic] libmp3lame fails in converting audio

Bug #401406 reported by Claudio Moretti on 2009-07-19
32
This bug affects 4 people
Affects Status Importance Assigned to Milestone
lame (Ubuntu)
Critical
Unassigned
Nominated for Lucid by David Hamm

Bug Description

Binary package hint: libmp3lame0

When extracting audio from FLV files using ffmpeg with libmp3lame, or when resampling audio (using libmp3lame), action fails because of a libmp3lame error.
I tried with a youtube-downloaded file (which is not illegal, because of file quality loss due to FLV conversion and audio resampling)
==========================================================
claudio@Mycroft:~/Scrivania$ apt-cache policy libmp3lame0
libmp3lame0:
  Installato: 3.98.2+debian-0ubuntu1
  Candidato: 3.98.2+debian-0ubuntu1
  Tabella versione:
 *** 3.98.2+debian-0ubuntu1 0
        500 http://archive.ubuntu.com karmic/multiverse Packages
        100 /var/lib/dpkg/status
==========================================================
claudio@Mycroft:~/Scrivania$ ffmpeg -i source.flv -acodec libmp3lame -ac 2 -ab 128K -vn -y destination.mp3
FFmpeg version 0.5-svn17737+3:0.svn20090303-1ubuntu6, Copyright (c) 2000-2009 Fabrice Bellard, et al.
  configuration: --enable-gpl --enable-postproc --enable-swscale --enable-x11grab --extra-version=svn17737+3:0.svn20090303-1ubuntu6 --prefix=/usr --enable-avfilter --enable-avfilter-lavf --enable-libgsm --enable-libschroedinger --enable-libspeex --enable-libtheora --enable-libvorbis --enable-pthreads --disable-stripping --disable-vhook --enable-libdc1394 --enable-shared --disable-static
  libavutil 49.15. 0 / 49.15. 0
  libavcodec 52.20. 0 / 52.20. 0
  libavformat 52.31. 0 / 52.31. 0
  libavdevice 52. 1. 0 / 52. 1. 0
  libavfilter 0. 4. 0 / 0. 4. 0
  libswscale 0. 7. 1 / 0. 7. 1
  libpostproc 51. 2. 0 / 51. 2. 0
  built on Apr 10 2009 23:20:33, gcc: 4.3.3

Seems stream 0 codec frame rate differs from container frame rate: 1000.00 (1000/1) -> 25.00 (25/1)
Input #0, flv, from 'source.flv':
  Duration: 00:03:52.52, start: 0.000000, bitrate: 326 kb/s
    Stream #0.0: Video: flv, yuv420p, 320x220, 262 kb/s, 25 tbr, 1k tbn, 1k tbc
    Stream #0.1: Audio: mp3, 22050 Hz, mono, s16, 64 kb/s
Output #0, mp3, to 'destination.mp3':
    Stream #0.0: Audio: libmp3lame, 22050 Hz, stereo, s16, 128 kb/s
Stream mapping:
  Stream #0.1 -> #0.0
Press [q] to stop encoding
[libmp3lame @ 0x21109d0]lame: output buffer too small (buffer index: 8359, free bytes: 1433)
Audio encoding failed
==========================================================
claudio@Mycroft:~/Scrivania$ ffmpeg -i source.mp3 -acodec libmp3lame -ab 64K -ar 44100 destination.mp3
FFmpeg version 0.5-svn17737+3:0.svn20090303-1ubuntu6, Copyright (c) 2000-2009 Fabrice Bellard, et al.
  configuration: --enable-gpl --enable-postproc --enable-swscale --enable-x11grab --extra-version=svn17737+3:0.svn20090303-1ubuntu6 --prefix=/usr --enable-avfilter --enable-avfilter-lavf --enable-libgsm --enable-libschroedinger --enable-libspeex --enable-libtheora --enable-libvorbis --enable-pthreads --disable-stripping --disable-vhook --enable-libdc1394 --enable-shared --disable-static
  libavutil 49.15. 0 / 49.15. 0
  libavcodec 52.20. 0 / 52.20. 0
  libavformat 52.31. 0 / 52.31. 0
  libavdevice 52. 1. 0 / 52. 1. 0
  libavfilter 0. 4. 0 / 0. 4. 0
  libswscale 0. 7. 1 / 0. 7. 1
  libpostproc 51. 2. 0 / 51. 2. 0
  built on Apr 10 2009 23:20:33, gcc: 4.3.3
Input #0, mp3, from 'source.mp3':
  Duration: 00:03:52.64, start: 0.000000, bitrate: 128 kb/s
    Stream #0.0: Audio: mp3, 22050 Hz, stereo, s16, 128 kb/s
Output #0, mp3, to 'destination.mp3':
    Stream #0.0: Audio: libmp3lame, 44100 Hz, stereo, s16, 64 kb/s
Stream mapping:
  Stream #0.0 -> #0.0
Press [q] to stop encoding
[libmp3lame @ 0xf0d7a0]lame: output buffer too small (buffer index: 9404, free bytes: 388)
Audio encoding failed

Related branches

Tuomas Aavikko (taavikko) wrote :

The encoding itself doesn't fail, there's just an error at the end.

Changed in lame (Ubuntu):
status: New → Confirmed
Patrick Geltinger (patlkli) wrote :

I can confirm this.
Obviously downgrading to lame 3.97 solves this problem as well as rebuilding lame and ffmpeg from source.
However, you will get a playable MP3 file at the end, but the error is really annoying.

Download full text (4.3 KiB)

I rebuilt lame and ffmpeg from newer source and this worked. However, I
did not get usable video files in my original try.

On Sat, 2009-10-10 at 17:59 +0000, Patrick Geltinger wrote:
> I can confirm this.
> Obviously downgrading to lame 3.97 solves this problem as well as rebuilding lame and ffmpeg from source.
> However, you will get a playable MP3 file at the end, but the error is really annoying.
>
> --
> [Karmic] libmp3lame fails in converting audio
> https://bugs.launchpad.net/bugs/401406
> You received this bug notification because you are a direct subscriber
> of a duplicate bug.
>
> Status in “lame” package in Ubuntu: Confirmed
>
> Bug description:
> Binary package hint: libmp3lame0
>
> When extracting audio from FLV files using ffmpeg with libmp3lame, or when resampling audio (using libmp3lame), action fails because of a libmp3lame error.
> I tried with a youtube-downloaded file (which is not illegal, because of file quality loss due to FLV conversion and audio resampling)
> ==========================================================
> claudio@Mycroft:~/Scrivania$ apt-cache policy libmp3lame0
> libmp3lame0:
> Installato: 3.98.2+debian-0ubuntu1
> Candidato: 3.98.2+debian-0ubuntu1
> Tabella versione:
> *** 3.98.2+debian-0ubuntu1 0
> 500 http://archive.ubuntu.com karmic/multiverse Packages
> 100 /var/lib/dpkg/status
> ==========================================================
> claudio@Mycroft:~/Scrivania$ ffmpeg -i source.flv -acodec libmp3lame -ac 2 -ab 128K -vn -y destination.mp3
> FFmpeg version 0.5-svn17737+3:0.svn20090303-1ubuntu6, Copyright (c) 2000-2009 Fabrice Bellard, et al.
> configuration: --enable-gpl --enable-postproc --enable-swscale --enable-x11grab --extra-version=svn17737+3:0.svn20090303-1ubuntu6 --prefix=/usr --enable-avfilter --enable-avfilter-lavf --enable-libgsm --enable-libschroedinger --enable-libspeex --enable-libtheora --enable-libvorbis --enable-pthreads --disable-stripping --disable-vhook --enable-libdc1394 --enable-shared --disable-static
> libavutil 49.15. 0 / 49.15. 0
> libavcodec 52.20. 0 / 52.20. 0
> libavformat 52.31. 0 / 52.31. 0
> libavdevice 52. 1. 0 / 52. 1. 0
> libavfilter 0. 4. 0 / 0. 4. 0
> libswscale 0. 7. 1 / 0. 7. 1
> libpostproc 51. 2. 0 / 51. 2. 0
> built on Apr 10 2009 23:20:33, gcc: 4.3.3
>
> Seems stream 0 codec frame rate differs from container frame rate: 1000.00 (1000/1) -> 25.00 (25/1)
> Input #0, flv, from 'source.flv':
> Duration: 00:03:52.52, start: 0.000000, bitrate: 326 kb/s
> Stream #0.0: Video: flv, yuv420p, 320x220, 262 kb/s, 25 tbr, 1k tbn, 1k tbc
> Stream #0.1: Audio: mp3, 22050 Hz, mono, s16, 64 kb/s
> Output #0, mp3, to 'destination.mp3':
> Stream #0.0: Audio: libmp3lame, 22050 Hz, stereo, s16, 128 kb/s
> Stream mapping:
> Stream #0.1 -> #0.0
> Press [q] to stop encoding
> [libmp3lame @ 0x21109d0]lame: output buffer too small (buffer index: 8359, free bytes: 1433)
> Audio encoding failed
> ==========================================================
> claudio@Mycroft:~/Scrivania$ ffmpeg -i source.mp3 -acodec libmp3lame -ab 64K -ar 44100 destination.mp3
> FFmpeg version 0.5-svn17737+3:0.svn2...

Read more...

MarcRandolph (mrand) wrote :

I am setting this to Critical because this appears to be a major regression in (3.98.2+debian-0ubuntu1) that is about to be shipped in 9.10 as compared to (3.98-0.0) that was shipped in 9.04 and 8.10. If someone feels that is not really criticial, please feel free to change it (or let me know and I'll change it).

Changed in lame (Ubuntu):
importance: Undecided → Critical
milestone: none → ubuntu-9.10
Reinhard Tartler (siretart) wrote :

Marillat ships this patch since Tue, 07 Jul 2009:

  * Apply patch from Martin Storsjö to fix the ffmpeg 'buffer too small' bug.

seems to be exactly this issue.

Reinhard Tartler (siretart) wrote :

test packages available at http://wiki.tauware.de/~siretart/upload-queue/

I don't have my gpg key at hand, if someone can confirm that these package fix the issue, I'll upload tomorrow to karmic.

Reinhard Tartler (siretart) wrote :

testpackages will shortly appear in the MOTUMedia PPA

please test them and give feedback if the PPA package is better. in contains some additional packages.

rhpot1991 (rhpot1991) wrote :

I can verify that the packages above fix this error in Karmic. FFmpeg now completes lamemp3 encodings properly.

Launchpad Janitor (janitor) wrote :

This bug was fixed in the package lame - 3.98.2+debian-0ubuntu2

---------------
lame (3.98.2+debian-0ubuntu2) karmic; urgency=low

  [ Fabian Greffrath ]
  * Prefer my d-u.o address for "official" packages.
  * Ported from debhelper (>= 7.2) to cdbs.
  * Remove redundant DEB_DH_INSTALL_SOURCEDIR.

  [ Reinhard Tartler ]
  * update debian/changelog

  [ Fabian Greffrath ]
  * Revert "update config.guess and config.sub with more recent
    versions"
  * debian/copyright: Vastly improved.
  * cosmetic cleanup
  * Bumped Standards-Version to 3.8.2.
  * Update debian/copyright.
  * Really update debian/changelog.

  [ Reinhard Tartler ]
  * patches taken from the marillat package:
    - fix the ffmpeg 'buffer too small' bug. LP: #401406
    - disable executable stack
    - buggy optimization for single-precision floats when
      -ffinite-math-only
  * reconvert to dh7

 -- Reinhard Tartler <email address hidden> Thu, 22 Oct 2009 22:35:30 +0200

Changed in lame (Ubuntu):
status: Confirmed → Fix Released
Qugar (yezumg) wrote :

When I use WinFF to have a flv file to avi (mp3 audio) WinFF reports "Unknown encoder 'libmp3lame'".
With the Firefox extension to give donwloadhelper download and convert a video from the Web, the video is being converted into flv format and its name appears in the conversion failure.
Use libmp3lame0 3.98.2 + debian-0ubuntu2

David Hamm (davidthamm) wrote :

lucid {libmp3lame0: Installed: 3.98.2+debian-0ubuntu3 winff: Installed: 1.2.0-1ubuntu1}
karmic {libmp3lame0: Installed: 3.98.2+debian-0ubuntu2 winff: Installed: 1.0.4-2ubuntu2}
Same error in both: Unknown encoder 'libmp3lame' , as well as 'libfaac' etc.
was using main ubuntu repo's to download files to convert mpg(video) to mp3(audio)

David Hamm (davidthamm) on 2010-03-02
Changed in lame (Ubuntu):
status: Fix Released → Incomplete
David Hamm (davidthamm) wrote :

I apologize for the ruckus, libavcodec-extra-52 solves this problem.

Changed in lame (Ubuntu):
status: Incomplete → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Duplicates of this bug

Other bug subscribers