Hello everybody,
i'm sorry for my poor english, i'm belgian french.
in front of a problem of audio sync in a mkv video file. I explain :
-have 2 video files of the same movie , first avi with AC3 audio and second mkv with AAC audio
-the 2 files have same frame rate and same duration
-want to remux h264 video with AC3 from the avi file.
remuxed, the audio of the new file is out of sync : audio plays too early.
how can i see if one of the original files have delayed audio ? not seen in vdub for avi nor in mkvinfogui.
thanks for your help
best regards
+ Reply to Thread
Results 1 to 7 of 7
-
-
There is probably an easier way, but I had a lot of problems with MKV files until I found DVDFab 9. Now I convert MKV to DVD VOB files, then use SmartRipper to extract audio/video. I haven't had a sync problem since I started doing this.
-
Generally the easiest way is to open the MKV with MKVMergeGUI, then add the AVI. You'll end up with two video streams and two audio streams plus whatever other streams the files may contain. De-select the video from the AVI and the audio from the MKV, then just let MKVMergeGUI save the remaining video and audio as a new MKV. Usually (assuming the video in each is identical) you won't have audio sync issues that way.
If the video in the MKV and AVI is exactly the same (same frame rate and number of frames) the above method should work fine. If they don't, knowing whether the AVI or MKV uses an audio delay probably won't help, because the two videos are different anyway. And MKVMergeGUI should have automatically applied the delay if there was one. You can check for an audio delay using MediaInfo. If there is one, it should be listed under the audio section as "delay relative to video".
And of course if the video frame rate is slightly different, then you might need to change the video frame rate in order for the video and audio to match.
If nothing else works, save the MKV with the new audio and open it using MPC-HC. While the video is playing, use the + and - keys on the numeric keypad to adjust the audio delay. When you're happy they're playing in sync, make note of the audio delay in MPC-HC's status bar (it can be positive or negative) and apply the same delay to the audio when remuxing the MKV.
There's a very good chance the video in the MKV and AVI are slightly diferent even though they appear the same. It only takes a scene being a few frames shorter here, a few more there, and you'll never get the audio to sync all the way through. -
wonderful explanations.
thank you very much, i''l try this evening and report.
best regards. -
back with my problem
opened the files with mediainfo and didn't notice any delayed track.
opened the files with virtualdub for the avi and megui (fileindexer) for mkv, and noticed that mkv file has 11 more frames in the beginning of the video.
So , i can delay my audio file with mkv merge, or delete those 11 more frames in the video track.
Is there a simple way to delete them in the h264 track without recode the entire video track like i can do it for avi files in vdub ?
Is there an existing swiss knife for mkv files like vdub for avi files ?
best regards. -
I'd probably just delay the audio. If the frame rate is 23.976, then 11 frames is only about 460ms, however.....
MKVMergeGUI will split MKV files. It doesn't have a preview like VirtualDubMod but has an option for splitting under it's global tab. The problem is, it can only split on keyframes. The same applies to splitting AVIs with VirtualDub without re-encoding too, but with h264 the keyframes are often further apart. So you might, for example, specify a split at the two minute point, but the split happens at two minutes and four seconds, because that's where the next keyframe is. Generally if I want to split an MKV, I specify a split point a few seconds earlier than where I really want it to split and hope the next keyframe is close enough. If it splits too early I adjust the split point and try again. If you split on a scene change the chances of a keyframe being there are pretty good, but sometimes you just can't split exactly where you want to.
If you use the splitting option, make sure you specify "2" as the maximum number of files, or MKVMerge might split the MKV into lots of tiny sections.
Video To Video Converter has a splitter under the tools menu. I think it's called a "commercial cutter" or something similar, but it'll cut and rejoin files using a preview. The same keyframe rule probably applies though.Last edited by hello_hello; 25th Mar 2013 at 22:06.
-
thank you hello_hello
will try the soft as soon as possible
I've solved my problem that way :
-opened avi file in vdub, selected 11 first frames, and saved them to new avi file.
-opened that 11 frames avi file in vdub, appened the original avi file to obtain a 11 frame longer avi file and saved that new file.
-opened the new file in vdub and demuxed ac3 audio stream that is just the good lenght now to fit with my mkv file.
-muxed ac3 with h264 video track and thats fine!
best regards
Similar Threads
-
How to sync a new AAC audio track into MKV
By Wind Reaper in forum AudioReplies: 1Last Post: 23rd May 2012, 18:06 -
Video out of sync after audio track substitution (MKV)
By ConverterCrazy in forum EditingReplies: 15Last Post: 1st Apr 2012, 08:22 -
Synced audio track on MKV eventually becomes out off sync
By brent1a in forum Video ConversionReplies: 2Last Post: 18th Nov 2010, 14:28 -
Replacing a DVD audio track
By mltwitz in forum DVD RippingReplies: 2Last Post: 13th Jun 2010, 19:58 -
A little mess in replacing audio track
By Instant Martian in forum DVD RippingReplies: 2Last Post: 12th Mar 2010, 17:59