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