I have a file containing both video and audio stream. I want to delay the audio by 5 seconds relative to the beginning of the video, without having to do any re-encoding.

The command I tried was:

ffmpeg -i input.mp4 -itsoffset 5 -i input.mp4 -map 0:v -map 1:a -c copy output.mp4

But it doesn't seem to have any effect.

Interestingly enough, the opposite shift, advancing audio by 5 seconds, works fine:

ffmpeg -i input.mp4 -itsoffset -5 -i input.mp4 -map 0:v -map 1:a -c copy output.mp4

What could be the reason for this behavior? What do I need to change?

  • 1
    Depends on player.
    – Gyan
    Apr 15 at 4:51
  • You're writing that VLC player should honor the delay, but VLC player is what I'm using. Also, is there no way to "edit" the "timestamps" in-place? Or to permanently apply the editlist?
    – finefoot
    Apr 15 at 13:47
  • If 'advancing' works, does it work for the video stream? Same effect as retarding the audio, if so.
    – Jim Mack
    May 5 at 21:14


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Browse other questions tagged or ask your own question.