neuhalfen.name

A random collection of posts

Mencoder Segmentation Violation While Transcoding Pictures.

Permalink

The problem

I need to sticht several (large) images into a movie. mencoder chokes on large images and segfaults.

$ mencoder mf://@frames.txt -o tst.avi -nosound -mf w=3072:h=3072:fps=5:type=png -ovc x264 -x264encopts bitrate=8000 -xvidencopts pass=1
MEncoder SVN-r29800-4.4.2 (C) 2000-2009 MPlayer Team
success: format: 16 data: 0x0 - 0x0
MF file format detected.
[mf] number of files: 372
VIDEO: [MPNG] 3072x3072 24bpp 5.000 fps 0.0 kbps ( 0.0 kbyte/s)
[V] filefmt:16 fourcc:0x474E504D size:3072x3072 fps:5.000 ftime:=0.2000
Opening video filter: [expand osd=1]
Expand: -1 x -1, -1 ; -1, osd: 1, aspect: 0.000000, round: 0
==========================================================================
Opening video decoder: [ffmpeg] FFmpeg's libavcodec codec family
Unsupported PixelFormat -1
Selected video codec: [ffpng] vfm: ffmpeg (FFmpeg PNG)
==========================================================================
Could not find matching colorspace - retrying with -vf scale...
Opening video filter: [scale]
Movie-Aspect is undefined - no prescaling applied.
SwScaler: reducing / aligning filtersize 1 -> 4
SwScaler: reducing / aligning filtersize 1 -> 4
SwScaler: reducing / aligning filtersize 1 -> 1
SwScaler: reducing / aligning filtersize 9 -> 8
[swscaler @ 0xaed6e0]BICUBIC scaler, from rgb24 to yuv420p using MMX2
[swscaler @ 0xaed6e0]using 4-tap MMX scaler for horizontal luminance scaling
[swscaler @ 0xaed6e0]using 4-tap MMX scaler for horizontal chrominance scaling
[swscaler @ 0xaed6e0]using 1-tap MMX "scaler" for vertical scaling (YV12 like)
[swscaler @ 0xaed6e0]3072x3072 -> 3072x3072
x264 [info]: using SAR=1/1
x264 [info]: using cpu capabilities: MMX2 SSE2Fast SSSE3 FastShuffle SSE4.1 Cache64
x264 [info]: profile High, level 5.1
[VD_FFMPEG] DRI failure.) 0.00fps Trem: 0min 0mb A-V:0.000 [0:0]
Segmentation fault (core dumped)ps Trem: 4min 0mb A-V:0.000 [0:0]

Fix

Explicitly scaling down the movie by passing -vf scale=1024:1024 as option solves the issue:

$ mencoder mf://@frames.txt -o tst.avi -nosound -mf w=3072:h=3072:fps=5:type=png -ovc x264 -x264encopts bitrate=8000 -xvidencopts pass=1 -vf scale=1024:1024
MEncoder SVN-r29800-4.4.2 (C) 2000-2009 MPlayer Team
success: format: 16 data: 0x0 - 0x0
MF file format detected.
[mf] number of files: 372
VIDEO: [MPNG] 3072x3072 24bpp 5.000 fps 0.0 kbps ( 0.0 kbyte/s)
[V] filefmt:16 fourcc:0x474E504D size:3072x3072 fps:5.000 ftime:=0.2000
Opening video filter: [expand osd=1]
Expand: -1 x -1, -1 ; -1, osd: 1, aspect: 0.000000, round: 0
Opening video filter: [scale w=1024 h=1024]
==========================================================================
Opening video decoder: [ffmpeg] FFmpeg's libavcodec codec family
Unsupported PixelFormat -1
Selected video codec: [ffpng] vfm: ffmpeg (FFmpeg PNG)
==========================================================================
Movie-Aspect is undefined - no prescaling applied.
SwScaler: reducing / aligning filtersize 13 -> 12
SwScaler: reducing / aligning filtersize 13 -> 12
SwScaler: reducing / aligning filtersize 13 -> 11
SwScaler: reducing / aligning filtersize 25 -> 24
[swscaler @ 0xaed6e0]BICUBIC scaler, from rgb24 to yuv420p using MMX2
[swscaler @ 0xaed6e0]using n-tap MMX scaler for horizontal luminance scaling
[swscaler @ 0xaed6e0]using n-tap MMX scaler for horizontal chrominance scaling
[swscaler @ 0xaed6e0]using n-tap MMX scaler for vertical scaling (YV12 like)
[swscaler @ 0xaed6e0]3072x3072 -> 1024x1024
x264 [info]: using SAR=1/1
x264 [info]: using cpu capabilities: MMX2 SSE2Fast SSSE3 FastShuffle SSE4.1 Cache64
x264 [info]: profile High, level 3.2
[VD_FFMPEG] DRI failure.) 0.00fps Trem: 0min 0mb A-V:0.000 [0:0]
Writing header...8f (12%) 4.36fps Trem: 1min 0mb A-V:0.000 [0:0]
ODML: vprp aspect is 16384:16384.
Writing header...
ODML: vprp aspect is 16384:16384.
Pos: 64.8s 372f (100%) 4.46fps Trem: 0min 0mb A-V:0.000 [72:0]]
Flushing video frames.
Writing index...
Writing header...
ODML: vprp aspect is 16384:16384.
Video stream: 63.765 kbit/s (7970 B/s) size: 593018 bytes 74.400 secs 372 frame
[png @ 0xa093c0]Found 2 unreleased buffers!
x264 [info]: frame I:2 Avg QP:10.00 size:220880
x264 [info]: frame P:94 Avg QP:10.03 size: 51
x264 [info]: frame B:276 Avg QP:10.02 size: 531
x264 [info]: consecutive B-frames: 0.5% 0.0% 0.0% 99.5%
x264 [info]: mb I I16..4: 60.0% 0.1% 39.9%
x264 [info]: mb P I16..4: 0.0% 0.0% 0.0% P16..4: 0.0% 0.0% 0.0% 0.0% 0.0% skip:100.0%
x264 [info]: mb B I16..4: 0.0% 0.0% 0.0% B16..8: 0.3% 0.0% 0.0% direct: 0.1% skip:99.5% L0: 8.9% L1:91.1% BI: 0.0%
x264 [info]: final ratefactor: -36.09
x264 [info]: 8x8 transform intra:0.1% inter:28.9%
x264 [info]: coded y,uvDC,uvAC intra: 39.8% 50.8% 50.6% inter: 0.1% 0.1% 0.1%
x264 [info]: i16 v,h,dc,p: 82% 16% 2% 1%
x264 [info]: i8 v,h,dc,ddl,ddr,vr,hd,vl,hu: 50% 33% 8% 4% 0% 0% 0% 0% 4%
x264 [info]: i4 v,h,dc,ddl,ddr,vr,hd,vl,hu: 22% 54% 12% 2% 2% 1% 3% 1% 4%
x264 [info]: ref P L0: 95.1% 3.7% 1.2%
x264 [info]: ref B L0: 98.3% 1.7%
x264 [info]: kb/s:63.77

Comments