[Ffmpeg-devel] FFmpeg crash-- h264.c:2584: mc_dir_part: Assertion `pic->data[0]'

Brian Neltner neltnerb
Thu Oct 20 01:10:54 CEST 2005


Hello,

FFmpeg is crashing when I play several movies. I'm not sure if this is a bug
with my encoding using x264, or a bug decoding using ffmpeg --- hopefully one of
you can tell based on the error output.

The versions of software used here are:
MEncoder dev-CVS-050929-17:11-3.3.5
x264 core:34 svn-305
with ffmpeg compiled into the mplayer cvs release on the same day (from ffmpeg
cvs), so 050929.

Using this setup, I encoded several movies from my DVD collection using x264
with mencoder using two pass encoding and the following command in mencoder:

nice -n +19 mencoder -ofps 24000/1001 dvd://1 -dvd-device
/home/neltnerb/downloads/movies/vob-rips/KILLBILL_VOL1  -alang en -sid 0
-vobsubout "Kill Bill Volume 1" -oac lavc -lavcopts acodec=mp3:abitrate=128 -af
volume=8:sc -ovc x264 -x264encopts
subq=6:4x4mv:8x8dct:me=3:frameref=5:bframes=3:b_pyramid:weight_b:turbo=2:
psnr:bitrate=702:pass=1
-vf hqdn3d=2:1:2,crop=720:352:0:62,scale=608:256 -o "temp.avi"

nice -n +19 mencoder -ofps 24000/1001 dvd://1 -dvd-device
/home/neltnerb/downloads/movies/vob-rips/KILLBILL_VOL1  -alang en -sid 0
-vobsubout "Kill Bill Volume 1" -oac lavc -lavcopts acodec=mp3:abitrate=128 -af
volume=8:sc -ovc x264 -x264encopts
subq=6:4x4mv:8x8dct:me=3:frameref=5:bframes=3:b_pyramid:weight_b:turbo=2:
psnr:bitrate=702:pass=2
-vf hqdn3d=2:1:2,crop=720:352:0:62,scale=608:256 -o "Kill Bill Volume 1.avi"

This should have produced a variable bitrate H.264 video in the .avi container.

While most of these files play without any glitches, several of them fail at a
consistent time in the movie. I created a sample file centered around the point
of interest, and have tried it on my computer as well as a windows computer.
Both had exactly the same error, crashing at the specified timecode. This file
is located at

http://zeeman.mit.edu/apache2-default/www/video/killbillclip.avi

for your reference. It crashes on my computer immediately (0.9 seconds) and is
282 kB.

Running mplayer with the following command:
mplayer killbillclip.avi (implicitly with vo=xv, ao=alsa, cache=8182,
vf=noise=8a:4a, autoq=3, alang=en, stop-xscreensaver=yes, fs=yes, double=yes)

results in the following expletive as it crashes:
VO: [xv] 608x256 => 622x256 Planar YV12  [fs]
[h264 @ 0x8664570]reference picture missing during reorder0.7% 0 0 1%
[h264 @ 0x8664570]reference picture missing during reorder0.7% 0 0 1%
[h264 @ 0x8664570]reference picture missing during reorder0.7% 0 0 1%
mplayer: h264.c:2584: mc_dir_part: Assertion `pic->data[0]' failed.1%

(I think the first three are a relic of cropping the movie, they weren't there
until I shrank the movie down).

In any case, another useful piece of data is that when I play the "temp.avi"
file created during the first pass encode, the error is not there. I'm not sure
if that means it's a non-deterministic error in x264, a problem with the options
enabled in the second pass but not the first, or a problem with FFmpeg.

Here is the unabridged output from mplayer -v

MPlayer dev-CVS-050929-17:11-3.3.5 (C) 2000-2005 MPlayer Team
CPU: Advanced Micro Devices Athlon MP/XP/XP-M Barton (Family: 6, Stepping: 0)
Detected cache-line size is 64 bytes
CPUflags:  MMX: 1 MMX2: 1 3DNow: 1 3DNow2: 1 SSE: 1 SSE2: 0
Compiled for x86 CPU with extensions: MMX MMX2 3DNow 3DNowEx SSE



