Page 1 of 2

[RESOLVED] Curious MKV not opening

Posted: Sun Jul 19, 2020 9:08 am
by Rocky
[Received in PM so posted here for proper tracking.]

Can you please check this mkv? DGIndexNV 211 cannot open it or index it.

http://rationalqm.us/misc/test.mkv

Originally it was recorded .ts, cutted in Videoredo 6 and saved as "untouched" mkv.

FFMS2 works just fine with this file.

I hope you figure it out, thanks! :salute:

Re: Curious MKV not opening

Posted: Sun Jul 19, 2020 9:09 am
by Rocky
Investigating...

Re: Curious MKV not opening

Posted: Sun Jul 19, 2020 9:14 am
by Curly
Time to upgrade the ancient MKV support code?

Re: Curious MKV not opening

Posted: Sun Jul 19, 2020 9:14 am
by Rocky
You could be right. Are you busy?

Re: Curious MKV not opening

Posted: Sun Jul 19, 2020 10:14 am
by Guest
According to MediaInfo the MKV is format version 4
A recent remux of mine with MKVToolNix (46) is version 2

Remuxed test.mkv with MkvToolNix 46 and DGIndexNV can now open it
So I remuxed it with MKVToolNix 48 and DGIndexNV opens it fine
Version is still 2, DGIndexNV is 210

Re: Curious MKV not opening

Posted: Sun Jul 19, 2020 10:34 am
by Rocky
Thank you, gonca. :salute: I knew that remuxing "fixed" it, but hadn't figured out why. Now we know. I will see if I can add support for version 4.

Re: Curious MKV not opening

Posted: Sun Jul 19, 2020 11:51 am
by Rocky
The old parser wasn't properly ignoring the version 4 cue elements. I made a hack that appears reasonable and allows test.mkv to play while not breaking version 2 files. I call it a hack because I don't fully understand the EBML parser in that ancient code; should spend some time figuring out how it works. I would really appreciate getting some other version 4 samples to test this properly. If y'all have any please cough 'em up. Ta.

Re: [RESOLVED] Curious MKV not opening

Posted: Wed Jul 22, 2020 5:36 am
by Rocky
Fixed in slipstream 212. Marking RESOLVED.

Re: [RESOLVED] Curious MKV not opening

Posted: Fri Jul 24, 2020 9:35 am
by kebulek
Thanks for the fix!

BUT with new version 212b I noticed very long initialization/opening of avs script, it's like 12s+ freezing. It is visible even in seeking, when you doing like 30min jumps or you jump straight to the end. I saw it in latest AvsPmod, VDub or x264/x265. :scratch:

Re: [RESOLVED] Curious MKV not opening

Posted: Fri Jul 24, 2020 10:25 am
by Rocky
I'm not seeing that with the test.mkv file you gave us, or with a longer version 4 file I found online. Did you update both DGIndexNV.exe and DGDecodeNV.dll? If so, can you provide a sample that exhibits this behavior and your script? Thank you.

Re: [RESOLVED] Curious MKV not opening

Posted: Fri Jul 24, 2020 12:19 pm
by kebulek
Looks like it happens only with longer/bigger mkvs (not with short/small ones) made by VRD6 or MKVMerge 48. Old mkvs (v2) open immediately.

So do you have bigger mkv? Try remux it with new mkvmerge, open it with DGIndexNV and you'll see, hopefuly...

Re: Curious MKV not opening

Posted: Fri Jul 24, 2020 12:30 pm
by Rocky
Link to mkvmerge 48 please? I have mkvtoolnix 21.0.0. How big is big enough? Can I simply mux some streams from a bluray, i.e., the source doesn't have to be an MKV?

Re: Curious MKV not opening

Posted: Fri Jul 24, 2020 1:16 pm
by renols
Hi.

I can confirm the same thing.

Link to latest mkvtoolnix is: https://mkvtoolnix.download/downloads.html#windows

The mkv file I have tested with has been made by mkvmerge v40, and mediainfo shows it as a mkv version 4 file.
The file is around 8GB in size.

With the most recent 212 it takes a while for the file to load. Making small jump at the start of the movie is almost instant, but the closer
you get to the end of the file, the longer it takes. Even small jumps at the end of the file takes more than 20 seconds. It is as if it has to parse the entire file each time a jump is made or something. Hence the jumps are almost instant at start of file, and takes long at end of file.

