What the summary says. Recompilation of both ebuilds does not help. I don’t see any other relevant dependencies. The error and relevant lib file can be seen below: Reproducible: Always Steps to Reproduce: 1. Be sure above ebuilds are installed and used. 2. Run the following: ffmpeg -threads 0 -i source.avi -pass 1 -passlogfile "2pass_log" -vcodec libx264 -vpre veryslow_firstpass -sameq -acodec copy target.mp4 # (Removing the -vcodec and -vpre options makes it work.) Actual Results: FFmpeg version SVN-r25767, Copyright (c) 2000-2010 the FFmpeg developers built on Dec 19 2010 22:51:51 with gcc 4.5.1 configuration: --prefix=/usr --libdir=/usr/lib64 --shlibdir=/usr/lib64 --mandir=/usr/share/man --enable-static --enable-shared --cc=x86_64-pc-linux-gnu-gcc --enable-gpl --enable-version3 --enable-postproc --enable-avfilter --disable-stripping --disable-debug --disable-network --disable-vaapi --disable-static --enable-libmp3lame --enable-libtheora --enable-libvorbis --enable-libx264 --enable-libxvid --disable-indev=oss --enable-x11grab --disable-outdev=oss --enable-pthreads --enable-libspeex --enable-libopenjpeg --disable-altivec --cpu=athlon64 --enable-hardcoded-tables libavutil 50.33. 0 / 50.33. 0 libavcore 0.13. 0 / 0.13. 0 libavcodec 52.96. 0 / 52.96. 0 libavformat 52.84. 0 / 52.84. 0 libavdevice 52. 2. 2 / 52. 2. 2 libavfilter 1.62. 0 / 1.62. 0 libswscale 0.12. 0 / 0.12. 0 libpostproc 51. 2. 0 / 51. 2. 0 Input #0, avi, from 'source.avi': Metadata: encoder : Nandub v1.0rc2 Duration: 00:23:41.60, start: 0.000000, bitrate: 1409 kb/s Stream #0.0: Video: mpeg4, yuv420p, 512x384 [PAR 1:1 DAR 4:3], 25 tbr, 25 tbn, 25 tbc Stream #0.1: Audio: mp3, 48000 Hz, 2 channels, s16, 114 kb/s [buffer @ 0x62e2f0] w:512 h:384 pixfmt:yuv420p [libx264 @ 0x629b80] using SAR=1/1 [libx264 @ 0x629b80] using cpu capabilities: MMX2 SSE2Slow SlowCTZ [libx264 @ 0x629b80] profile Main, level 2.1 [libx264 @ 0x629b80] 264 - core 107 - H.264/MPEG-4 AVC codec - Copyleft 2003-2010 - http://www.videolan.org/x264.html - options: cabac=1 ref=1 deblock=1:0:0 analyse=0x1:0 me=dia subme=2 psy=1 psy_rd=0.00:0.00 mixed_ref=0 me_range=16 chroma_me=1 trellis=0 8x8dct=0 cqm=0 deadzone=21,11 fast_pskip=1 chroma_qp_offset=0 threads=3 sliced_threads=0 nr=0 decimate=1 interlaced=0 constrained_intra=0 bframes=8 b_pyramid=2 b_adapt=2 b_bias=0 direct=3 weightb=1 open_gop=0 weightp=2 keyint=250 keyint_min=25 scenecut=40 intra_refresh=0 rc_lookahead=60 rc=abr mbtree=1 bitrate=200 ratetol=1.0 qcomp=0.60 qpmin=10 qpmax=51 qpstep=4 ip_ratio=1.41 aq=1:1.00 Output #0, mp4, to 'target.mp4': Metadata: encoder : Lavf52.84.0 Stream #0.0: Video: libx264, yuv420p, 512x384 [PAR 1:1 DAR 4:3], q=10-51, pass 1, 200 kb/s, 25 tbn, 25 tbc Stream #0.1: Audio: libmp3lame, 48000 Hz, 2 channels, 114 kb/s Stream mapping: Stream #0.0 -> #0.0 Stream #0.1 -> #0.1 Press [q] to stop encoding Speicherzugriffsfehler Expected Results: Normal encoding, like it used to work. “Speicherzugriffsfehler” is German for “segmentation fault”. I have a hunch that it’s GCC 4.5.1… But no time to compile it right now as I’m gone for a week as of this night.
Created attachment 257590 [details] emerge --info ffmpeg x264 In case this is needed… :)
I am able to reproduce this locally. Here is a backtrace: #0 0x00007ffff6e2b7b1 in clear_blocks_sse (blocks=0x0) at libavcodec/x86/dsputil_mmx.c:539 No locals. #1 0x00007ffff6cc9295 in mpeg4_decode_mb (s=0xbc6b70, block=0x0) at libavcodec/mpeg4videodec.c:1473 cbpc = <value optimized out> i = <value optimized out> cbp = 16 pred_x = <value optimized out> pred_y = <value optimized out> mx = <value optimized out> my = <value optimized out> dquant = <value optimized out> mot_val = <value optimized out> quant_tab = "\377\376\001\002" xy = 0 #2 0x00007ffff6c06874 in decode_slice (s=0xbc6b70) at libavcodec/h263dec.c:218 ret = <value optimized out> part_mask = 127 mb_size = 16 #3 0x00007ffff6c07934 in ff_h263_decode_frame (avctx=0x628f10, data=0x7fffffffc750, data_size=0x7fffffffca1c, avpkt=<value optimized out>) at libavcodec/h263dec.c:647 buf = 0x62bea0 "" buf_size = 9411 s = 0xbc6b70 ret = <value optimized out> pict = 0x7fffffffc750 #4 0x00007ffff6dad939 in avcodec_decode_video2 (avctx=0x628f10, picture=0x7fffffffc750, got_picture_ptr=0x7fffffffca1c, avpkt=0x7fffffffc8d0) at libavcodec/utils.c:622 ret = <value optimized out> #5 0x0000000000407e15 in output_packet (ist=<value optimized out>, ist_index=0, ost_table=0x62eb70, nb_ostreams=2, pkt=<value optimized out>) at ffmpeg.c:1528 data_buf = 0x62bea0 "" decoded_data_buf = 0x0 data_size = 9411 decoded_data_size = 329472 os = <value optimized out> ost = <value optimized out> ret = <value optimized out> i = <value optimized out> got_picture = 0 picture = {data = {0x0, 0x0, 0x0, 0x0}, linesize = {0, 0, 0, 0}, base = {0x0, 0x0, 0x0, 0x0}, key_frame = 1, pict_type = 0, pts = -9223372036854775808, coded_picture_number = 0, display_picture_number = 0, quality = 0, age = 0, reference = 0, qscale_table = 0x0, qstride = 0, mbskip_table = 0x0, motion_val = {0x0, 0x0}, mb_type = 0x0, motion_subsample_log2 = 0 '\000', opaque = 0x0, error = {0, 0, 0, 0}, type = 0, repeat_pict = 0, qscale_type = 0, interlaced_frame = 0, top_field_first = 0, pan_scan = 0x0, palette_has_changed = 0, buffer_hints = 0, dct_coeff = 0x0, ref_index = {0x0, 0x0}, reordered_opaque = 0, hwaccel_picture_private = 0x0} buffer_to_free = <value optimized out> samples_size = 0 subtitle = {format = 0, start_display_time = 0, end_display_time = 4158568897, num_rects = 32767, rects = 0x5, pts = 0} subtitle_to_free = 0x0 pkt_pts = -9223372036854775808 frame_available = <value optimized out> avpkt = {pts = -9223372036854775808, dts = 0, data = 0x62bea0 "", size = 9411, stream_index = 0, flags = 1, duration = 1, destruct = 0x7ffff6b53a00 <av_destruct_packet>, priv = 0x11, pos = 2056, convergence_duration = 0} bps = 0 #6 0x000000000040bfef in transcode (nb_output_files=1, nb_input_files=1, stream_maps=0x0, nb_stream_maps=-13488, input_files=0x61ab20, output_files=0x61a800) at ffmpeg.c:2617 ist_index = 0 pkt = {pts = -9223372036854775808, dts = 0, data = 0x62bea0 "", size = 9411, stream_index = 0, flags = 1, duration = 1, destruct = 0x7ffff6b53a00 <av_destruct_packet>, priv = 0x11, pos = 2056, convergence_duration = 0} file_index = <value optimized out> ipts_min = <value optimized out> opts_min = <value optimized out> ret = <value optimized out> i = <value optimized out> j = <value optimized out> k = <value optimized out> n = <value optimized out> nb_istreams = 2 nb_ostreams = <value optimized out> is = 0x626510 os = <value optimized out> codec = <value optimized out> icodec = <value optimized out> ost = <value optimized out> ost_table = 0x62eb70 ist = 0x62ea30 ist_table = 0x62ee10 file_table = 0x62e5d0 error = "\377\000\000\000\000\000\000\000q\327%\366\377\177\000\000 \326\377\377\377\177\000\000\000\016\263\365\377\177\000\000\001\200\255\373\377\177\000\000\200~\332\365\377\177\000\000\340\326%\366\377\177\000\000\002", '\000' <repeats 15 times>"\200, \252b\000\000\000\000\000\260\324\377\377\377\177\000\000\374B\254\365\377\177\000\000\330\323\377\377\377\177\000\000IZ%\366\377\177\000\000\000\000\000\000\000\000\000\000\200\252b\000\000\000\000\000OW\000\367\377\177\000\000\001\000\000\000\000\000\000\000\001\000\000\000\000\000\000\000\254Z%\366\377\177\000\000\000\000\000\000\000\000N@\000\000\000\000\000\000\000\000\001\000\000\000\000\000\000\000IZ%\366\001\000\000\000 \326\377\377\377\177\000\000\300\034\062\367\377\177\000\000\002", '\000' <repeats 15 times>"\200, \252b\000\000\000\000\000vg%\366\377\177", '\000' <repeats 30 times>"\377, \177\000\000\200\252b\000\000\000\000\000\330\324\377\377\377\177\000\000!\000\000\000\001\000\000\000\332y\336\367\377\177"... key = -768 want_sdp = <value optimized out> no_packet = '\000' <repeats 99 times> no_packet_count = 0 #7 0x0000000000410b7b in main (argc=<value optimized out>, argv=<value optimized out>) at ffmpeg.c:4306 No locals.
well, why do you set threads to 0 ? you probably want at least one thread, if i set it to 1 its fine...
(In reply to comment #3) > well, why do you set threads to 0 ? you probably want at least one thread, if i > set it to 1 its fine... I assumed, that “0” meant “Automatically detect the best number of threads for my hardware.”. I remember having read that in the documentation. Otherwise… duh. ^^
(In reply to comment #4) > (In reply to comment #3) > > well, why do you set threads to 0 ? you probably want at least one thread, if i > > set it to 1 its fine... > > I assumed, that “0” meant “Automatically detect the best number of threads for > my hardware.”. I remember having read that in the documentation. > Otherwise… duh. ^^ isnt it for x264 and not ffmpeg ?
(In reply to comment #5) > isnt it for x264 and not ffmpeg ? No idea. the man page just puts it under “Advanced Options” but doesn’t mention what it does on “0”. Whatever, I have no problem specifying the number of threads myself. I just thought maybe it knew better what to do than me. (In cases of hyperthreading for example.) (And because I don’t know if it needs a “overlooking” thread that just idles and checks the status. [I guess not.])
closing as there's a way to workaround this, i'm not sure it's not an user issue of feeding ffmpeg with wrong arguments; OTOH you may want to file an upstream bug to get a check added for this because a segfault is never nice.
(In reply to comment #7) > OTOH you may want to file an > upstream bug to get a check added for this because a segfault is never nice. FYI, that’s why I created *this* bug. I don’t even know what the word “upstream” means in this context, and I’m not the maintainer either. Setting this to “upstream”, whatever that means. Seems to make more sense.