<p>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.</p>
<p>The command I tried was:</p>
<pre><code>ffmpeg -i input.mp4 -itsoffset 5 -i input.mp4 -map 0:v -map 1:a -c copy output.mp4
</code></pre>
<p>But it doesn't seem to have any effect.</p>
<p>Interestingly enough, the opposite shift, advancing audio by 5 seconds, works fine:</p>
<pre><code>ffmpeg -i input.mp4 -itsoffset -5 -i input.mp4 -map 0:v -map 1:a -c copy output.mp4
</code></pre>
<p>What could be the reason for this behavior? What do I need to change?</p>

CC BY-SA 4.0
2024-04-15T04:51:49.353Z
Depends on [player](https://video.stackexchange.com/a/25285).
Gyan
CC BY-SA 4.0
2024-04-15T13:47:15.790Z
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
CC BY-SA 4.0
2024-05-05T21:14:22.940Z
If 'advancing' works, does it work for the video stream? Same effect as retarding the audio, if so.
Jim Mack
<ffmpeg><video><editing><audio><timecode>
How to delay beginning of audio without re-encoding?
finefoot
# How to delay beginning of audio without re-encoding?

(Asked by: username_0 on 2024-04-14)

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?

**Tags:** ffmpeg, video, editing, audio, timecode

> **Comments:**
> **username_1**: Depends on [player](https://video.stackexchange.com/a/25285).  
> **username_0**: 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?  
> **username_2**: If 'advancing' works, does it work for the video stream? Same effect as retarding the audio, if so.  

---

## 0 answers