CommandLine: 'test.avi' '-v'
init_freetype
get_path('font/font.desc') -> '/home/neltnerb/.mplayer/font/font.desc'
font: can't open file: /home/neltnerb/.mplayer/font/font.desc
font: can't open file: /usr/share/mplayer/font/font.desc
Using MMX (with tiny bit MMX2) Optimized OnScreenDisplay
Linux RTC init error in ioctl (rtc_irqp_set 1024): Permission denied
Try adding "echo 1024 > /proc/sys/dev/rtc/max-user-freq" to your system startup
scripts.
Using nanosleep() timing
get_path('input.conf') -> '/home/neltnerb/.mplayer/input.conf'
Can't open input config file /home/neltnerb/.mplayer/input.conf: No such file 
or directory
Parsing input config file /etc/mplayer/input.conf
Input config file /etc/mplayer/input.conf parsed: 59 binds
get_path('test.avi.conf') -> '/home/neltnerb/.mplayer/test.avi.conf'
Playing test.avi.
[file] File size is 289084 bytes
STREAM: [file] test.avi
STREAM: Description: File
STREAM: Author: Albeu
STREAM: Comment: based on the code from ??? (probably Arpi)
CACHE_PRE_INIT: 0 [0] 0  pre:0  eof:289084
Cache fill:  3.45% (289084 bytes)    AVI file format detected.
list_end=0x146
======= AVI Header =======
us/frame: 41708  (fps=23.976)
max bytes/sec: 0
padding: 0
MainAVIHeader.dwFlags: (2320) HAS_INDEX IS_INTERLEAVED TRUST_CKTYPE
frames  total: 72   initial: 0
streams: 2
Suggested BufferSize: 0
Size:  608 x 256
==========================
list_end=0xD4
==> Found video stream: 0
====== STREAM Header =====
Type: vids   FCC: h264 (34363268)
Flags: 0
Priority: 0   Language: 0
InitialFrames: 0
Rate: 24000/1001 = 23.976
Start: 0   Len: 72
Suggested BufferSize: 20387
Quality 0
Sample size: 0
==========================
found 'bih', 40 bytes of 40
======= VIDEO Format ======
  biSize 40
  biWidth 608
  biHeight 256
  biPlanes 1
  biBitCount 24
  biCompression 875967080='h264'
  biSizeImage 466944
===========================
list_end=0x146
==> Found audio stream: 1
====== STREAM Header =====
Type: auds   FCC: U (55)
Flags: 0
Priority: 0   Language: 0
InitialFrames: 0
Rate: 16000/384 = 41.667
Start: 0   Len: 125
Suggested BufferSize: 7680
Quality 0
Sample size: 384
==========================
found 'wf', 30 bytes of 18
======= WAVE Format =======
Format Tag: 85 (0x55)
Channels: 2
Samplerate: 48000
avg byte/sec: 16000
Block align: 384
bits/sample: 0
cbSize: 12
mp3.wID=1
mp3.fdwFlags=0x2
mp3.nBlockSize=384
mp3.nFramesPerBlock=1
mp3.nCodecDelay=0
===========================
list_end=0x17E
hdr=Software  size=36
Software  : MEncoder dev-CVS-050929-17:11-3.3.5
list_end=0x46444
Found movie at 0x100C - 0x46444
Reading INDEX block, 79 chunks for 72 frames (fpos=0x4644c)
AVI index offset: 0x1008 (movi=0x100C idx0=0x4 idx1=0x1E0C)
Auto-selected AVI audio ID = 1
Auto-selected AVI video ID = 0
AVI: Searching for audio stream (id:1)
AVI video size=235033 (72) audio size=48000 (125)
VIDEO:  [h264]  608x256  24bpp  23.976 fps  626.1 kbps (76.4 kbyte/s)
[V] filefmt:3  fourcc:0x34363268  size:608x256  fps:23.98  ftime:=0.0417
Clip info:
 Software: MEncoder dev-CVS-050929-17:11-3.3.5