Tried the same file with build 210, and the loading is almost instant, and doing jumps with the slider is almost instant as well. It doesn't matter if you are at the start and then click the slider bar almost at the end, it just moves there instantly, whereas 212 can take more than 20 seconds to do the same thing.

I guess you can mux whatever into the mkv container and it will show the same issue.

renols

Re: Curious MKV not opening

Posted: Fri Jul 24, 2020 5:34 pm
by Rocky
OK, I'm going to back out the change and go back to the drawing board. You seem to say that some version 4 files worked with 210. If so, then there is something else about the test.mkv that is curious. I'll try to get a backed-out version out tonight.

Re: Curious MKV not opening

Posted: Fri Jul 24, 2020 7:32 pm
by kebulek
Maybe it's VRD6's fault and sometimes make a bad mkv? It's still new and full of bugs...

Re: Curious MKV not opening

Posted: Fri Jul 24, 2020 9:08 pm
by Rocky
That's what I want to believe too, because looking more at my parser it was already properly ignoring version 4 things. My hack was totally non-kosher. I have no idea why it worked for test.mkv. Continuing tomorrow...

Re: Curious MKV not opening

Posted: Sat Jul 25, 2020 12:44 am
by renols
Hi.

The mkv file I used has nothing to do with VideoRedo.

It is a plain encoded mkv file encoded with x264 (3015) and then muxed with mkvmerge v40 to add audio and some sup files.
It is that resulting mkv files I am opening in dgindexnv.

Whatever changed between 210 and 212 in the mkv parsing code has made a big difference when using the slider to jump forth and back on the timeline.

I hardly ever open mkv files in dgindexnv, and only tried it because I read this thread.

renols

Re: Curious MKV not opening

Posted: Sat Jul 25, 2020 7:29 am
by Rocky
Re-download 2053. I have backed out the MKV changes that caused this issue. Back to the drawing board on test.mkv.

Re: Curious MKV not opening

Posted: Sat Jul 25, 2020 9:05 am
by renols
Rocky wrote:
Sat Jul 25, 2020 7:29 am
Re-download 2053. I have backed out the MKV changes that caused this issue. Back to the drawing board on test.mkv.
Works as expected. Moving around on the slide bar is now instant again.

Do we know if that test.mkv file is even mkv compliant?

I don't know if Mediainfo can be trusted on this, but it shows MKV version 4, even for mkv files created years ago.

renols

Re: Curious MKV not opening

Posted: Sat Jul 25, 2020 9:18 am
by Rocky
renols wrote:
Sat Jul 25, 2020 9:05 am
Do we know if that test.mkv file is even mkv compliant
I don't know. How would you test that?

Re: Curious MKV not opening

Posted: Sat Jul 25, 2020 9:48 am
by kebulek
Maybe you can ask Mosu for an advice? :scratch:

Re: Curious MKV not opening

Posted: Sat Jul 25, 2020 9:58 am
by Guest
As per mkvalidator
4 warnings about CUEs but the file is valid
test.png

Re: Curious MKV not opening

Posted: Sat Jul 25, 2020 10:06 am
by Rocky
Seems I'm not the only one that has had issues with this kind of MKV muxed by ffmpeg:

https://trac.ffmpeg.org/ticket/4774?cve ... num_hist=3
https://github.com/Nevcairiel/LAVFilters/issues/120

Re: Curious MKV not opening

Posted: Sat Jul 25, 2020 10:52 am
by Rocky
Output from EAC3TO:

C:\Users\Don\Downloads>c:\standalone\eac3to\eac3to test.mkv
MKV, 1 video track, 1 audio track, 1 subtitle track, 0:00:18, 50i
1: h264/AVC, 1080i50 (16:9)
2: AC3, Czech, 5.1 channels, 384kbps, 48kHz, dialnorm: -23dB
3: DVBSUB, Czech
Bitstream parsing for track 3 failed.
Demuxing this track may still produce correct results - or not.

Really tempted to dismiss this as a broken file. However, let's see if there is a fix/workaround before doing that.

Re: Curious MKV not opening

Posted: Sat Jul 25, 2020 12:04 pm
by kebulek
BTW test.mkv surprisingly works with old DGIndexIM! :)