A
A
Alexander2019-10-21 11:01:26
fmpeg
Alexander, 2019-10-21 11:01:26

Is it possible to make a picture as a background instead of black fields in a vertical video?

Hello. I tried to find information in search engines, but on the contrary, they try to overlay a picture on top of the video. And I would like to do as in the screenshot, with a vertical video,
5dad658dd99b8438887263.pngadd a background image to the background. Is it possible? If so, what is an example. Thanks in advance!

Answer the question

In order to leave comments, you need to log in

1 answer(s)
S
Sergey Sokolov, 2019-10-21
@sergiks

You can do it using the overlay
filter . There is no time to write a ready-made command, but to start, you need something like this:

ffmpeg  \
-i fon.jpg  \
-i vertvideo.mp4  \
-filter_complex "  \
[0:v] setpts=PTS-STARTPTS, scale=1280x720 [fon];  \
[1:v] setpts=PTS-STARTPTS, scale=-2x720 [video]; \
[fon][video] overlay=x=(W-w)/2  \
"  \
-y -hide_banner  \
result.mp4

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question