[RESOLVED] MKV demux support

Support forum for DGDecNV
Post Reply
DAE avatar
Guest 2
Posts: 903
Joined: Mon Sep 20, 2010 2:18 pm

MKV stream demux

Post by Guest 2 »

As far as I can see the process is a multiple pass: first is generation of DGI and then audio stream demux, one by one.

It is time consuming, compared to use DGIndexNV for dgi only and then some tool as gMKVExtractGUI.

The perfection would be demuxing while creating dgi.

And, little note, if you abort process during dgi creation, the app will become unresponsive until all streams will be output.

If you don't abort process, the app will become unresponsive at all untill all streams will be output.

I can send you an entire BD converted to mkv to give you lot of material to work on but how? :)

Edit: there are some size differences in audio stream sizes when extracting by DGIndexNV and when with gMKVExtractGUI (mkvmerge use).

From originale Star Wars I:

ita.dts from DGIndexNV 784.407.552
ita.dts from gMKVExtractGUI 784.408.576

eng.dts from DGIndexNV 4.917.922.068
eng.dts from gMKVExtractGUI 4.917.924.184

I have tried a small hex comparison the header seems the same but all the file content is different. Output audio seems the same.
User avatar
admin
Posts: 4551
Joined: Thu Sep 09, 2010 3:08 pm

Re: MKV stream demux

Post by admin »

Thank you for your testing and feedback.
Guest 2 wrote:
Mon Feb 12, 2018 6:45 am
As far as I can see the process is a multiple pass: first is generation of DGI and then audio stream demux, one by one.

It is time consuming, compared to use DGIndexNV for dgi only and then some tool as gMKVExtractGUI.

The perfection would be demuxing while creating dgi.
That is correct. This is a first step intended to just automate the previous support. I agree that it would be better to do everything in one pass and I am looking into that.
And, little note, if you abort process during dgi creation, the app will become unresponsive until all streams will be output.

If you don't abort process, the app will become unresponsive at all untill all streams will be output.
I'll hold off on doing anything about that pending the further development noted above.
I can send you an entire BD converted to mkv to give you lot of material to work on but how? :)
I have blurays, so you can help by telling me which app and how you run it in order to get chapters and subs.
Edit: there are some size differences in audio stream sizes when extracting by DGIndexNV and when with gMKVExtractGUI (mkvmerge use).

From originale Star Wars I:

ita.dts from DGIndexNV 784.407.552
ita.dts from gMKVExtractGUI 784.408.576

eng.dts from DGIndexNV 4.917.922.068
eng.dts from gMKVExtractGUI 4.917.924.184

I have tried a small hex comparison the header seems the same but all the file content is different. Output audio seems the same.
I'll look into it as part of further development.
DAE avatar
Guest 2
Posts: 903
Joined: Mon Sep 20, 2010 2:18 pm

Re: MKV stream demux

Post by Guest 2 »

admin wrote:
Mon Feb 12, 2018 10:31 am
I have blurays, so you can help by telling me which app and how you run it in order to get chapters and subs.
The easiest way to rip a BD to mkv is using MakeMKV. There is a free key while still in beta which is

T-97pzDZ1bt6gLQbt9KpzffjEI0pRF_MjHnzDHBI@nwQIQpFmCmzpTlyzHfbI1ghXsR7

It's useless to rip entire BD, just the main stream with all audio, subs, etc.

I doesn't convert sup subtitles to srt but the stream classes in mkv are all the same and so should extraction.

I have doubts about chapters.txt (or xml) extraction. Will test later.

I suggest to you feed the mkv to newest version of MKVToolnix, to be sure it has the latest specifications. Useless to develope and later find it doesn't work on latest version.
User avatar
admin
Posts: 4551
Joined: Thu Sep 09, 2010 3:08 pm

Re: Feature Requests

Post by admin »

Great, thank you!
DAE avatar
Guest

Re: Feature Requests

Post by Guest »

If you have a decrypting app running in the background MKVToolNix, pointed at the main mpls, will also extract the movie directly
DAE avatar
Guest 2
Posts: 903
Joined: Mon Sep 20, 2010 2:18 pm

Re: Feature Requests

Post by Guest 2 »

admin wrote:
Mon Feb 12, 2018 11:22 am
Great, thank you!
Tested and you can't grab chapter.txt from MakeMKV.

Easiest way is to use Eac3to https://forum.doom9.org/showthread.php?t=125966 (??? becomes ??? dunno why)

with some GUI such as HdBrStreamExtractor https://drive.google.com/file/d/0B3TNxv ... sp=sharing
User avatar
admin
Posts: 4551
Joined: Thu Sep 09, 2010 3:08 pm

Re: Feature Requests

Post by admin »

I have these fixes:

* Select bar was not starting with the entire range filled when MKV/MP4 was opened.

* Demuxed audio was not matching mkvextract.

* Audio is now demuxed during DGI creation and does not hang the GUI.

I need to test a bit more and then slipstream later today. I will address the chapters/subs in the next phase.
DAE avatar
jpsdr
Posts: 214
Joined: Tue Sep 21, 2010 4:16 am

Re: Feature Requests

Post by jpsdr »

If it can help, i'll share how i personnaly do things, once the BR is ripped (i personnaly use anyDVD for the rip).
With eac3to runned on the whole BR structure (on the root of the BR directories), i identify the the main files (m2ts and mpls).
If i need subtitles, i extract them with eac3to from m2ts file. I do also the same for audio. BTW, if there is a bug in eac3to with ac3, it should be reported... :?
Sometimes chapters are included in the m2ts files, but, personnaly, i've seen that only a very very few times. But in that case, chapters may probably be extracted with eac3to directly from the m2ts file.
Otherwise, i get chapters using Chaptergen http://www.chaptergen.co.nr/ feeding it with the mpls file identified in the first step.
DAE avatar
Guest 2
Posts: 903
Joined: Mon Sep 20, 2010 2:18 pm

