Page 1 of 8

[RESOLVED] MKV demux support

Posted: Tue Feb 06, 2018 3:25 am
by Guest 2
Now that I discovered that Eac3to encoding to ac3 is buggish, I have to extract every stream from Matroska containers and then encode audio from DTS to AC3 with ffmpeg. Then I have to process MKV again with DGIndexNV to have the dgi.

Could you please implement matroska demux, even using external mkvtoolnix package? Audio is a must, subs and chapters a nice plus.

Thanks.

Re: Feature Requests

Posted: Tue Feb 06, 2018 8:19 am
by admin
Audio demux from MKV is already supported. Please clarify your request.

Re: Feature Requests

Posted: Tue Feb 06, 2018 10:28 am
by Guest 2
admin wrote:
Tue Feb 06, 2018 8:19 am
Audio demux from MKV is already supported. Please clarify your request.
Audio demux of all streams without having to repeat task for every stream + video indexing.

Re: Feature Requests

Posted: Tue Feb 06, 2018 11:23 am
by admin
OK, that's already on my list. I'll see what I can do when I finish some ongoing bug squashing.

Re: Feature Requests

Posted: Tue Feb 06, 2018 12:13 pm
by Guest 2
admin wrote:
Tue Feb 06, 2018 11:23 am
OK, that's already on my list. I'll see what I can do when I finish some ongoing bug squashing.
Great. :bow:

And, if possibile, full stream demuxing, i.e. subs and chapters when present.

Re: Feature Requests

Posted: Tue Feb 06, 2018 1:33 pm
by admin
Got it.

Re: Feature Requests

Posted: Fri Feb 09, 2018 10:45 am
by admin
I have converted the MKV audio demuxing to be just like transport stream audio demuxing (they now share the same dialog, etc.) and it works very well. I have to do the same for MP4 before I can give it to you. After that I will look into subs and chapters.

Re: Feature Requests

Posted: Sat Feb 10, 2018 4:28 pm
by admin
MP4 is converted now too. Just have to thoroughly test it and revise the manual before slipstreaming.

Re: Feature Requests

Posted: Sun Feb 11, 2018 1:52 pm
by admin
OK, I have slipstreamed it.

Now, Guest 2, if you want me to do anything with MKV chapters and subs please provide
some suitable test streams. Thank you.

Re: Feature Requests

Posted: Mon Feb 12, 2018 6:31 am
by Guest 2
admin wrote:
Sun Feb 11, 2018 1:52 pm
OK, I have slipstreamed it.
Thanks. I will test it thoroughly.
admin wrote:
Sun Feb 11, 2018 1:52 pm
please provide some suitable test streams.
http://www107.zippyshare.com/v/gVOT9uoc/file.html

There are video, 4 audio streams, subs and chapters too. :)

MKV stream demux

Posted: Mon Feb 12, 2018 6:45 am
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.

Re: MKV stream demux

Posted: Mon Feb 12, 2018 10:31 am
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.

Re: MKV stream demux

Posted: Mon Feb 12, 2018 11:09 am
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.

Re: Feature Requests

Posted: Mon Feb 12, 2018 11:22 am
by admin
Great, thank you!

Re: Feature Requests

Posted: Mon Feb 12, 2018 3:34 pm
by Guest
If you have a decrypting app running in the background MKVToolNix, pointed at the main mpls, will also extract the movie directly

Re: Feature Requests

Posted: Tue Feb 13, 2018 4:51 am
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

Re: Feature Requests

Posted: Thu Feb 15, 2018 11:37 am
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.

Re: Feature Requests

Posted: Fri Feb 16, 2018 3:33 am
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.

Re: Feature Requests

Posted: Fri Feb 16, 2018 6:23 am
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.

Re: Feature Requests

Posted: Fri Feb 16, 2018 8:01 am
by admin
I have slipstreamed the cited fixes. Have at it.

Re: Feature Requests

Posted: Fri Feb 16, 2018 7:08 pm
by hydra3333
thank you :bravo:

Re: Feature Requests

Posted: Fri Feb 16, 2018 7:37 pm
by admin
You are most welcome. :)

Re: Feature Requests

Posted: Sat Feb 17, 2018 4:14 pm
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

Re: Feature Requests

Posted: Sat Feb 17, 2018 5:17 pm
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.

Re: Feature Requests

Posted: Sat Feb 17, 2018 6:06 pm
by Guest
Uploading test clip now
Will let you know when it is ready