[RESOLVED] MKV demux support
Re: Feature Requests
Fixed a bug, please re-download.
The bug: if a track is present but there are no actual frames present for that track (due to cutting) then dgmkvextract would crash. Now, I simply do not generate an output file for such tracks. gMKVExtractGUI creates an empty file.
I also fixed a crash when the MKV file is not specified, and made it a tiny bit faster by masking the video track.
The bug: if a track is present but there are no actual frames present for that track (due to cutting) then dgmkvextract would crash. Now, I simply do not generate an output file for such tracks. gMKVExtractGUI creates an empty file.
I also fixed a crash when the MKV file is not specified, and made it a tiny bit faster by masking the video track.
Re: Feature Requests
O-M-G. You did such a great job... and what storage subsystem you have?!? I thought mine was fast but yours is smoking.
I did some tests on Murder on the Orient Express and the results follows:
dgmkvextract.exe 1:50
gMKVExtractGUI 1:07
Audio are bit per bit identical.
There is a minor bug on srt, i.e. on forced ones there are jumps on subs numbers, for example:
gMKVExtractGUI output:
Code: Select all
1
00:00:47,423 --> 00:00:52,094
ASSASSINIO SULL'ORIENT EXPRESS
2
00:01:13,157 --> 00:01:16,953
Il Muro del Pianto, Gerusalemme
1934
3
00:03:42,640 --> 00:03:43,808
Così va meglio.
4
00:07:09,221 --> 00:07:10,389
Molto bene, signore.
5
00:18:02,290 --> 00:18:03,500
Ah, numero tre.
6
00:18:04,709 --> 00:18:06,586
Lei è il sig. MacQueen?
Code: Select all
2
00:00:47,423 --> 00:00:52,094
ASSASSINIO SULL'ORIENT EXPRESS
6
00:01:13,157 --> 00:01:16,953
Il Muro del Pianto, Gerusalemme
1934
52
00:03:42,640 --> 00:03:43,808
Così va meglio.
168
00:07:09,221 --> 00:07:10,389
Molto bene, signore.
605
00:18:02,290 --> 00:18:03,500
Ah, numero tre.
609
00:18:04,709 --> 00:18:06,586
Lei è il sig. MacQueen?
If possibile give the possibility to save output streams to another directory, for benchmark purposes. To be fair I output gMKV on same phisical SDD too.
Re: Feature Requests
Nice work.
And reading this i just discover gMKVExtractGUI...
And reading this i just discover gMKVExtractGUI...
Re: Feature Requests
Thank you for your testing.
Hmm, my setup is nothing special (even if I do call it "The Beast"):
i7 7700K with 64GB fast memory
Win 10 64-bit
C: (system) is on an SSD
H: (data) is a Hitachi HDD
1080 Ti video (not relevant here)
I have the blu-ray ripped to H: and the MKV is 24GB
I open a cmd window on the H: directory and run dgmkvextract there
so I am reading and writing to the same dir on the HDD
there are 5 ac3's and 7 sup's
completes in ~15 seconds
Of course, to demux doesn't require the entire file to be read, as there are indices, etc. It does seem rather fast. Maybe the disk cache flushing hasn't occurred and completion is signaled but the data is still in OS caches being flushed out to the physical drive. I'm not sure. Is write caching enabled on your drive? Or maybe it is due to my large amount of RAM, such that no swapping occurs and the OS caches can be large.
EDIT: The first run with nothing in the cache may be slower. I don't remember if I had already saved the project once before taking the timing, and as mentioned I have a lot of fast RAM. I could easily hold the entire stream in cache if Windows allows it.
Please re-download. Should be fixed.There is a minor bug on srt, i.e. on forced ones there are jumps on subs numbers
I'll address that as part of the file name improvement.I want to ask you also how you honor the delay of audio tracks. The best think is to show it in the filename, such as "Assassinio sull'Orient Express_track3_ita_DELAY 1ms.dts" so programs recognize it and know how to handle.
It's not worth it for this app as it is going away as soon as it is tested and integrated into DGIndexNV. I'm going to start integrating it today.If possible give the possibility to save output streams to another directory, for benchmark purposes. To be fair I output gMKV on same phisical SDD too.
Re: Feature Requests
That wasn't so bad. I have it integrated into DGIndexNV with the new Demux dialog, etc. The only thing left to do is to improve the filenames. Gonna take a break for a bath and then I have to do my swim coaching, after which I'll do the filenames and then give you a test version.
Re: Feature Requests
OK, back from swimming. One of my swimmers missed a state cut by 0.08 seconds at regionals. Oy. Next time!
Here is the first test version of the full MKV demux support. The only thing not done yet is chapters. Although I tried my best, there may be some bugs so please test it thoroughly, including MP4 and CLI -a.
http://rationalqm.us/misc/DGIndexNV_test.exe
As always, your test results will be greatly appreciated.
I am removing dgmkvextract.exe as it is no longer needed.
@Guest 2
I tried to match gMKVExtractGUI file names. There should be no delay on MKV demuxed stuff, so I don't do anything with that. We can revisit it if I am wrong about that.
Here is the first test version of the full MKV demux support. The only thing not done yet is chapters. Although I tried my best, there may be some bugs so please test it thoroughly, including MP4 and CLI -a.
http://rationalqm.us/misc/DGIndexNV_test.exe
As always, your test results will be greatly appreciated.
I am removing dgmkvextract.exe as it is no longer needed.
@Guest 2
I tried to match gMKVExtractGUI file names. There should be no delay on MKV demuxed stuff, so I don't do anything with that. We can revisit it if I am wrong about that.
Re: Feature Requests
Thanks for the testing, gonca!
I'm getting wasted right now, so I'll make a new build tomorrow. C'mon, it's Saturday night. One day I want to share a quality single-malt Scotch with you. You're my kind of guy.
Ah yes, I know why without even looking. I'll fix it.PCM files are extracted but no file extension is given in the name
Yeah, I wondered if there could be a container specified delay. Can you give me a sample? Or tell me how to make one?Some Mkvs have delays in the audio so that could be useful, these are lossless remuxes from disk
That is invisible to DGIndexNV, should work fine.SUP files are so far working as expected
Have to find one with forced subs to test
Beat me to it.EDIT: Forced flags are being retained
I'm getting wasted right now, so I'll make a new build tomorrow. C'mon, it's Saturday night. One day I want to share a quality single-malt Scotch with you. You're my kind of guy.
Re: Feature Requests
Oh crud, I seem to have hit edit on your post instead of reply. I'll see if I can repair that.
EDIT: nope, can't fix it as I lost the cached version. Hopefully the quotes will be sufficient. Sorry!
EDIT: nope, can't fix it as I lost the cached version. Hopefully the quotes will be sufficient. Sorry!
Re: Feature Requests
Its fine, its just looks like I am having a discussion with myself
Gotta get some meds so I stop talking to myself
Gotta get some meds so I stop talking to myself
Re: Feature Requests
Lights out!
Re: Feature Requests
I know that you are more of a CLI kind of guy
but in the MKVToolNix GUI
Load a mkv
Highlight the audio track
In the options on the right hand side add the delay in the Delay(ms) box under Timestamps
I am uploading a couple of samples right now
but in the MKVToolNix GUI
Load a mkv
Highlight the audio track
In the options on the right hand side add the delay in the Delay(ms) box under Timestamps
I am uploading a couple of samples right now
Re: Feature Requests
I added the delay value in the file name and fixed the missing extension for PCM:
http://rationalqm.us/misc/DGIndexNV_test.exe
I show delay for subtitle files too, although I am not sure if it is significant because MediaInfo does not show a delay for subtitle tracks. Anybody know about this?
This is my release candidate so please beat the crap out of it.
http://rationalqm.us/misc/DGIndexNV_test.exe
I show delay for subtitle files too, although I am not sure if it is significant because MediaInfo does not show a delay for subtitle tracks. Anybody know about this?
This is my release candidate so please beat the crap out of it.
Re: Feature Requests
Subtitles
I deal primarily (99.99%) with PGS
I didn't even know they had delays
They are IGS with their own time stamps so I don't know how the delays would be relevant
Later today I will test them to see if it makes a difference
Good work Don
I deal primarily (99.99%) with PGS
I didn't even know they had delays
They are IGS with their own time stamps so I don't know how the delays would be relevant
Later today I will test them to see if it makes a difference
Good work Don
Re: Feature Requests
Thanks, gonca.
There is no explicit delay field defined in the Matroska spec. You derive it from the difference between the StartTime of the first video block and the StartTime of the first audio/subtitle block. That makes things ambiguous if the MKV has multiple video tracks, but I have never seen such an MKV in the wild. If I ever do then it would be time to think about what to do.
What is "IGS"?
There is no explicit delay field defined in the Matroska spec. You derive it from the difference between the StartTime of the first video block and the StartTime of the first audio/subtitle block. That makes things ambiguous if the MKV has multiple video tracks, but I have never seen such an MKV in the wild. If I ever do then it would be time to think about what to do.
What is "IGS"?
Re: Feature Requests
Interactive Graphics Subsystem
Re: Feature Requests
Demuxing of audio and pgs works as expected.
As to the delay of the pgs
MKVToolNix ignores the delay in the name of the subtitle, which is a good thing
I manually introduced the delay on the name to see the effect
Resulting example
If the delay to the first block was 1000ms, MKVToolNix would add 1000ms to the timestamps of all subtitles resulting in the the first PGS to start at 2000ms
Dolby Vision carries its metadata in a secondary 1080p stream
As to the delay of the pgs
MKVToolNix ignores the delay in the name of the subtitle, which is a good thing
I manually introduced the delay on the name to see the effect
Resulting example
If the delay to the first block was 1000ms, MKVToolNix would add 1000ms to the timestamps of all subtitles resulting in the the first PGS to start at 2000ms
Dolby Vision carries its metadata in a secondary 1080p stream
Re: Feature Requests
Thanks for the explanations.
So everything is good with what I am doing, then?
So everything is good with what I am doing, then?
Re: Feature Requests
All is good
Re: Feature Requests
Sweet. Thanks, Luis.
Do you do anything with chapters?
Do you do anything with chapters?
Re: Feature Requests
Not really, I create trimmed m2ts files with DGIndexNV from the main movie mpls
Give me a few minutes and I'll remux a mpls to mkv and check the chapters
Forgot about checking those, sorry about that
Give me a few minutes and I'll remux a mpls to mkv and check the chapters
Forgot about checking those, sorry about that
Re: Feature Requests
Does DGIndexNV-test demux the chapters from MKV?
Tried and it didn't give an option for it
Note
All this made me think of a feature request for your consideration after you finish the MKV stuff
Tried and it didn't give an option for it
Note
All this made me think of a feature request for your consideration after you finish the MKV stuff
Re: Feature Requests
No chapter support. I was trying to decide if it is worth it.
Please make your suggestion in the features thread as I have just split the threads. Thanks.
Please make your suggestion in the features thread as I have just split the threads. Thanks.
Re: Feature Requests
At 45 to get Divemaster license I have to learn how to swim again and better. Hard but necessary as it will be part of exams.
By design? Usually demuxing leaves audio tracks as they are. AFAIK the only way to correct it is to put it back when muxing again, reencoding or trimming in some way.