Re: Feature Requests

Post by Guest 2 »

jpsdr wrote:
Fri Feb 16, 2018 3:33 am
BTW, if there is a bug in eac3to with ac3, it should be reported
OT: it's not a bug with eac3to "per se". It's the libraries used to encode to ac3 and the author of eac3to seems not to want to update or to move to ffmpeg.
User avatar
admin
Posts: 4551
Joined: Thu Sep 09, 2010 3:08 pm

Re: Feature Requests

Post by admin »

I have slipstreamed the cited fixes. Have at it.
User avatar
hydra3333
Posts: 394
Joined: Wed Oct 06, 2010 3:34 am
Contact:

Re: Feature Requests

Post by hydra3333 »

thank you :bravo:
I really do like it here.
User avatar
admin
Posts: 4551
Joined: Thu Sep 09, 2010 3:08 pm

Re: Feature Requests

Post by admin »

You are most welcome. :)
DAE avatar
Guest

Re: Feature Requests

Post by Guest »

With MKV
Dolby Atmos is extracted but the file type (thd) is not written with the file name
Example
Clip B
Extracted audio name is written as B, should be B.thd
Adding .thd to the file name makes it a valid sound track
The HD variants of DTS, including DTS X, are named properly
User avatar
admin
Posts: 4551
Joined: Thu Sep 09, 2010 3:08 pm

Re: Feature Requests

Post by admin »

Please provide a test clip for analysis. Thank you.

I need to know which text identifier is used, e.g., like "A_VORBIS". I can see that my code does not add the extension when the identifier is not on my list, and I don't have anything for Dolby Atmos right now. I'll check the MKV spec to see if it is listed there.
DAE avatar
Guest

Re: Feature Requests

Post by Guest »

Uploading test clip now
Will let you know when it is ready
User avatar
admin
Posts: 4551
Joined: Thu Sep 09, 2010 3:08 pm

Re: Feature Requests

Post by admin »

Super, thanks. It's not listed in the MKV codec spec.
User avatar
admin
Posts: 4551
Joined: Thu Sep 09, 2010 3:08 pm

Re: Feature Requests

Post by admin »

Guessing from some googling that it will be "A_TRUEHD" but I will confirm with your test file.
User avatar
admin
Posts: 4551
Joined: Thu Sep 09, 2010 3:08 pm

Re: Feature Requests

Post by admin »

Thank you for the test file, gonca. Yup, it's "A_TRUEHD" and I have it added locally. Will slipstream tomorrow. Thanks for pointing it out. :hat:
DAE avatar
Guest 2
Posts: 903
Joined: Mon Sep 20, 2010 2:18 pm

Re: Feature Requests

Post by Guest 2 »

Great update.

How are efforts going with chapters and subs?
User avatar
admin
Posts: 4551
Joined: Thu Sep 09, 2010 3:08 pm

Re: Feature Requests

Post by admin »

Technically it's pretty easy but I'm still thinking over the right GUI interface for it. One consideration is that subtitles are not just in MKV and if I implement it for MKV, I should do it for all the other containers. In that case another top-level menu item "Subtitles" would be appropriate and would lead to a dialog similar to the existing Audio menu. But that would all be a massive job. At the other end of the spectrum I could support only MKV for now and do it by adding a simple checkbox somewhere that says "demux subtitles also". I suppose chapters would raise similar questions but I have been focused on subtitles so far.

Your thoughts on this would be appreciated.

Glad you like the update.
DAE avatar
Guest

Re: Feature Requests

Post by Guest »

Another thing to consider would be to add an option similar to "Output Trimmed TS", an evolution to the MKV/MP4 expanded support
Maybe Output Trimmed MKV (or fill in the extension?) kind of idea
I realize that it is probably an enormous amount of work and might not see the light of day, just throwing out some possibilities
User avatar
admin
Posts: 4551
Joined: Thu Sep 09, 2010 3:08 pm

Re: Feature Requests

Post by admin »

Sure it would be nice but as you say a major effort. I added the trimmed TS support because I personally needed it for my Colossus captures and it was fairly easy to do, not because anyone asked for it. So until I need it for myself, I won't invest any time in it. (BTW, cutting TS is much easier than cutting MKV/MP4.)

I have two fixes for the new MP4 audio demuxing that I will slipstream with the A_TRUEHD fix later today.
DAE avatar
Guest

Re: Feature Requests

Post by Guest »

Just brought it up because as you consider how to implement the new options in the GUI, maybe leave the door open so that in future if you do decide to do it, you can expand on the GUI options instead of redesigning it
Any upgrades you do to DGDecodeNV / DGIndexNV are appreciated :bravo:
DAE avatar
Guest 2
Posts: 903
Joined: Mon Sep 20, 2010 2:18 pm

Re: Feature Requests

Post by Guest 2 »

admin wrote:
Sun Feb 18, 2018 8:34 am
Glad you like the update.
Technically, aside from DGI generation, everything in a container is a stream and thus a "streams" menu would be a nice replacement for audio one.

You could simply present all the included streams, from video to audio, subs and chapters (and attachments too, if any) and let user select the one to be demuxed, such as we do with audio.

Plain and simple solution, IMHO.

EDIT: get a look at gMKVExtractGUI interface. Simple and very easy to use.
User avatar
admin
Posts: 4551
Joined: Thu Sep 09, 2010 3:08 pm

Re: Feature Requests

Post by admin »

Great thoughts, thanks.
Post Reply