[FFmpeg-trac] #8843(ffmpeg:new): concat Segmentation fault filter_complex

FFmpeg trac at avcodec.org
Sun Aug 9 02:41:01 EEST 2020


#8843: concat Segmentation fault filter_complex
-------------------------------------+-------------------------------------
             Reporter:  dirvann      |                     Type:  defect
               Status:  new          |                 Priority:  normal
            Component:  ffmpeg       |                  Version:  4.2
             Keywords:               |               Blocked By:
  segmentation fault concat          |
             Blocking:               |  Reproduced by developer:  1
Analyzed by developer:  0            |
-------------------------------------+-------------------------------------
 Summary of the bug:
 I get a segmentation fault when I combine 3 generated sequences created
 with 2 files.

 Basically sequence 0 contains vid1.mp4 overlayed on a color background
 500x500.
 Sequence 1 contains a trim of vid1 and vid2 on top of eachother.
 Sequence 2 is a part of vid2.

 When I concat the 3 sequences in one complex filter I get a segmentation
 fault.
 Although if I concat seq0 and seq1 only I get no error. When I encode seq0
 and seq1 to a file  and concat that file with seq2 it also poses no
 problem.

 Encoding 3 sequences seperately, then concat the 3 files there is also no
 error.


 How to reproduce:
 (code): basically the 3 blocks that start with 'color' represent the 3
 sequences with outputs  [Seq{sequence#}_out_{v/a}].
 Then combined with concat.

 {{{
 ffmpeg -i "vid1.mp4" -i "vid2.mp4" -filter_complex "\

 color=s=500x500[Seq0_bg];\
 [0:v]trim=0:5,setpts=PTS-STARTPTS[Seq0_0];\
 [Seq0_0]scale=w='if(gt(iw/ih,500/(500)),500,-2)':h='if(gt(iw/ih,500/(500)),-2,500)':eval=init[Seq0_0_v];\
 [Seq0_bg][Seq0_0_v]overlay=x='(W-w)/2':y='(H-h)/2':eval=init:shortest=1[Seq0_out_v];\
 [0:a]atrim=0:5,asetpts=PTS-STARTPTS[Seq0_out_a];\

 color=s=500x500[Seq1_bg];\
 [0:v]trim=5:10.022,setpts=PTS-STARTPTS[Seq1_0];\
 [Seq1_0]scale=w='if(gt(iw/ih,500/(250)),500,-2)':h='if(gt(iw/ih,500/(250)),-2,250)':eval=init[Seq1_0_v];\
 [1:v]trim=0:5.022,setpts=PTS-STARTPTS[Seq1_1];\
 [Seq1_1]scale=w='if(gt(iw/ih,500/(250)),500,-2)':h='if(gt(iw/ih,500/(250)),-2,250)':eval=init[Seq1_1_v];\
 [Seq1_bg][Seq1_0_v]overlay=x='(500-w)/2+0':y='(250-h)/2+0':eval=init:shortest=1[Seq1_overlay_0];\
 [Seq1_overlay_0][Seq1_1_v]overlay=x='(500-w)/2+0':y='(250-h)/2+250':eval=init[Seq1_out_v];\
 [0:a]atrim=5:10.022,asetpts=PTS-STARTPTS[Seq1_0_a];\
 [1:a]atrim=0:5.022,asetpts=PTS-STARTPTS[Seq1_1_a];\
 [Seq1_0_a][Seq1_1_a]amix=inputs=2[Seq1_out_a];\

 color=s=500x500[Seq2_bg];\
 [1:v]trim=5.022:10.024,setpts=PTS-STARTPTS[Seq2_1];\
 [Seq2_1]scale=w='if(gt(iw/ih,500/(500)),500,-2)':h='if(gt(iw/ih,500/(500)),-2,500)':eval=init[Seq2_1_v];\
 [Seq2_bg][Seq2_1_v]overlay=x='(W-w)/2':y='(H-h)/2':eval=init:shortest=1[Seq2_out_v];\
 [1:a]atrim=5.022:10.024,asetpts=PTS-STARTPTS[Seq2_out_a];\

 [Seq0_out_v][Seq0_out_a][Seq1_out_v][Seq1_out_a][Seq2_out_v][Seq2_out_a]concat=n=3:v=1:a=1[vid][aud]"
 \
 -map [vid] -map [aud] -y "out.mp4";
 }}}

 ffmpeg version
 {{{
 ffmpeg version 4.2.4-1ubuntu0.1 Copyright (c) 2000-2020 the FFmpeg
 developers
 built with gcc 9 (Ubuntu 9.3.0-10ubuntu2)
 configuration: --prefix=/usr --extra-version=1ubuntu0.1
 --toolchain=hardened --libdir=/usr/lib/x86_64-linux-gnu
 --incdir=/usr/include/x86_64-linux-gnu --arch=amd64 --enable-gpl
 --disable-stripping --enable-avresample --disable-filter=resample
 --enable-avisynth --enable-gnutls --enable-ladspa --enable-libaom
 --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca
 --enable-libcdio --enable-libcodec2 --enable-libflite --enable-
 libfontconfig --enable-libfreetype --enable-libfribidi --enable-libgme
 --enable-libgsm --enable-libjack --enable-libmp3lame --enable-libmysofa
 --enable-libopenjpeg --enable-libopenmpt --enable-libopus --enable-
 libpulse --enable-librsvg --enable-librubberband --enable-libshine
 --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libssh
 --enable-libtheora --enable-libtwolame --enable-libvidstab --enable-
 libvorbis --enable-libvpx --enable-libwavpack --enable-libwebp --enable-
 libx265 --enable-libxml2 --enable-libxvid --enable-libzmq --enable-libzvbi
 --enable-lv2 --enable-omx --enable-openal --enable-opencl --enable-opengl
 --enable-sdl2 --enable-libdc1394 --enable-libdrm --enable-libiec61883
 --enable-nvenc --enable-chromaprint --enable-frei0r --enable-libx264
 --enable-shared
 libavutil      56. 31.100 / 56. 31.100
 libavcodec     58. 54.100 / 58. 54.100
 libavformat    58. 29.100 / 58. 29.100
 libavdevice    58.  8.100 / 58.  8.100
 libavfilter     7. 57.100 /  7. 57.100
 libavresample   4.  0.  0 /  4.  0.  0
 libswscale      5.  5.100 /  5.  5.100
 libswresample   3.  5.100 /  3.  5.100
 libpostproc    55.  5.100 / 55.  5.100
 }}}


 I attached the logs and the video files. Length of videos are 10s.

--
Ticket URL: <https://trac.ffmpeg.org/ticket/8843>
FFmpeg <https://ffmpeg.org>
FFmpeg issue tracker


More information about the FFmpeg-trac mailing list