Starburst
17th September 2014, 03:05
I'm trying to backup my entire PAL DVD collection to x264 before I put it all in storage, and I keep running into weirdness with audio sync. Occasionally, it seems like the "Delay relative to video" amount reported on the audio track is not correct, because when I use it and mux things back together, it looks out of sync. The desync is constant, not gradual, so I could fix it by checking everything individually and trying a few different numbers, but I have a LOT of DVDs (many of them TV shows with individual episodes to encode) to rip, and checking each one manually sounds like a nightmare. Not to mention I sometimes can't tell whether it's perfectly in sync or not.
Here's my entire process in case I'm doing something extraordinarily stupid along the way.
1. Rip with MakeMKV, making sure to include any audio commentaries, subtitles, and other special features.
1a. If the DVD contains episodes which were all contained in the same title track, use MKVMerge GUI to split them (this isn't causing my audio problems afaik, some of the videos I'm having trouble with weren't split like this.)
2. Use MKVExtractGUI2 to demux it all (video, audio, subtitles, and chapter info).
3. The resulting video file is .mpg. Use DGIndex to make a .d2v project file while also checking if the footage is interlaced (it usually is).
4, Use AviSynth to load the d2v project file and deinterlace it, crop any black bars, and resize for square pixels.
My usual script:
MPEG2Source("01.d2v")
TDeint(mode=2, type=3)
Crop(8, 8, -4, -4)
LanczosResize(752, 564)
5. Make sure the script output looks okay, then load it directly into MeGUI and encode to x264 with 2-pass encoding.
6. Use MeGUI or MKVMerge GUI to mux the video back together with the audio tracks, subtitles, and chapters (I don't bother reencoding the audio; it saves time and the audio usually isn't too large).
I make sure I've set a delay (in ms) for each audio track, and I get this number by looking at the Mediainfo for the original MKV rip created by MakeMKV.
Sometimes this ends up looking right, but sometimes it looks a little off. There's one interview special feature in particular that definitely looks wrong with the audio delay included, but if I leave it out completely it looks right. Yet when I look at the original MKV, it looks right even with the audio delay. Is the audio delay perhaps being misreported by Mediainfo? Or is something in the video encoding process chopping out a few frames, thus causing the constant desync?
I've checked the original DVD multiple times to compare with the MKV rip, and they always seem to match up, so I'm a bit lost. It's always a very minor desync (a fraction of a second), but it's enough to distract.
Is there any surefire way to get the audio desync right? Or am I going to need to double-check and experiment with everything, episode by episode? I feel like I'm missing something really obvious.
Here's my entire process in case I'm doing something extraordinarily stupid along the way.
1. Rip with MakeMKV, making sure to include any audio commentaries, subtitles, and other special features.
1a. If the DVD contains episodes which were all contained in the same title track, use MKVMerge GUI to split them (this isn't causing my audio problems afaik, some of the videos I'm having trouble with weren't split like this.)
2. Use MKVExtractGUI2 to demux it all (video, audio, subtitles, and chapter info).
3. The resulting video file is .mpg. Use DGIndex to make a .d2v project file while also checking if the footage is interlaced (it usually is).
4, Use AviSynth to load the d2v project file and deinterlace it, crop any black bars, and resize for square pixels.
My usual script:
MPEG2Source("01.d2v")
TDeint(mode=2, type=3)
Crop(8, 8, -4, -4)
LanczosResize(752, 564)
5. Make sure the script output looks okay, then load it directly into MeGUI and encode to x264 with 2-pass encoding.
6. Use MeGUI or MKVMerge GUI to mux the video back together with the audio tracks, subtitles, and chapters (I don't bother reencoding the audio; it saves time and the audio usually isn't too large).
I make sure I've set a delay (in ms) for each audio track, and I get this number by looking at the Mediainfo for the original MKV rip created by MakeMKV.
Sometimes this ends up looking right, but sometimes it looks a little off. There's one interview special feature in particular that definitely looks wrong with the audio delay included, but if I leave it out completely it looks right. Yet when I look at the original MKV, it looks right even with the audio delay. Is the audio delay perhaps being misreported by Mediainfo? Or is something in the video encoding process chopping out a few frames, thus causing the constant desync?
I've checked the original DVD multiple times to compare with the MKV rip, and they always seem to match up, so I'm a bit lost. It's always a very minor desync (a fraction of a second), but it's enough to distract.
Is there any surefire way to get the audio desync right? Or am I going to need to double-check and experiment with everything, episode by episode? I feel like I'm missing something really obvious.