get_path('sub/') -> '/home/neltnerb/.mplayer/sub/'
get_path('default.sub') -> '/home/neltnerb/.mplayer/default.sub'
==========================================================================
Opening audio decoder: [mp3lib] MPEG layer-2, layer-3
dec_audio: Allocating 4608 + 65536 = 70144 bytes for output buffer.
mp3lib: made decode tables with MMX optimization
mp3lib: using 3DNow!Ex optimized decore!
MP3lib: init layer2&3 finished, tables done
MPEG 1.0, Layer III, 48000 Hz 128 kbit Joint-Stereo, BPF: 384
Channels: 2, copyright: No, original: Yes, CRC: No, emphasis: 0
AUDIO: 48000 Hz, 2 ch, s16le, 128.0 kbit/8.33% (ratio: 16000->192000)
Selected audio codec: [mp3] afm:mp3lib (mp3lib MPEG layer-2, layer-3)
==========================================================================
X11 opening display: :0.0
vo: X11 color mask:  FFFFFF  (R:FF0000 G:FF00 B:FF)
vo: X11 running at 1280x1024 with depth 24 and 32 bpp (":0.0" => local
display)[x11] Detected wm supports NetWM.
[x11] Detected wm supports FULLSCREEN state.
[x11] Detected wm supports ABOVE state.
[x11] Detected wm supports BELOW state.
[x11] Current fstype setting honours FULLSCREEN ABOVE BELOW X atoms
xscreensaver_disable: xscreensaver wid=10485761.
[xv common] Drawing colorkey manually.
[xv common] Using colorkey from Xv (0x00001e).
Opening video filter: [noise=8a:4a]
[vo] query(Planar YV12) -> 3
==========================================================================
Opening video decoder: [ffmpeg] FFmpeg's libavcodec codec family
INFO: libavcodec init OK!
Selected video codec: [ffh264] vfm:ffmpeg (FFmpeg H.264)
==========================================================================
AutoQ: setting quality to 0.
Building audio filter chain for 48000Hz/2ch/s16le -> 0Hz/0ch/??...
[libaf] Adding filter dummy
[dummy] Was reinitialized: 48000Hz/2ch/s16le
[dummy] Was reinitialized: 48000Hz/2ch/s16le
alsa-init: requested format: 48000 Hz, 2 channels, 9
alsa-init: compiled for ALSA-1.0.8
alsa-init: setup for 1/2 channel(s)
alsa-init: 1 soundcard found, using: default
alsa-init: pcm opend in block-mode
alsa-init: chunksize set to 1024
alsa-init: fragcount=16
alsa-init: got buffersize=65536
alsa: 48000 Hz/2 channels/4 bpf/65536 bytes buffer/Signed 16 bit Little Endian
AO: [alsa] 48000Hz 2ch s16le (2 B/s)
AO: Description: ALSA-0.9.x-1.x audio output
AO: Author: Alex Beregszaszi, Zsolt Barat <joy at streamminister.de>
AO: Comment: under developement
Building audio filter chain for 48000Hz/2ch/s16le -> 48000Hz/2ch/s16le...
[dummy] Was reinitialized: 48000Hz/2ch/s16le
[dummy] Was reinitialized: 48000Hz/2ch/s16le
Starting playback...
alsa-space: free space = 65536, prepared --
[ffmpeg] aspect_ratio: 2.425781
VDec: vo config request - 608 x 256 (preferred csp: Planar YV12)
Trying filter chain: noise vo
VDec: using Planar YV12 as output csp (no 0)
Movie-Aspect is 2.43:1 - prescaling to correct movie aspect.
VO Config (608x256->622x256,flags=1,'MPlayer',0x32315659)
REQ: flags=0x437  req=0x0
VO: [xv] 608x256 => 622x256 Planar YV12  [fs]
VO: Description: X11/Xv
VO: Author: Gerd Knorr <kraxel at goldbach.in-berlin.de> and others
Xvideo image format: 0x32595559 (YUY2) packed
Xvideo image format: 0x59565955 (UYVY) packed
Xvideo image format: 0x32315659 (YV12) planar
Xvideo image format: 0x30323449 (I420) planar
using Xvideo port 69 for hw scaling
[xv-fs] dx: 0 dy: 231 dw: 1280 dh: 562
[xv] dx: 0 dy: 231 dw: 1280 dh: 562
*** [noise] Exporting mp_image_t, 608x256x12bpp YUV planar, 233472 bytes
*** [vo] Allocating mp_image_t, 608x256x12bpp YUV planar, 233472 bytes
get_path('subfont.ttf') -> '/home/neltnerb/.mplayer/subfont.ttf'
Unicode font: 2171 glyphs.
[xv] dx: 0 dy: 0 dw: 1280 dh: 1024
[xv-fs] dx: 0 dy: 231 dw: 1280 dh: 562
XXX initial  v_pts=0.459  a_pos=15360 (0.960) 12 ??% ??% ??,?% 0 0 2%
[h264 @ 0x8664570]reference picture missing during reorder1.6% 0 0 1%
[h264 @ 0x8664570]reference picture missing during reorder1.5% 0 0 1%
[h264 @ 0x8664570]reference picture missing during reorder1.5% 0 0 1%
mplayer: h264.c:2584: mc_dir_part: Assertion `pic->data[0]' failed.1%


MPlayer interrupted by signal 6 in module: decode_video
- MPlayer crashed. This shouldn't happen.
  It can be a bug in the MPlayer code _or_ in your drivers _or_ in your
  gcc version. If you think it's MPlayer's fault, please read
  DOCS/HTML/en/bugreports.html and follow the instructions there. We can't and
  won't help unless you provide this information when reporting a possible
bug.Uninit audio filters...
[libaf] Removing filter dummy
uninit audio: mp3lib
uninit video: ffmpeg
alsa-uninit: pcm closed
vo: uninit ...

Thanks,
-- 
-Brian Neltner

"The 0603 is how small? Wow, if I made something that big I'd get fired."

-Benjamin Wunsch






More information about the ffmpeg-devel mailing list