repeating the first frame of a video with ffmpeg -
to repeat first frame of video, example padding compensate longer audio, following pipeline can used.
ffmpeg -i video.mp4 -vframes 1 -f image2 image.jpg ffmpeg -loop 1 -i image.jpg -t 5 pad.mkv ffmpeg -i pad.mkv -i video.mp4 -i audio.mp3 -filter_complex '[0:v] [1:v] concat' -c:a copy -map 2:a out.mkv
(concat filter preferred concat input because codecs of video , padding clip may differ.)
in contrast, paddings audio silence @ start fits in 1 line.
ffmpeg -i video.mp4 -i audio.mp3 -map 0:v -filter_complex 'aevalsrc=0:duration=5 [pad],[pad] [1:a] concat=v=0:a=1' -c:v copy out.mkv
can video padding condensed in 1 ffmpeg execution, too?
Comments
Post a Comment