[RESOLVED] Too short video, a/v sync issue

Support forum for DGDecNV
Post Reply
DAE avatar
Boulder
Posts: 113
Joined: Fri Jul 29, 2011 7:22 am

[RESOLVED] Too short video, a/v sync issue

Post by Boulder »

Hi Don,

I've been trying to re-encode the John Wayne movie "Rio Lobo" to put it on my HD media player. I've noticed that the video track I get with DGIndexNV + Avisynth is shorter than the audio track (either by demuxing in eac3to or DGIndexNV). This naturally causes a sync issue.

This is what eac3to shows:

1) 00003.mpls, 00002.m2ts+00031.m2ts, 1:54:22
- Chapters, 12 chapters
- VC-1, 1080p24 /1.001 (16:9)
- DTS Master Audio, English, multi-channel, 48kHz
- DTS Master Audio, English, stereo, 48kHz
- DTS Master Audio, Spanish, mono, 48kHz
- DTS Master Audio, German, mono, 48kHz
- DTS Master Audio, Spanish, mono, 48kHz
- DTS Master Audio, French, mono, 48kHz
- DTS Master Audio, Japanese, mono, 48kHz

Indexing the video and loading it gives me 164389 frames which translates to 1:54:16.390. If I remux the playlist to a Matroska file with mkvmerge and index the result, I get the correct amount of frames (164524) and video length.

If you need the playlist or index files or anything else, just let me know.
User avatar
admin
Posts: 4551
Joined: Thu Sep 09, 2010 3:08 pm

Re: Too short video, a/v sync issue

Post by admin »

Hi Boulder.

As a start, can you give me:

1. Index file for loaded M2TSs.

2. Index file for remuxed MKV.

3. A link to purchase the exact same Bluray.

Thanks.
User avatar
admin
Posts: 4551
Joined: Thu Sep 09, 2010 3:08 pm

Re: Too short video, a/v sync issue

Post by admin »

Thank you. Ah, looks like a parsing error for VC-1 in DGIndexNV.

Can you please now do these two things:

1. Use DGSplit to cut the 00002.m2ts file with DGSplit using segment mode (do NOT check hexadecimal) and these addresses:

Start 1214108574
End 1341432414

Then provide me with the resulting file. If that is too large then give half as much but with the same starting point.

2. Tell me how you remuxed to MKV, including all steps as if I am clueless. :lol:
DAE avatar
Boulder
Posts: 113
Joined: Fri Jul 29, 2011 7:22 am

Re: Too short video, a/v sync issue

Post by Boulder »

Here's the snippet: https://drive.google.com/file/d/0BzeF_1 ... sp=sharing

I installed the latest version of mkvtoolnix (http://www.fosshub.com/MKVToolNix.html) since I was using the previous version. Then ran mkvmerge GUI, clicked on the Add button in the input files section and selected the playlist file. Mkvmerge scanned for a while and then popped up with a list including the main movie which I selected. Then I unchecked everything but the video track (to speed up the process) and muxed the selected track. This file was used to index and it works fine.
User avatar
admin
Posts: 4551
Joined: Thu Sep 09, 2010 3:08 pm

Re: Too short video, a/v sync issue

Post by admin »

I could not duplicate the issue with the fragment (after trimming the start so it begins with an M2TS timestamp). So we have two options:

1. You give me the first 2GB of 00002.m2ts

or

2. I buy the Bluray.

Is number 1 possible?
DAE avatar
Boulder
Posts: 113
Joined: Fri Jul 29, 2011 7:22 am

Re: Too short video, a/v sync issue

Post by Boulder »

I can upload the file somewhere, I think I have a ~5Mbps line. Or if there's no ftp server available, I'll set one up on my computer and allow you to download the file from there.
User avatar
admin
Posts: 4551
Joined: Thu Sep 09, 2010 3:08 pm

Re: Too short video, a/v sync issue

Post by admin »

Let me see what space I have on my FTP...
User avatar
admin
Posts: 4551
Joined: Thu Sep 09, 2010 3:08 pm

Re: Too short video, a/v sync issue

Post by admin »

Sending you a PM with FTP details.
User avatar
admin
Posts: 4551
Joined: Thu Sep 09, 2010 3:08 pm

Re: Too short video, a/v sync issue

Post by admin »

Got it, downloading...
User avatar
admin
Posts: 4551
Joined: Thu Sep 09, 2010 3:08 pm

Re: Too short video, a/v sync issue

Post by admin »

Thanks, Boulder! I was able to reproduce the issue with that split. Investigating...
DAE avatar
Boulder
Posts: 113
Joined: Fri Jul 29, 2011 7:22 am

Re: Too short video, a/v sync issue

Post by Boulder »

Great! Glad to be of any help :D
User avatar
admin
Posts: 4551
Joined: Thu Sep 09, 2010 3:08 pm

Re: Too short video, a/v sync issue

Post by admin »

OK, I know what the problem is. The M2TS format has a 4-byte timestamp before the 0x47 transport sync byte. If this timestamp gets in the range where it contains a 0x47, that confuses TS packet parsing. So I had added a mechanism to prevent that. Unfortunately, that mechanism is failing for your particular stream. I have to re-think this mechanism. It's fixable, just give me a day or two.
User avatar
admin
Posts: 4551
Joined: Thu Sep 09, 2010 3:08 pm

Re: Too short video, a/v sync issue

Post by admin »

Jolly good. I have a fix working. I will regression test a little in the morning and then slip-stream it.
User avatar
admin
Posts: 4551
Joined: Thu Sep 09, 2010 3:08 pm

Re: Too short video, a/v sync issue

Post by admin »

Aw, what the heck, why wait?

Re-download DGIndexNV 2047 and report your results. Looks fine to me.
DAE avatar
Boulder
Posts: 113
Joined: Fri Jul 29, 2011 7:22 am

Re: Too short video, a/v sync issue

Post by Boulder »

Thanks, I'll give it a go as soon as I get home :)
DAE avatar
Boulder
Posts: 113
Joined: Fri Jul 29, 2011 7:22 am

Re: Too short video, a/v sync issue

Post by Boulder »

And it seems to work, 164527 frames indexed. I also compared by interleaving and the results are identical compared to the remuxed file. Thanks a lot!
User avatar
admin
Posts: 4551
Joined: Thu Sep 09, 2010 3:08 pm

Re: Too short video, a/v sync issue

Post by admin »

You're welcome. Thanks for your testing and for bringing this issue to light.
Post Reply