I have a 10 minute video and a 50 minute audio mp3. The video starts at 500 seconds into the audio. Using FFMPEG, how can I add the the audio to the video but specify a 500 seconds audio offset (So that they sync up)?
EDIT:
Down the bottom of this page it suggests how to specify an offset.
$ ffmpeg -i video_source -itsoffet delay -i audio_source -map 0:x -map 1:y .......
However, when I apply this, it still starts the audio from the start.
I couldn't get audio to offset properly either, and some searching suggests that
-itsoffset
is currently broken.You could try and get/compile an old version of ffmpeg before it broke (which doesn't sound like much fun).
Alternately, you could pad your audio with the necessary silence using something like sox and then combine:
We are 8 years later, and the
-itsoffset
does work.Exactly as in your linked page:
Note that you place the
-itsoffset
switch before the input you want to delay, in this caseinput_2
will be delayed.So in your case that the video starts later, you would add
-itsoffset 00:08:20
before the video input.