0

I have 2 mp4 videos. One is the main movie and the second is an ending file. A part of the ending file is partly transparent and i want to create a new file with overlap between the files.

For example: The length of the main.mp4 file is 10:00 minutes. The length of the ending.mp4 file is 2:00 minutes, the first minute is partly transparent.

I want to create a new file As follows: 1-9 minutes of main.mp4 9-10 minute ending.mp4 file overlay the main.mp4 file, I want to overlap them both. 10-11 minute the rest of ending.mp4.

Is there a way to do it in ffmpeg or in another video framework? I tried to search but did not find a way to schedule the overlap

one noa
  • 345
  • 1
  • 3
  • 10
  • Something like this https://stackoverflow.com/questions/14676517/overlaying-multiple-videos-with-ffmpeg – Shubham Srivastava Nov 25 '20 at 12:46
  • thank you, but not exactly. I want the ending file to start in the middle of the main file, and to continue after the main finish. how can I schedule the ending file and to determine it when to start? – one noa Nov 25 '20 at 12:58

1 Answers1

1

offset second video, overlay from 540 sec using enable:

ffmpeg -i main.mp4 -itsoffset 540 -i ending.mp4 -filter_complex "[0:v][1:v] overlay='enable=gt(t,540)'[v]" -map [v] output.mp4