[Ffmpeg-devel] ffmpeg & lame low bitrate causes failed assertion

Asli Binal asli
Wed Feb 21 17:06:47 CET 2007


Hi folks,
I've been trying to track this issue down for 2 weeks now (mailing
lists/archives/google groups/etc), and I'm willing to take the risk of
getting flamed in order to get some useful feedback.  The basic issue is
that ffmpeg asserts out on a file that contains uncompressed 16-bit (big
endian) PCM, 44.1KHz audio file *when* I set the audio bitrate flag to 32.

ffmpeg -i input.wav -vn -ab 32 output.mp3
...after 2 minutes 32 seconds...
  libavutil version: 49.3.0
  libavcodec version: 51.34.0
  libavformat version: 51.10.0
  built on Feb 20 2007 15:28:37, gcc: 4.0.1 (Apple Computer, Inc. build
5367)
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from
'/Users/Asli/Desktop/current-tests/input.wav':
  Duration: 00:25:35.0, start: 0.000000, bitrate: 1411 kb/s
  Stream #0.0(eng): Audio: pcm_s16be, 44100 Hz, stereo, 1411 kb/s
File 'output.mp3' already exists. Overwrite ? [y/N] y
Output #0, mp3, to 'output.mp3':
  Stream #0.0: Audio: mp3, 44100 Hz, stereo, 32 kb/s
Stream mapping:
  Stream #0.0 -> #0.0
Press [q] to stop encoding
quantize.c:2050: failed assertion `cod_info->part2_3_length <= MAX_BITS'
Abort trap

The above *always* happens at duration 00:02:32 - so I can replicate the
issue with the 3 minute version of the file.

When I run ffmpeg with the default settings: " ffmpeg -i input.wav -vn
output.mp3 " - runs fine, using the default audio settings and is able to
create output.mp3

Also, when I take the same input.wav file and pass it into lame to create an
mp3 file, it runs succesfully.

lame -b 32 --resample 44.1 input.wav output.mp3

I am able to reproduce this issue with several files, and can supply the
file - but I'm pretty sure any uncompressed pcm 44.1 file can cause the
issue.

Using lame : LAME 32bits version 3.98
ffmpeg version:
FFmpeg version SVN-r8045, Copyright (c) 2000-2007 Fabrice Bellard, et al.
  configuration: --prefix=/Users/Asli/CODE/ffmpeg/installed
--enable-libmp3lame --enable-gpl --extra-cflags=-I
/Users/Asli/CODE/lame/installed/include
--extra-ldflags=-L/Users/Asli/CODE/lame/installed/lib
  libavutil version: 49.3.0
  libavcodec version: 51.34.0
  libavformat version: 51.10.0
  built on Feb 20 2007 15:28:37, gcc: 4.0.1 (Apple Computer, Inc. build
5367)
ffmpeg      SVN-r8045
libavutil   3212032
libavcodec  3351040
libavformat 3344896

Running on Macbook Pro (Intel core duo), os 10.4.8
gcc version: gcc version 4.0.1 (Apple Computer, Inc. build 5367)

Any advice will be greatly appreciated, Thanks
AB




More information about the ffmpeg-devel mailing list