O
O
onlinejunior2020-04-22 12:39:57
fmpeg
onlinejunior, 2020-04-22 12:39:57

How to change video file permissions when merging?

ffmpeg -i img.png -i video.mp4 -filter_complex "overlay=(W-w)/2:(H-h)/2" out.mp4


img size - 1980x1080 video.mp4
size - various

How to stretch video.mp4 to 1980 and keep its aspect ratio?

-vf scale= is kind of like for the output file.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
S
Sergey Sokolov, 2020-04-22
@onlinejunior

Try like this:

ffmpeg \
-i img.png \
-i video.mp4 \
-filter_complex "[1]scale=iw*min(1920/iw\,1080/ih):ih*min(1920/iw\,1080/ih)[ov];
[0][ov]overlay=(W-w)/2:(H-h)/2"  \
-y -hide_banner \
out.mp4

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question