Log in

View Full Version : Audio Sync DVD to MKV


Bob65536
17th August 2010, 21:41
Hi I'm planning on converting a bunch of DVD movies I have on my hard drive. These are the steps I take for each one.


Make a list of all the VOB files.
Demux the ac3 audio from the VOBs using DGMPGDec.
dgindex -IF=[in_X.VOB] -OF=[audio_X] -OM=2
Transcode the VOBs into an mkv using x264's internal decoder.
x264-64 --preset slower --crf 19 -o video_X.mkv in_X.VOB
Mux the video and ac3 with mkvmerge using the --sync delay from the ac3 file.
mkvmerge -o mov_X.mkv video_X.mkv --sync 0:DELAY audio_X.ac3
Merge the mkv files using mkvmerge.
mkvmerge -o final.mkv mov_1.mkv +mov_2.mkv +mov_3.mkv +mov_4.mkv --track-order 0:1,0:2
--append-to 1:1:0:1,2:1:1:1,3:1:2:1,1:2:0:2,2:2:1:2,3:2:2:2


I have done this to a few movies and the output seems alright to me. I used an avisynth script and mkvmerge a while back to convert some movies and I had audio sync issues on some DVDs. So I would like to make sure that I'm transcoding the DVDs correctly, and in particular I want to make sure I don't have any potential problems with the audio.

:thanks:

J_Darnley
18th August 2010, 00:21
Why do you create so many mkv files? Do you make one for each 1GB vob file of the movie? If so, just append the vob files in DGIndex

stax76
18th August 2010, 00:54
Always encode a movie in one piece.

DGIndex has a option 'Save Project and demux video'.
MakeMKV could rip a single MKV file x264 possibly can read.
DVD Decrypter can output a single VOB file, DVD Decrypter can be used with AnyDVD or DVDfab Passkey (free while beta)

Bob65536
18th August 2010, 02:55
Thanks for the suggestions. I looked again at the movies I converted and I saw a jump in the video where I merged the files. Encoding it as a single file looks like the way to go. This is my new sequence.


Get a list of all the VOBs.
Demux the video and audio with dgindex.
dgindex -IF=[VTS_01_1.VOB,VTS_01_2.VOB,VTS_01_3.VOB,VTS_01_4.VOB] -OM=2 -OFD=[mov] -EXIT -HIDE
Transcode the video with x264 and allow it to use its internal decoder.
x264-64 --preset slower --crf 19 -o mov.mkv mov.m2v
Mux the audio and video together with mkvmerge.
mkvmerge -o final.mkv mov.mkv --sync 0:X "audio DELAY Xms.ac3"



I have about 500 DVDs to encode. After I encode them I'm going to delete the rips from my hard drive. I had a fire and lost some of the original DVD discs so I want to be sure that I'm not going to have any issues with my encoded files.

I'm actually writing my own network encoder. I was encoding the VOBs separately to try to make it a little faster serving the DVDs to the clients from a single hard drive. But that is not going to work so it doesn't matter.

Bob65536
28th August 2010, 01:43
I encoded 100 movies using the steps outlined in my last post. I checked all the movies for video quality and audio sync and I found some problems with 7 of them.

A: Audio noticeably out of sync.
I: Visible video interlacing.
S: Strange behavior when seeking in VLC and Windows Media Player 12, and crashes Media Player Classic x64. Also installed K-Lite Codec Pack Mega.

Bad Lieutenant (http://www.themoviedb.org/movie/11699): I A
Girl With The Dragon Tattoo (http://www.themoviedb.org/movie/15472): A
After Life (http://www.themoviedb.org/movie/36419): A S
City Island (http://www.themoviedb.org/movie/28053): A S
The Crazies (http://www.themoviedb.org/movie/29427): A S
Pirates Of The Caribbean 2 (http://www.themoviedb.org/movie/58): S
Christmas In Wonderland (http://www.themoviedb.org/movie/14094): I S

Software:

DVDFab- Various versions over a period of about a year.
DGMPGDec- 1.5.8
x264- x86 and x64 r1698
mkvmerge- 4.2.0


Does anyone have any suggestions on how I might fix my problems? I would be happy to post screen shots, upload video clips, or log files. I'm just not sure what would be most helpful at this time.

Thanks