Answers.Body: <p>Use mkvmerge with
    <strong>-y</strong> or <strong>--sync </strong></p>
  
  <pre><code>                       Synchronize, adjust the track's timecodes with
  
                         the id TID by 'd' ms.
  
                         'o/p': Adjust the timecodes by multiplying with
  
                         'o/p' to fix linear drifts. 'p' defaults to
  
                         1 if omitted. Both 'o' and 'p' can be
  
                         floating point numbers.
  </code></pre>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2012-02-03T13:11:01.380Z
Answers.LastActivityDate: 2012-02-03T13:11:01.380Z
Answers.UserDisplayName: A T
Body: <p>I am quite new in the area of audio/video manipulation so apologies if the question is obvious. I did not manage to find an answer online, though.</p>
  
  <p>I have a MKV file with several tracks: video (MPEG4), audio (DTS EN), audio (AC3 FR) and subtitles. I wanted to extract the video and French audio, then merge them back into an MKV file.
  I did this via mkvextract and mkvmerge (without any specific options). The MKV file I got is playable but the audio is shifted (by 10 or so seconds). The audio in the original file is fine for both languages (ie. it is correctly synchronized with the picture).</p>
  
  <p>I guess that there should be a way to align the video and audio, though I do not really understand why they are shifted since I did not do any manipulations on the extracted files.</p>
  
  <p>I would be grateful for any hints.
  Thank you </p>
  
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2011-08-17T23:14:08.430Z
Comments.Text: What operating system are you on?
Comments.UserDisplayName: daviesgeek
Tags: <sync><matroska>
Title: synchronizing video and audio in a remuxed MKV
UserDisplayName: WoJ
ThreadText: # synchronizing video and audio in a remuxed MKV
  
  (Asked by: username_0 on 2011-07-18)
  
  I am quite new in the area of audio/video manipulation so apologies if the question is obvious. I did not manage to find an answer online, though.
  
  I have a MKV file with several tracks: video (MPEG4), audio (DTS EN), audio (AC3 FR) and subtitles. I wanted to extract the video and French audio, then merge them back into an MKV file.
  I did this via mkvextract and mkvmerge (without any specific options). The MKV file I got is playable but the audio is shifted (by 10 or so seconds). The audio in the original file is fine for both languages (ie. it is correctly synchronized with the picture).
  
  I guess that there should be a way to align the video and audio, though I do not really understand why they are shifted since I did not do any manipulations on the extracted files.
  
  I would be grateful for any hints.
  Thank you
  
  **Tags:** sync, matroska
  
  > **Comments:**
  > **username_1**: What operating system are you on?  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_2 on 2012-02-03. Score: 1 | Accepted answer
  
  Use mkvmerge with
  **-y** or **--sync**
  
  ```
                         Synchronize, adjust the track's timecodes with
  
                         the id TID by 'd' ms.
  
                         'o/p': Adjust the timecodes by multiplying with
  
                         'o/p' to fix linear drifts. 'p' defaults to
  
                         1 if omitted. Both 'o' and 'p' can be
  
                         floating point numbers.
  
  ```
  
  
  ---
  
  