3

I've figured out how to composite 2 videos using the overlay command, but was wondering if there is also a way to offset or shift the 2nd video in time, so you don't see the overlayed video until after a certain amount of time has elapsed?

Bachalo
  • 2,857

1 Answers1

4

Yes, use the itsoffset option to offset a particular stream.

See my answer here for specific usage examples: Fix an m4v video that has lagging audio (audio and video out of sync)

You want to supply two input files, offset one with -itsoffset by specifying a (positive) delay value, use the -filter_complex overlay, and then use the -map options to select the proper streams to put it back together.

Note that you cannot use -c copy to copy video streams – you will have to tell FFmpeg to re-encode.

slhck
  • 235,242