I am trying to concat several webm
files, adding blackframe gap between files.
Most files processed fine, but then I encountered problem. At some time in the output:
Input stream #1:1 frame changed from size:640x480 fmt:yuv420p to size:480x360 fmt:yuv420p frame= 8173 fps=109 q=0.0 size= 29580kB time=00:15:44.88 bitrate= 256.5kbits/s speed=12.6x
frame= 8173 fps=108 q=0.0 size= 29580kB time=00:15:44.88 bitrate= 256.5kbits/s speed=12.5x
frame= 8173 fps=107 q=0.0 size= 29580kB time=00:15:44.88 bitrate= 256.5kbits/s speed=12.4x
..and it repeats for hours until I kill ffmpeg. Full log https://pastebin.com/e8URCSec.
Command is
/home/vagrant/bin/ffmpeg -y -i file1.webm
-i file2.webm -f lavfi
-i "color=c=black:s=640x480:r=25"
-f lavfi -i anullsrc
-filter_complex "[0:v]scale=640:480[scaled0]; [1:v]scale=640:480[scaled1];
[2]trim=duration=68.579[g0]; [3]atrim=duration=68.579[ga0];
[scaled0][0:a][g0][ga0][scaled1][1:a]concat=n=3:v=1:a=1"
-cpu-used -5 -deadline realtime -threads 4
output.webm 2> output.log
Yes I see message "frame changed from size", but that why I added scale
filter. Without that filter there were errors and ffmpeg crashed.
Ffmpeg version is standard from Ubuntu 16.04 repository.
Please add comment if I should provide input files.
select='not(eq(n,N))'
before the scale for the 2nd video. N is the frame #, starting from zero. If it's hard to identify, reverse the order of the two videos in the concat and see where it gets stuck.