How to do video overlays on another video | Film overlay advanced

Published: 23 May 2022
on channel: The FFMPEG guy
842
24

Today, we show advanced options to how to overlay a video on another video, so that you can combine 2 films into 1! All parameters can be customized to suit your own needs so that you create the film of your dreams. Note that this video is a follow up to a previous video will demonstrating the basics overlay features. This previous video is available here:

More overlay "basic" options?
   • How to overlay a video on another vid...  

ꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷ
EXAMPLES
ꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷ
❶ (Resized) Video on top of another video. Mixing audio.
→ ffmpeg -i input01.mp4 -i input02.mp4 -filter_complex ""[1:v]scale=640:360[top];[0:v][top]overlay[out];[0:a][1:a]amix=duration=longest,dynaudnorm [outa]"" -map [out] -map [outa] output01.mp4

with:
-i input01.mp4 = Reads file «input01.mp4» and …
-i input02.mp4 = … file «input02.mp4»…
-filter_complex = … and starts a series of complex filters…
[1:v]scale=640:360[top] = … starting by rescaling the 2nd video “input02.mp4” ([1:v]) to size 640x360 calling the result [top]…
[0:v][top]overlay[out] = … and overlaying thereafter, the resized video ([top]) on top of the 1st input video “input01.mp4” ([0:v]).
[0:a][1:a]amix=duration=longest = Mixes now audio 1 ([0:a]) & audio 2 ([1:a])…
dynaudnorm = … dynamically re-adjusting the gain factor of the audio, …
[outa] = … calling the resulting audio [outa].
-map [out] -map [outa] = Stitches now back together the resulting modified video [out] and the audio [outa]…
output01.mp4 = … and outputs the result to file «output01.mp4»

❷ (Resized) Video on top of another video. Mixing audio. Delayed overlay.
→ ffmpeg -i input01.mp4 -i input02.mp4 -filter_complex ""[1:v]scale=640:360,setpts=PTS+1/TB[top];[0:v][top]overlay=200:200[out];[1:a]adelay=1000|1000[a1];[0:a][a1]amix=duration=longest,dynaudnorm[outa]"" -map [out] -map [outa] output02.mp4

with:
-i input01.mp4 = Reads file «input01.mp4» and …
-i input02.mp4 = … file «input02.mp4»…
-filter_complex = … and starts a series of complex filters…
[1:v]scale=640:360 = … starting by rescaling the 2nd video “input02.mp4” ([1:v]) to size 640x360…
setpts=PTS+1/TB[top] = … and setting the Presentation TimeStamp (PTS) to start after 1 second, calling the result [top].
[0:v][top]overlay=200:200[out] = Overlays now the resized video ([top]) on top of the 1st input video “input01.mp4” ([0:v]) at position x=200, y=200.
[1:a]adelay=1000|1000[a1] = Delays the stereo audio from “input02.mp4” ([1:a]) by 1 second…
[0:a][a1]amix=duration=longest,dynaudnorm[outa] = … and mixes the result with “input01.mp4” ([0:a]) normalizing the output and calling the result [outa].
-map [out] -map [outa] = Stitches now back together the resulting modified video [out] and the audio [outa]…
output02.mp4 = … and outputs the result to file «output02.mp4»

❸ (Resized) Video on top of another video. Mixing audio. Delayed overlay. Moving overlay.
→ ffmpeg -i input01.mp4 -i input02.mp4 -filter_complex ""[1:v]scale=640:360,setpts=PTS+1/TB[top];[0:v][top]overlay=(t-1)*64:(t-1)*36[out];[1:a]adelay=1000|1000[a1];[0:a][a1]amix=duration=longest,dynaudnorm[outa]"" -map [out] -map [outa] output03.mp4

with:
-i input01.mp4 = Reads file «input01.mp4» and …
-i input02.mp4 = … file «input02.mp4»…
-filter_complex = … and starts a series of complex filters…
[1:v]scale=640:360,setpts=PTS+1/TB[top] = … starting by rescaling the 2nd video “input02.mp4” ([1:v]) to size 640x360 and delaying its PTS by 1 second…
[0:v][top]overlay = Overlays now the resized video ([top]) on top of the 1st input video “input01.mp4” ([0:v])…
(t-1)*64:(t-1)*36[out] = … moving it, after 1 second and every second (t), by 64 pixels horizontally / 36 pixels vertically.
[1:a]adelay=1000|1000[a1] = Delays the stereo audio from “input02.mp4” ([1:a]) by 1 second…
[0:a][a1]amix=duration=longest,dynaudnorm[outa] = … and mixes the result with “input01.mp4” ([0:a]) normalizing the output and calling the result [outa].
-map [out] -map [outa] = Stitches now back together the resulting modified video [out] and the audio [outa]…
output03.mp4 = … and outputs the result to file «output03.mp4»
ꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷ
→ Catch up with the FFMPEG guy Channel
   • ALL THE VIDEOS FROM THE CHANNEL  
ꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷ
MUSIC
ꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷ
→ What A Baby - Max McFerren
ꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷ
An FFMPEG question?
Ask the FFMPEG guy
ꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷ


Watch video How to do video overlays on another video | Film overlay advanced online without registration, duration hours minute second in high quality. This video was added by user The FFMPEG guy 23 May 2022, don't forget to share it with your friends and acquaintances, it has been viewed on our site 842 once and liked it 24 people.