Hi, > My old pcengines box died and I had a rpi4 around that I spun up to replace > it with as my network router/play machine. > > The rpi4 is working fantastic except for one thing: > > I have a webcam that I'm capturing images using fswebcam and those scripts > all work perfectly. > > I try to make a video of the captured images (timelapse) using ffmpeg, but > any invocation of ffmpeg I try dumps a core. I have tried on different sets > of image files so I don't think it's the data coming in. > > A super simple invocation: > ffmpeg -y -pattern_type glob -i "image*.jpeg" all.mp4 > > After 40-50 frames results in: > Thread 2 received signal SIGSEGV, Segmentation fault. > [Switching to thread 203094] > 0x0000001527489808 in mbtree_propagate_list_neon () from > /usr/local/lib/libx264.so.24.0 > > 0x0000001527489808 in mbtree_propagate_list_neon () from > /usr/local/lib/libx264.so.24.0 > > (gdb) bt > #0 0x0000001527489808 in mbtree_propagate_list_neon () from > /usr/local/lib/libx264.so.24.0 > #1 0x000000152744fe98 in macroblock_tree_propagate () from > /usr/local/lib/libx264.so.24.0 > #2 0x0000001527442994 in macroblock_tree () from > /usr/local/lib/libx264.so.24.0 > #3 0x0000001527441d1c in x264_8_slicetype_analyse () from > /usr/local/lib/libx264.so.24.0 > #4 0x0000001527488950 in lookahead_slicetype_decide () from > /usr/local/lib/libx264.so.24.0 > #5 0x00000015274882dc in lookahead_thread () from > /usr/local/lib/libx264.so.24.0 > #6 0x000000158550d3c0 in _rthread_start (v=<optimized out>) at > /usr/src/lib/librthread/rthread.c:96 > #7 0x000000153b2cdbf4 in __tfork_thread () at > /usr/src/lib/libc/arch/aarch64/sys/tfork_thread.S:44 > > Is anyone successfully running ffmpeg on rpi4?
I can confirm that ffmpeg dumps core for me on RPI4 running current/arm64. Even with just three jpegs, i.e. three frames, ffmpeg -y -pattern_type glob -i "*.jpg" all.mp4 just sits there for ages and eventualy segfaults like this: Script started on Wed Jan 4 16:12:12 2023 ffmpeg version 4.4.3 Copyright (c) 2000-2022 the FFmpeg developers built with OpenBSD clang version 13.0.0 configuration: --enable-shared --arch=aarch64 --cc=cc --disable-debug --disable-indev=jack --disable-outdev=sdl2 --enable-avresample --enable-fontconfig --enable-frei0r --enable-gpl --enable-ladspa --enable-libaom --enable-libass --enable-libdav1d --enable-libfreetype --enable-libfribidi --enable-libgsm --enable-libmp3lame --enable-libopus --enable-libspeex --enable-libtheora --enable-libv4l2 --enable-libvorbis --enable-libvpx --enable-libx264 --enable-libx265 --enable-libxml2 --enable-libxvid --enable-libzimg --enable-nonfree --enable-openssl --enable-libvidstab --extra-cflags='-I/usr/local/include -I/usr/X11R6/include' --extra-libs='-L/usr/local/lib -L/usr/X11R6/lib' --extra-ldsoflags= --mandir=/usr/local/man --objcc=/usr/bin/false --optflags='-O2 -pipe -Wno-redundant-decls' libavutil 56. 70.100 / 56. 70.100 libavcodec 58.134.100 / 58.134.100 libavformat 58. 76.100 / 58. 76.100 libavdevice 58. 13.100 / 58. 13.100 libavfilter 7.110.100 / 7.110.100 libavresample 4. 0. 0 / 4. 0. 0 libswscale 5. 9.100 / 5. 9.100 libswresample 3. 9.100 / 3. 9.100 libpostproc 55. 9.100 / 55. 9.100 Input #0, image2, from 'smc*.jpg': Duration: 00:00:00.12, start: 0.000000, bitrate: N/A Stream #0:0: Video: mjpeg (Baseline), yuvj420p(pc, bt470bg/unknown/unknown), 2560x1920, 25 fps, 25 tbr, 25 tbn, 25 tbc Stream mapping: Stream #0:0 -> #0:0 (mjpeg (native) -> h264 (libx264)) Press [q] to stop, [?] for help 1;36m[libx264 @ 0x1491c75800] 0musing cpu capabilities: ARMv8 NEON 1;36m[libx264 @ 0x1491c75800] 0mprofile High, level 5.0, 4:2:0, 8-bit 1;36m[libx264 @ 0x1491c75800] 0m264 - core 164 - H.264/MPEG-4 AVC codec - Copyleft 2003-2022 - http://www.videolan.org/x264.html - options: cabac=1 ref=3 deblock=1:0:0 analyse=0x3:0x113 me=hex subme=7 psy=1 psy_rd=1.00:0.00 mixed_ref=1 me_range=16 chroma_me=1 trellis=1 8x8dct=1 cqm=0 deadzone=21,11 fast_pskip=1 chroma_qp_offset=-2 threads=6 lookahead_threads=1 sliced_threads=0 nr=0 decimate=1 interlaced=0 bluray_compat=0 constrained_intra=0 bframes=3 b_pyramid=2 b_adapt=1 b_bias=0 direct=1 weightb=1 open_gop=0 weightp=2 keyint=250 keyint_min=25 scenecut=40 intra_refresh=0 rc_lookahead=40 rc=crf mbtree=1 crf=23.0 qcomp=0.60 qpmin=0 qpmax=69 qpstep=4 ip_ratio=1.40 aq=1:1.00 Output #0, mp4, to 'all.mp4': Metadata: encoder : Lavf58.76.100 Stream #0:0: Video: h264 (avc1 / 0x31637661), yuvj420p(pc, bt470bg/unknown/unknown, progressive), 2560x1920, q=2-31, 25 fps, 12800 tbn Metadata: encoder : Lavc58.134.100 libx264 Side data: cpb: bitrate max/min/avg: 0/0/0 buffer size: 0 vbv_delay: N/A frame= 1 fps=0.0 q=0.0 size= 0kB time=00:00:00.00 bitrate=N/A speed= frame= 3 fps=0.0 q=0.0 size= 0kB time=00:00:00.00 bitrate=N/A speed= Segmentation fault (core dumped) Reading symbols from 32m/usr/local/bin/ffmpegm... (No debugging symbols found in 32m/usr/local/bin/ffmpegm) [New process 403534] [New process 166640] [New process 477908] [New process 114936] [New process 366281] [New process 313181] [New process 410521] [New process 459975] [New process 267908] [New process 458273] [New process 590791] [New process 209987] Core was generated by `ffmpeg'. Program terminated with signal SIGSEGV, Segmentation fault. m--Type <RET> for more, q to quit, c to continue without paging-- #0 34m0x000000141f3fa9ccm in 33mx264_8_cabac_encode_decision_asmm ()m m from 32m/usr/local/lib/libx264.so.24.0m [Current thread is 1 (process 403534)] (gdb) (gdb) bt #0 34m0x000000141f3fa9ccm in 33mx264_8_cabac_encode_decision_asmm ()m m from 32m/usr/local/lib/libx264.so.24.0m #1 34m0x000000141f34e6e4m in 33mx264_8_macroblock_write_cabacm ()m m from 32m/usr/local/lib/libx264.so.24.0m #2 34m0x000000141f36191cm in 33mslices_writem () from 32m/usr/local/lib/libx264.so.24.0m #3 34m0x000000141f365cd4m in 33mthreadpool_threadm ()m m from 32m/usr/local/lib/libx264.so.24.0m #4 34m0x00000014b104f134m in 33m_rthread_startm (36mvm=<optimized out>)m m at 32m/usr/src/lib/librthread/rthread.cm:96 #5 34m0x00000013d6460450m in 33m__tfork_threadm ()m m at 32m/usr/src/lib/libc/arch/aarch64/sys/tfork_thread.Sm:43 (gdb) #0 34m0x000000141f3fa9ccm in 33mx264_8_cabac_encode_decision_asmm ()m m from 32m/usr/local/lib/libx264.so.24.0m #1 34m0x000000141f34e6e4m in 33mx264_8_macroblock_write_cabacm ()m m from 32m/usr/local/lib/libx264.so.24.0m #2 34m0x000000141f36191cm in 33mslices_writem () from 32m/usr/local/lib/libx264.so.24.0m #3 34m0x000000141f365cd4m in 33mthreadpool_threadm ()m m from 32m/usr/local/lib/libx264.so.24.0m #4 34m0x00000014b104f134m in 33m_rthread_startm (36mvm=<optimized out>)m m at 32m/usr/src/lib/librthread/rthread.cm:96 #5 34m0x00000013d6460450m in 33m__tfork_threadm ()m m at 32m/usr/src/lib/libc/arch/aarch64/sys/tfork_thread.Sm:43 Jan