[FFmpeg-user] Pictures in video
Michael Koch
astroelectronic at t-online.de
Tue May 24 23:15:37 EEST 2022
Am 24.05.2022 um 21:55 schrieb Cecil Westerhof via ffmpeg-user:
> With a search on the internet I found I could put a picture into a
> video with:
> ffmpeg -i introductie.mkv -i Pictures/reiger.jpg \
> -filter_complex "[0:v][1:v] overlay=W-w:H-h:enable='between(t,0,20)'" \
> -pix_fmt yuv420p -c:a copy \
> metReiger.mp4
>
> But what if I would insert another picture at another time?
> Or two at the same time? One top left, the other top right.
You can use two or more overlay filters in the filter chain:
ffmpeg -i introductie.mkv -i image1.jpg -i image2.jpg -filter_complex
"[0:v][1:v]
overlay=W-w:H-h:enable='between(t,0,20)'[a];[a][2:v]overlay=W-w:H-h:enable='between(t,21,25)'"
...
> What I find strange is that the input video is 23 MB and the picture
> is 302 KB, but the generated video is 42 MB.
You can for example specify the bitrate with -b:v
Michael
More information about the ffmpeg-user
mailing list