Overlay video as a background

Examples and samples for those who develop software with FFmpeg.
badrut
Posts: 11
Joined: Thu Nov 19, 2015 1:10 pm

Overlay video as a background

Post by badrut » Thu Nov 19, 2015 1:14 pm

Hello I'm new here
I want to create the video it has background it self, just like this video https://www.youtube.com/watch?v=4_p7t9VKtCM
please give me a command line.

thank you.

badrut
Posts: 11
Joined: Thu Nov 19, 2015 1:10 pm

Re: Overlay video as a background

Post by badrut » Sun Nov 29, 2015 3:46 pm

and if also possible, please can replace the overlay video with the images. thanks

llogan
Posts: 333
Joined: Fri Mar 14, 2014 3:29 am

Re: Overlay video as a background

Post by llogan » Sun Nov 29, 2015 6:58 pm

You need to show information about your input video. This is required for an accurate answer to be provided.

Code: Select all

ffmpeg -i input

badrut
Posts: 11
Joined: Thu Nov 19, 2015 1:10 pm

Re: Overlay video as a background

Post by badrut » Sun Nov 29, 2015 11:45 pm

my video is mp4 format 1280x720p. ffmpeg -i myvid.mp4

If possible, I also ask how to make a video like this
Last edited by badrut on Sat Jan 23, 2016 1:21 pm, edited 1 time in total.

llogan
Posts: 333
Joined: Fri Mar 14, 2014 3:29 am

Re: Overlay video as a background

Post by llogan » Mon Nov 30, 2015 12:52 am

Looks like you want the same image on the top and bottom of the video.

Code: Select all

ffmpeg -i video -i image -filter_complex "[1:v]scale=1280:-1,split=2[top][bottom];[top][0:v][bottom]vstack=inputs=3[v]" -map "[v]" -map 0:a output
Takes up too much space and distracts from the video.

badrut
Posts: 11
Joined: Thu Nov 19, 2015 1:10 pm

Re: Overlay video as a background

Post by badrut » Mon Nov 30, 2015 3:36 am

thank you very much @Ilogan, i'll give a try :)

badrut
Posts: 11
Joined: Thu Nov 19, 2015 1:10 pm

Re: Overlay video as a background

Post by badrut » Mon Nov 30, 2015 5:01 am

I have given it a try and it work perfectly, by the way how about use a different image in the bottom/top?
thanks I really appreciate it. :mrgreen:

llogan
Posts: 333
Joined: Fri Mar 14, 2014 3:29 am

Re: Overlay video as a background

Post by llogan » Mon Nov 30, 2015 5:03 am

Code: Select all

ffmpeg -i video -i top_image -i bottom_image -filter_complex "[1:v]scale=1280:-1[top];[2:v]scale=1280:-1[bottom];[top][0:v][bottom]vstack=inputs=3[v]" -map "[v]" -map 0:a output

badrut
Posts: 11
Joined: Thu Nov 19, 2015 1:10 pm

Re: Overlay video as a background

Post by badrut » Tue Dec 01, 2015 12:12 am

sorry for late reply, I got this message when applying the second command my video is fmd.mp4 and 720p


by the way what if the video is 480p or different resolutions, what parameter I have to change? is the image also must be the same size?
Last edited by badrut on Tue Dec 01, 2015 3:05 pm, edited 1 time in total.

llogan
Posts: 333
Joined: Fri Mar 14, 2014 3:29 am

Re: Overlay video as a background

Post by llogan » Tue Dec 01, 2015 12:40 am

You need to show your actual command and the complete console output. Copy and paste it instead of making a screenshot.

I don't understand why Windows users tend to take screenshots of text instead of copy and paste.

Post Reply