ffmpeg crashes by segmentation fault while encoding many jpeg files from stdin to movie

Bug #336479 reported by Xeelee
14
This bug affects 3 people
Affects Status Importance Assigned to Milestone
ffmpeg (Ubuntu)
Fix Released
Low
Unassigned

Bug Description

Binary package hint: ffmpeg

Hi,

ffmpeg (r11872+debian_3:0.svn20080206-12ubuntu3) crashes by segmentation fault on my 64bit Ubuntu Intrepid System while encoding a set of many jpeg files (85784 files) from stdin to a movie. The segmentation fault happens after reading the 19229th frame.

Sincerely yours
    Alexander Thomas

ffmpeg version: r11872+debian_3:0.svn20080206-12ubuntu3
uname -a: Linux hostname 2.6.27-12-generic #1 SMP Thu Feb 5 09:26:42 UTC 2009 x86_64 GNU/Linux
lsb_release -rd:
  Description: Ubuntu 8.10
  Release: 8.10
CPU: Intel(R) Core(TM)2 Duo CPU E6750 @ 2.66GHz
RAM: 4GB

Command Line: /usr/bin/ffmpeg -threads 3 -f mjpeg -i - -vcodec libxvid -r 25 -passlogfile videos/video_test.avi -b 2000k -mbd 2 -v 1 -pass 1 -f rawvideo -y /dev/null 2>ffmpeg.log

Output:
FFmpeg version r11872+debian_3:0.svn20080206-12ubuntu3, Copyright (c) 2000-2008 Fabrice Bellard, et al.
  configuration: --enable-gpl --enable-pp --enable-swscaler --enable-x11grab --prefix=/usr --enable-libgsm --enable-libtheora --enable-libvorbis --enable-pthreads --disable-strip --enable-libfaad --enable-libfaadbin --enable-liba52 --enable-liba52bin --enable-libdc1394 --enable-shared --disable-static
  libavutil version: 49.6.0
  libavcodec version: 51.50.0
  libavformat version: 52.7.0
  libavdevice version: 52.0.0
  built on Oct 3 2008 22:41:23, gcc: 4.3.2
Input #0, mjpeg, from 'pipe:':
  Duration: N/A, bitrate: N/A
    Stream #0.0: Video: mjpeg, yuvj420p, 720x406 [PAR 72:72 DAR 360:203], 25.00 tb(r)
Output #0, rawvideo, to '/dev/null':
    Stream #0.0: Video: libxvid (hq), yuv420p, 720x406 [PAR 1:1 DAR 360:203], q=2-31, pass 1, 2000 kb/s, 25.00 tb(c)
Stream mapping:
  Stream #0.0 -> #0.0
--- 8< ---
Many, many useless lines....
--- >8 ---
frame=19229 fps= 84 q=2.0 size= 0kB time=769.2 bitrate= 0.0kbits/s
Segmentation fault

dmesg:
[126846.494668] ffmpeg[7717]: segfault at 0 ip 00007feae3eb31c2 sp 00007fffed86cf18 error 4 in libc-2.8.90.so[7feae3e2e000+169000]

Reproduceable (tried on):
Codec: mpeg4, libxvid
Codec-Packages: normal and unstripped
FPS: 25
Bite rate: 800, 800k, 1200k, 2000k and 2400k
Container format: avi and mp4
Threads: any also if not supplied
mbd: any also if not supplied

Solved:
Using svn checkout of current version (1/3/2009 2:00pm UTC).

Source images:
identify frame-0001.jpg:
frame-0001.jpg JPEG 720x406 720x406+0+0 DirectClass 8-bit 76.9961kb
Count: 85784 files in 84 subdirectories.
Mean file size: 70091.5 bytes
Biggest file: 110814 bytes

Additional informations:
Frame source (source of jpeg stream) is a Perl open-pipe-filehandler:
  open(my $ffmpegFD,"|".$ffmpeg) || die("Could not open FFMPEG_PATH in pipe mode: $!\n");
Streaming of the jpeg files:
  open(my $frameFD, $frame) || die("Could not open frame for reading: $!\n");
  binmode($frameFD);
  while( read($frameFD, $buffer, 1024**2) && print $ffmpegFD ($buffer) ) {}

Debug informations were attached on file...

Revision history for this message
Xeelee (alex-gaponline) wrote :
Revision history for this message
Reinhard Tartler (siretart) wrote :
Changed in ffmpeg (Ubuntu):
importance: Undecided → Low
status: New → Confirmed
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package ffmpeg - 4:0.6~svn20100505-1ubuntu1

---------------
ffmpeg (4:0.6~svn20100505-1ubuntu1) maverick; urgency=low

  * merge from debian/experimental. remaining changes:
    - don't disable encoders
    - don't build against libfaad, libdirac and libopenjpeg (all in universe)

ffmpeg (4:0.6~svn20100505-1) experimental; urgency=low

  * update to new upstream. Closes: #569727
    - fixes various segfaults and other minor feature improvements
      Closes: #374931, #522449, #501891, #559712, #420231, #369127, #538082,
              #298095, #294422, #561553, #525385, #495274, #420230
      LP: #305286, #457106, #529200, #301723, #305315, #336479, #420230,
          #412063, #428912, #432181, #440591, #453732, #453732, #453732,
      #514259, #515243, #521472, #530186, #530186, #197842, #483317,
     #483317, #539407, #280098, #331255, #566107, #569823, #570305,
     #573190
  * Fixup lintian overrides for new upstream snapshot
  * Bump Standards-Version to 3.8.4
  * Many upstream changes, see upstream Changelog for details
 -- Reinhard Tartler <email address hidden> Wed, 26 May 2010 00:01:17 +0200

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

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.