[RESOLVED] Potential issue with audio demuxing from VOBs

Support forum for DGDecNV
Post Reply
DAE avatar
Xunkar
Posts: 36
Joined: Sun Aug 18, 2019 5:17 am

[RESOLVED] Potential issue with audio demuxing from VOBs

Post by Xunkar »

When working with VOBs I sometimes have to use PGCDemux to properly cut titles within VOBs. But recently I've found that the resulting VOBs sometimes could not be correctly demuxed by DGIndexNV: not every audio track is visible and those that are are clearly wonky or broken. DGMPGDec does not exhibit this behavior. Admittedly it might be due to PGCDemux not doing a perfect job, but the difference between DGMPGDec and DGDecNV is enough to warrant some interest I suppose.

Here's a VOB to try this out if you feel like it: https://mab.to/0gcDo1Ayp ;)
User avatar
Rocky
Posts: 3555
Joined: Fri Sep 06, 2019 12:57 pm

Re: Potential issue with audio demuxing from VOBs

Post by Rocky »

Hmm, very interesting. There is some strange stuff going on there, e.g., truncated audio frames followed by filler. Can I get a VOB straight from the disc rather than PGCDemux'ed? Or give me a link to the DVD so I can purchase it.

DGIndex is getting lucky somehow. It is parsing past the end of the PES packet into the filler. That is fatal for DGIndexNV because they have different parsing code. So I can't just copy DGIndex because it is demonstrably incorrect in parsing this stream, although it gets lucky and doesn't fail. I want robust, correct parsing.
DAE avatar
Xunkar
Posts: 36
Joined: Sun Aug 18, 2019 5:17 am

Re: Potential issue with audio demuxing from VOBs

Post by Xunkar »

See PM.

In case you need it this is the command I use to extract the PGC: pgcdemux -vob -nom2v -noaud -nosub -nolog -nocellt -pgc 4 -ang 1 VTS_02_0.ifo
User avatar
Rocky
Posts: 3555
Joined: Fri Sep 06, 2019 12:57 pm

Re: Potential issue with audio demuxing from VOBs

Post by Rocky »

Thank you, investigating...
User avatar
Rocky
Posts: 3555
Joined: Fri Sep 06, 2019 12:57 pm

Re: Potential issue with audio demuxing from VOBs

Post by Rocky »

So it is definitely pgcdemux that is creating the weird audio, as the audio is perfectly normal in the original VOB. I'm not going to go any further with investigating what pgcdemux is doing. However, I have developed a workaround that allows DGIndexNV to detect all the streams and demux them properly. I was able to use DGIndexNV to demux from your pgcdemux'ed VOB and create an in-sync MKV using mkvtoolnix. A caveat is that the workaround causes a delay of 32ms (one audio frame) to be reported for the audio streams. I ignored that when making the MKV and the sync looked quite fine. One audio frame is not perceptible except to superhumans in any case.

I also noticed that the Info and Demux dialogs were not showing the stream details correctly. E.g., the channels showed as 0_0. I have that fixed also.

I'll make a slipstream later today.
User avatar
Rocky
Posts: 3555
Joined: Fri Sep 06, 2019 12:57 pm

Re: Potential issue with audio demuxing from VOBs

Post by Rocky »

Slipstream released. Marking RESOLVED. Please post again if anything still appears amiss.
DAE avatar
Xunkar
Posts: 36
Joined: Sun Aug 18, 2019 5:17 am

Re: [RESOLVED] Potential issue with audio demuxing from VOBs

Post by Xunkar »

Sounds good, thank you for your hard work as always!
User avatar
Rocky
Posts: 3555
Joined: Fri Sep 06, 2019 12:57 pm

Re: [RESOLVED] Potential issue with audio demuxing from VOBs

Post by Rocky »

You are most welcome, Xunkar. And know that we greatly appreciate your valuable contributions.
DAE avatar
Xunkar
Posts: 36
Joined: Sun Aug 18, 2019 5:17 am

Re: [RESOLVED] Potential issue with audio demuxing from VOBs

Post by Xunkar »

Seems like your recent fix has introduced a new kind of issue unfortunately. I am now seeing corrupted AC3 when indexing with DGIndexNV. Feeding the AC3 track to FFMPEG outputs those nasty errors:

Code: Select all

[ac3 @ 000001b22ebb3000] exponent 25 is out-of-range
[ac3 @ 000001b22ebb3000] error decoding the audio block
Error while decoding stream #0:0: Error number -16976906 occurred
[ac3 @ 000001b22ebb3000] invalid coupling range (8 >= 5)
[ac3 @ 000001b22ebb3000] error decoding the audio block
Error while decoding stream #0:0: Error number -16976906 occurred
[ac3 @ 000001b22ebb3000] new coupling leak info must be present in block 0
[ac3 @ 000001b22ebb3000] error decoding the audio block
Error while decoding stream #0:0: Error number -16976906 occurred
Error while decoding stream #0:0: Error number -16976906 occurred
I've checked with DGMPGDec the resulting audio has no such issue, something must be off.
EDIT: I'm sending you a couple additional details in PM.
User avatar
Rocky
Posts: 3555
Joined: Fri Sep 06, 2019 12:57 pm

Re: [RESOLVED] Potential issue with audio demuxing from VOBs

Post by Rocky »

OK, thank you, I will revisit it when I get the DGDemux stuff out. Probably later today or tomorrow.
User avatar
Rocky
Posts: 3555
Joined: Fri Sep 06, 2019 12:57 pm

Re: [RESOLVED] Potential issue with audio demuxing from VOBs

Post by Rocky »

I have a fix that I think is correct but I need your ffmpeg version and command line to test it as you are doing. Thank you.

I'm getting binary same results for demuxing as EAC3TO but I want to test with ffmpeg also.
User avatar
Rocky
Posts: 3555
Joined: Fri Sep 06, 2019 12:57 pm

Re: [RESOLVED] Potential issue with audio demuxing from VOBs

Post by Rocky »

Oh heck, I'll just let you test it. :salute:

http://rationalqm.us/misc/DGIndexNV_Xunkar.exe
DAE avatar
Xunkar
Posts: 36
Joined: Sun Aug 18, 2019 5:17 am

Re: [RESOLVED] Potential issue with audio demuxing from VOBs

Post by Xunkar »

Everything seems fine, but I had to recreate the cut VOB with PGCDemux as it was no longer on my hard drive, and to my surprise I was unable to recreate the original issue. :shock: I'll keep working on my encodes anyway and will update you in a couple days.

I suggest you try with the cut VOB you have. With 'ffmpeg -i track.ac3' alone you should already see the errors I posted, but you can try a full encode with 'ffmpeg -i track.ac3 -c:a pcm_s32le -f wav output.wav'. In my tests the resulting audio track could not be synced to the video due to the errors (as if it was running slower than the original).
User avatar
Rocky
Posts: 3555
Joined: Fri Sep 06, 2019 12:57 pm

Re: [RESOLVED] Potential issue with audio demuxing from VOBs

Post by Rocky »

Everything is fine with ffmpeg and the fixed DGIndexNV now. I will make a slipstream today.

UPDATE: Fixed in slipstream 198.
Post Reply