[Ffmpeg-devel] ffmpeg h264 segfault
nordle at tiscali.co.uk
nordle
Sun May 14 04:46:16 CEST 2006
Trying to use ffmpeg and h264 to encode this file:
http://www.mplayerhq.hu/MPlayer/samples/yuv4mpeg2/example.y4m.bz2
x264 binary works, ffmpeg segfaults
System = Slackware 10.2/current (GCC 3.4.6, glibc 2.3.6, glib 1.2.10, glib2
2.8.6, kernel 2.6.16-ck10)
cvs fffmpeg @ 13-MAY-06
cvs x264 @ 13-MAY-06
x264 compiled with:
CFLAGS="-O2 -march=k8 -mtune=k8"
CXXFLAGS="-O2 -march=k8 -mtune=k8" ./configure --prefix=/usr/local --enable-pthread --enable-visualize
ffmpeg compiled with:
CFLAGS="-O2 -march=k8 -mtune=k8"
CXXFLAGS="-O2 -march=k8 -mtune=k8" ./configure --prefix=/usr/local --enable-a52 --enable-mp3lame --enable-xvid --enable-shared --enable-pthreads --enable-gpl --enable-libogg --enable-vorbis --enable-x264 --enable-faac
x264 binary works fine with:
x264 -q 10 -o out.avi example.y4m
OR
x264 -q 10 -o out.mpeg example.y4m
yuv4mpeg: 384x288 at 25/1fps, 0:0
x264 [info]: using cpu capabilities MMX MMXEXT SSE SSE2 3DNow!
x264 [info]: slice I:1 Avg QP: 7.00 size: 72631 PSNR Mean Y:53.72
U:54.32 V:54.64 Avg:53.95 Global:53.95
x264 [info]: slice P:50 Avg QP:10.00 size: 54281 PSNR Mean Y:49.90
U:50.47 V:50.73 Avg:50.12 Global:50.12
x264 [info]: mb I I16..4: 2.5% 0.0% 97.5%
x264 [info]: mb P I16..4: 1.9% 0.0% 36.4% P16..4: 6.1% 10.8% 44.8% 0.0%
0.0% skip: 0.0%
x264 [info]: PSNR Mean Y:49.977 U:50.550 V:50.810 Avg:50.198 Global:50.173
kb/s:10928.16
encoded 51 frames, 17.69 fps, 10929.80 kb/s
done.
ffmpeg fails with either:
ffmpeg -i example.y4m -vcodec h264 -qmin 10 -qmax 49 -s 704x400 -ar 44100 -ab
128 -acodec vorbis out.mpeg
ffmpeg -i example.y4m -vcodec h264 out.avi
ffmpeg -i example.y4m -vcodec h264 out.mpeg
gdb ffmpeg_g
GNU gdb 6.4
Copyright 2005 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB. Type "show warranty" for details.
This GDB was configured as "i486-slackware-linux"...Using host libthread_db
library "/lib/tls/libthread_db.so.1".
(gdb) r -i example.y4m -vcodec h264 out.mpeg
Starting program: /usr/local/bin/ffmpeg_g -i example.y4m -vcodec h264 out.mpeg
[Thread debugging using libthread_db enabled]
[New Thread -1485751936 (LWP 13918)]
FFmpeg version CVS, Copyright (c) 2000-2004 Fabrice Bellard
configuration: --prefix=/usr/local --enable-a52 --enable-mp3lame --enable-xvid --enable-shared --enable-pthreads --enable-gpl --enable-libogg --enable-vorbis --enable-x264 --enable-faac
libavutil version: 49.0.0
libavcodec version: 51.9.0
libavformat version: 50.4.0
built on May 13 2006 23:50:38, gcc: 3.4.6
Input #0, yuv4mpegpipe, from 'example.y4m':
Duration: N/A, bitrate: N/A
Stream #0.0, 25.00 fps(r): Video: rawvideo, yuv420p, 384x288
File 'out.mpeg' already exists. Overwrite ? [y/N] y
Output #0, mpeg, to 'out.mpeg':
Stream #0.0, 25.00 fps(c): Video: h264, yuv420p, 384x288, q=2-31, 200 kb/s
Stream mapping:
Stream #0.0 -> #0.0
[h264 @ 0xa7e4a828]VBV bitrate (1101004800) > level limit (240000)
[h264 @ 0xa7e4a828]VBV maxrate or buffer size specified, but not both.
Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread -1485751936 (LWP 13918)]
0xa7a7c093 in strlen () from /lib/tls/libc.so.6
(gdb) bt
#0 0xa7a7c093 in strlen () from /lib/tls/libc.so.6
#1 0xa7db5dd3 in x264_ratecontrol_new () from /usr/local/lib/libavcodec.so.51
#2 0x0000239e in ?? ()
#3 0x000021c0 in ?? ()
#4 0x00002d32 in ?? ()
#5 0x000021c0 in ?? ()
#6 0x0000239e in ?? ()
#7 0x000021c0 in ?? ()
#8 0x00002d32 in ?? ()
#9 0x000021c0 in ?? ()
#10 0x00001aae in ?? ()
#11 0x0000191c in ?? ()
#12 0x000021c0 in ?? ()
#13 0x0000191c in ?? ()
#14 0x00001aae in ?? ()
#15 0x0000191c in ?? ()
#16 0x47ae147b in ?? ()
#17 0x3f847ae1 in ?? ()
#18 0x00001c72 in ?? ()
#19 0x00001aae in ?? ()
#20 0x0000239e in ?? ()
#21 0x00001aae in ?? ()
#22 0x00001c72 in ?? ()
#23 0x00001aae in ?? ()
#24 0x0000239e in ?? ()
#25 0x00001aae in ?? ()
#26 0x00001aae in ?? ()
#27 0xa7a74381 in malloc_consolidate () from /lib/tls/libc.so.6
Cannot access memory at address 0xbffaaaae
(gdb)
gdb) disass $pc-32 $pc+32
Dump of assembler code from 0xa7a7c073 to 0xa7a7c0b3:
0xa7a7c073 <strlen+19>: inc %eax
0xa7a7c074 <strlen+20>: xor $0x3,%ecx
0xa7a7c077 <strlen+23>: je 0xa7a7c093 <strlen+51>
0xa7a7c079 <strlen+25>: cmp %ch,(%eax)
0xa7a7c07b <strlen+27>: je 0xa7a7c10a <strlen+170>
0xa7a7c081 <strlen+33>: add $0x1,%eax
0xa7a7c084 <strlen+36>: sub $0x1,%ecx
0xa7a7c087 <strlen+39>: je 0xa7a7c093 <strlen+51>
0xa7a7c089 <strlen+41>: cmp %ch,(%eax)
0xa7a7c08b <strlen+43>: je 0xa7a7c10a <strlen+170>
0xa7a7c08d <strlen+45>: sub $0xf,%eax
0xa7a7c090 <strlen+48>: add $0x10,%eax
0xa7a7c093 <strlen+51>: mov (%eax),%ecx
0xa7a7c095 <strlen+53>: mov $0xfefefeff,%edx
0xa7a7c09a <strlen+58>: add %ecx,%edx
0xa7a7c09c <strlen+60>: jae 0xa7a7c0f7 <strlen+151>
0xa7a7c09e <strlen+62>: xor %ecx,%edx
0xa7a7c0a0 <strlen+64>: or $0xfefefeff,%edx
0xa7a7c0a6 <strlen+70>: inc %edx
0xa7a7c0a7 <strlen+71>: jne 0xa7a7c0f7 <strlen+151>
0xa7a7c0a9 <strlen+73>: mov 0x4(%eax),%ecx
0xa7a7c0ac <strlen+76>: mov $0xfefefeff,%edx
0xa7a7c0b1 <strlen+81>: add %ecx,%edx
End of assembler dump.
(gdb)
(gdb) info all-registers
eax 0x0 0
ecx 0x0 0
edx 0x806dd40 134667584
ebx 0x816f5d8 135722456
esp 0xaff59b7c 0xaff59b7c
ebp 0x806dd40 0x806dd40
esi 0x0 0
edi 0x0 0
eip 0xa7a7c093 0xa7a7c093 <strlen+51>
eflags 0x210246 2163270
cs 0x73 115
ss 0x7b 123
ds 0x7b 123
es 0x7b 123
fs 0x0 0
gs 0x33 51
st0 0 (raw 0x00000000000000000000)
st1 0 (raw 0x00000000000000000000)
st2 0 (raw 0x00000000000000000000)
st3 0 (raw 0x00000000000000000000)
st4 1 (raw 0x3fff8000000000000000)
st5 4.283731569642568182132436049869284 (raw
0x40018914543a8ea47800)
st6 0.67464544708648477300272361389943399 (raw
0x3ffeacb59063a1ba6800)
st7 0.26773322310266054602353666402869692 (raw
0x3ffd8914543a8ea47cfe)
fctrl 0x37f 895
fstat 0x20 32
ftag 0xffff 65535
fiseg 0x0 0
fioff 0x0 0
foseg 0x0 0
fooff 0x0 0
fop 0x0 0
xmm0 {v4_float = {0x0, 0x0, 0x0, 0x0}, v2_double = {0x0, 0x0},
v16_int8 = {0x0 <repeats 16 times>}, v8_int16 = {0x0, 0x0, 0x0,
0x0, 0x0, 0x0, 0x0, 0x0}, v4_int32 = {0x0, 0x0, 0x0, 0x0}, v2_int64 =
{0x0, 0x0}, uint128 = 0x00000000000000000000000000000000}
xmm1 {v4_float = {0x0, 0x0, 0x0, 0x0}, v2_double = {0x0, 0x0},
v16_int8 = {0x0 <repeats 16 times>}, v8_int16 = {0x0, 0x0, 0x0,
0x0, 0x0, 0x0, 0x0, 0x0}, v4_int32 = {0x0, 0x0, 0x0, 0x0}, v2_int64 =
{0x0, 0x0}, uint128 = 0x00000000000000000000000000000000}
xmm2 {v4_float = {0x0, 0x0, 0x0, 0x0}, v2_double = {0x0, 0x0},
v16_int8 = {0x0 <repeats 16 times>}, v8_int16 = {0x0, 0x0, 0x0,
0x0, 0x0, 0x0, 0x0, 0x0}, v4_int32 = {0x0, 0x0, 0x0, 0x0}, v2_int64 =
{0x0, 0x0}, uint128 = 0x00000000000000000000000000000000}
xmm3 {v4_float = {0x0, 0x0, 0x0, 0x0}, v2_double = {0x0, 0x0},
v16_int8 = {0x0 <repeats 16 times>}, v8_int16 = {0x0, 0x0, 0x0,
0x0, 0x0, 0x0, 0x0, 0x0}, v4_int32 = {0x0, 0x0, 0x0, 0x0}, v2_int64 =
{0x0, 0x0}, uint128 = 0x00000000000000000000000000000000}
---Type <return> to continue, or q <return> to quit---
xmm4 {v4_float = {0x0, 0x0, 0x0, 0x0}, v2_double = {0x0, 0x0},
v16_int8 = {0x0 <repeats 16 times>}, v8_int16 = {0x0, 0x0, 0x0,
0x0, 0x0, 0x0, 0x0, 0x0}, v4_int32 = {0x0, 0x0, 0x0, 0x0}, v2_int64 =
{0x0, 0x0}, uint128 = 0x00000000000000000000000000000000}
xmm5 {v4_float = {0x0, 0x0, 0x0, 0x0}, v2_double = {0x0, 0x0},
v16_int8 = {0x0 <repeats 16 times>}, v8_int16 = {0x0, 0x0, 0x0,
0x0, 0x0, 0x0, 0x0, 0x0}, v4_int32 = {0x0, 0x0, 0x0, 0x0}, v2_int64 =
{0x0, 0x0}, uint128 = 0x00000000000000000000000000000000}
xmm6 {v4_float = {0x0, 0x0, 0x0, 0x0}, v2_double = {0x0, 0x0},
v16_int8 = {0x0 <repeats 16 times>}, v8_int16 = {0x0, 0x0, 0x0,
0x0, 0x0, 0x0, 0x0, 0x0}, v4_int32 = {0x0, 0x0, 0x0, 0x0}, v2_int64 =
{0x0, 0x0}, uint128 = 0x00000000000000000000000000000000}
xmm7 {v4_float = {0x0, 0x0, 0x0, 0x0}, v2_double = {0x0, 0x0},
v16_int8 = {0x0 <repeats 16 times>}, v8_int16 = {0x0, 0x0, 0x0,
0x0, 0x0, 0x0, 0x0, 0x0}, v4_int32 = {0x0, 0x0, 0x0, 0x0}, v2_int64 =
{0x0, 0x0}, uint128 = 0x00000000000000000000000000000000}
mxcsr 0x1f80 8064
mm0 {uint64 = 0x0, v2_int32 = {0x0, 0x0}, v4_int16 = {0x0, 0x0,
0x0, 0x0}, v8_int8 = {0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0}}
mm1 {uint64 = 0x0, v2_int32 = {0x0, 0x0}, v4_int16 = {0x0, 0x0,
0x0, 0x0}, v8_int8 = {0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0}}
mm2 {uint64 = 0x0, v2_int32 = {0x0, 0x0}, v4_int16 = {0x0, 0x0,
0x0, 0x0}, v8_int8 = {0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0}}
mm3 {uint64 = 0x0, v2_int32 = {0x0, 0x0}, v4_int16 = {0x0, 0x0,
0x0, 0x0}, v8_int8 = {0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0}}
mm4 {uint64 = 0x8000000000000000, v2_int32 = {0x0, 0x80000000},
v4_int16 = {0x0, 0x0, 0x0, 0x8000}, v8_int8 = {0x0, 0x0, 0x0,
0x0, 0x0, 0x0, 0x0, 0x80}}
mm5 {uint64 = 0x8914543a8ea47800, v2_int32 = {0x8ea47800,
0x8914543a}, v4_int16 = {0x7800, 0x8ea4, 0x543a, 0x8914}, v8_int8 = {
0x0, 0x78, 0xa4, 0x8e, 0x3a, 0x54, 0x14, 0x89}}
mm6 {uint64 = 0xacb59063a1ba6800, v2_int32 = {0xa1ba6800,
0xacb59063}, v4_int16 = {0x6800, 0xa1ba, 0x9063, 0xacb5}, v8_int8 = {
0x0, 0x68, 0xba, 0xa1, 0x63, 0x90, 0xb5, 0xac}}
mm7 {uint64 = 0x8914543a8ea47cfe, v2_int32 = {0x8ea47cfe,
0x8914543a}, v4_int16 = {0x7cfe, 0x8ea4, 0x543a, 0x8914}, v8_int8 = {
0xfe, 0x7c, 0xa4, 0x8e, 0x3a, 0x54, 0x14, 0x89}}
(gdb)
I also tried re-compiling without any cflags, same result.
Also, any change of mkv muxer? A very welcome addition :)
More information about the ffmpeg-devel
mailing list