Transcoding VOB to MKV yielding bad sync issues
Posted: Mon Feb 14, 2022 5:23 pm
I have 20TB of ripped and decrypted movies that I've been accumulating over my life. They were all ripped from purchased DVDs as main movie only, and all ripped movies/episodes have a standard DVD structure i.e. they contain a VIDEO_TS folder that holds multiple VOB files containing all audio and subtitle tracks that came with the original DVD. My source media is on one NAS box and my transcoded media is on another NAS box - all locally accessed over ethernet and connected to my 2019 MacBook Pro.
I'm using makemkvcon in a script to transcode from VOB to MKV while keeping only one audio track (typically the 5.1 English if available) and no subtitles. I've separated the stuff needing subtitles for later. During the transcoding I'll typically see quite a few lines similar to:
AV sync issue in stream 0 at 0:05:30.680 : video frame timecode differs by +3.483ms
Even though there's a lot of lines like that being produced as the script runs through my files, I'm ignoring them because I'd be hard pressed to notice a 5ms sync issue.
However, every now and then I'll see a bunch of lines like:
AV sync issue in stream 1 at 0:20:59.040 with duration of 32ms : broken timecode, apparent audio skew is -241.066ms
AV sync issue in stream 1 at 0:28:13.824 with duration of 32ms : broken timecode, apparent audio skew is -278.833ms
Program reads data faster than it can write to disk, consider upgrading your hard drive if you see many of these messages.
AV sync issue in stream 1 at 0:30:46.976 with duration of 32ms : broken timecode, apparent audio skew is -317.6ms
Program reads data faster than it can write to disk, consider upgrading your hard drive if you see many of these messages.
Program reads data faster than it can write to disk, consider upgrading your hard drive if you see many of these messages.
Program reads data faster than it can write to disk, consider upgrading your hard drive if you see many of these messages.
Program reads data faster than it can write to disk, consider upgrading your hard drive if you see many of these messages.
Program reads data faster than it can write to disk, consider upgrading your hard drive if you see many of these messages.
Program reads data faster than it can write to disk, consider upgrading your hard drive if you see many of these messages.
Program reads data faster than it can write to disk, consider upgrading your hard drive if you see many of these messages.
Program reads data faster than it can write to disk, consider upgrading your hard drive if you see many of these messages.
AV sync issue in stream 1 at 0:36:20.352 with duration of 32ms : broken timecode, apparent audio skew is -346.733ms
Program reads data faster than it can write to disk, consider upgrading your hard drive if you see many of these messages.
AV sync issue in stream 1 at 0:44:36.128 with duration of 32ms : broken timecode, apparent audio skew is -395.166ms
AV sync issue in stream 0 at 0:45:37.101 : video stream has 5295 frames with invalid timecodes
1 titles saved
Copy complete. 1 titles saved.
Output lines like the above are concerning because that amount of sync skew is definitely noticeable. I'll view the MKV file via VLC at the indicated time code and sure enough the audio/video sync is awful. So I went back to the original VOB structure and played the movie at the same time code via VLC and it was just fine! This is happening to a significant number of my transcodes, and I simply can't trust the MKV files being produced.
I'm not sure what's happening here and was hoping somebody could help me.
I'm using makemkvcon in a script to transcode from VOB to MKV while keeping only one audio track (typically the 5.1 English if available) and no subtitles. I've separated the stuff needing subtitles for later. During the transcoding I'll typically see quite a few lines similar to:
AV sync issue in stream 0 at 0:05:30.680 : video frame timecode differs by +3.483ms
Even though there's a lot of lines like that being produced as the script runs through my files, I'm ignoring them because I'd be hard pressed to notice a 5ms sync issue.
However, every now and then I'll see a bunch of lines like:
AV sync issue in stream 1 at 0:20:59.040 with duration of 32ms : broken timecode, apparent audio skew is -241.066ms
AV sync issue in stream 1 at 0:28:13.824 with duration of 32ms : broken timecode, apparent audio skew is -278.833ms
Program reads data faster than it can write to disk, consider upgrading your hard drive if you see many of these messages.
AV sync issue in stream 1 at 0:30:46.976 with duration of 32ms : broken timecode, apparent audio skew is -317.6ms
Program reads data faster than it can write to disk, consider upgrading your hard drive if you see many of these messages.
Program reads data faster than it can write to disk, consider upgrading your hard drive if you see many of these messages.
Program reads data faster than it can write to disk, consider upgrading your hard drive if you see many of these messages.
Program reads data faster than it can write to disk, consider upgrading your hard drive if you see many of these messages.
Program reads data faster than it can write to disk, consider upgrading your hard drive if you see many of these messages.
Program reads data faster than it can write to disk, consider upgrading your hard drive if you see many of these messages.
Program reads data faster than it can write to disk, consider upgrading your hard drive if you see many of these messages.
Program reads data faster than it can write to disk, consider upgrading your hard drive if you see many of these messages.
AV sync issue in stream 1 at 0:36:20.352 with duration of 32ms : broken timecode, apparent audio skew is -346.733ms
Program reads data faster than it can write to disk, consider upgrading your hard drive if you see many of these messages.
AV sync issue in stream 1 at 0:44:36.128 with duration of 32ms : broken timecode, apparent audio skew is -395.166ms
AV sync issue in stream 0 at 0:45:37.101 : video stream has 5295 frames with invalid timecodes
1 titles saved
Copy complete. 1 titles saved.
Output lines like the above are concerning because that amount of sync skew is definitely noticeable. I'll view the MKV file via VLC at the indicated time code and sure enough the audio/video sync is awful. So I went back to the original VOB structure and played the movie at the same time code via VLC and it was just fine! This is happening to a significant number of my transcodes, and I simply can't trust the MKV files being produced.
I'm not sure what's happening here and was hoping somebody could help me.