[RESOLVED] DGDecNV, mkv's and delays

Support forum for DGDecNV
Post Reply
DAE avatar
Guest 3
Posts: 67
Joined: Mon Mar 26, 2018 6:00 am

[RESOLVED] DGDecNV, mkv's and delays

Post by Guest 3 »

DGDecNV, mkv's and delays.

Using DGIndexNV to index and demux a mkv I see a file with the name:
V102_track2_spa_DELAY -140720678ms.ac3

Of course the delay can't be more than 39 hours and I make some test generating mkv's with MkvToolNixGUI.

1) We can't create mkv's with negative delays in a track.
If we put a negative value the track is cutted in the needed frames to obtain a positive value and that is stored in the mkv.
That is coherent with extracted timestamps (or timecodes), always star by 0 or a positive value.

2) We can put delays to video or audio tracks, the problem occurs when put a delay to a video track greater that the delay to the audio track
MediaInfo and Eac3to calculate only the audio track delay like the "Delay relative to video" than can be positive or negative.
But DGIndexNV put a nonsense value to the audio delay, but calculate the correct difference and put it in the .dgi (IDR value)

Some samples:

Code: Select all

mkv video delay  audio delay  audio DELAY name  IDR in .dgi
---------------  -----------  ----------------  -----------
      0 ms           80 ms          80 ms           0
     20 ms           70 ms          50 ms           0
     90 ms           30 ms     -140720463 ms    60000000
     80 ms            0 ms     -140720463 ms    80000000
The IDR values seems be ignored by DgSource and suply to AviSynth the same video in all samples.
I think than DGIndexNV must generate the audio name with -60 ms and -80 ms (IDR/1000000).
DAE avatar
Guest

Re: DGDecNV, mkv's and delays

Post by Guest »

Was this a trimmed mkv?
DAE avatar
Guest 3
Posts: 67
Joined: Mon Mar 26, 2018 6:00 am

Re: DGDecNV, mkv's and delays

Post by Guest 3 »

Nope, and the samples was created by me with the same video and audio.
DAE avatar
Guest

Re: DGDecNV, mkv's and delays

Post by Guest »

Just tried a mkv created by MKVToolNIXGUI from a disc
DGIndexNV demuxed and indexed apparently normal
Your reference to IDR value and delays, That value indicates a timestamp for an IDR frame in mkvs
MediaInfo and Eac3to calculate only the audio track delay like the "Delay relative to video"
MediaInfo will also report video delay as reported by container
What is the name of the disc that you are getting your samples from?
DAE avatar
Guest 3
Posts: 67
Joined: Mon Mar 26, 2018 6:00 am

Re: DGDecNV, mkv's and delays

Post by Guest 3 »

The first one mkv was created converting a .ts container from a TV capture. With BD sources I never see that problem.
The 4 samples to show the 4 options was created by me, with video (recompressed) and audio from the first sample, but with different delays for the tracks in MkvToolNixGUI.

The original was like the 4º sample, first timestamp for video 80 ms (I know is the IDR value), first timestamp for audio 0 ms.
I don't know for what from original the audio DELAY is -140720678ms and in my sample is -140720463ms with same timestamps.

I don't know how DGIndexNV calculate these delays but they're obviously useless.
Like DGsource ignore IDR values and supply the video without delay, the usefull name DELAY for the audio extracted is -80ms (like eac3to show) to use it to preserve the sync.

EDIT:
The timestamps for samples 2º and 3º are the same than the delay inserted in MkvToolNix then is not mkvmerge than do the difference 70 -20 = 50 ms (well calculated by DGIndexNV), or 30 - 90 = -60 (well calculated for the IDR value but wrong for the audio DELAY)
User avatar
Rocky
Posts: 3605
Joined: Fri Sep 06, 2019 12:57 pm

Re: DGDecNV, mkv's and delays

Post by Rocky »

I couldn't duplicate any issue when making an MKV with video delay 80 + audio delay 0. I tried both with and without 'Fix bitstream timing info'.

If you want this fixed, please link me to a sample MKV that shows this problem.
DAE avatar
Guest 3
Posts: 67
Joined: Mon Mar 26, 2018 6:00 am

Re: DGDecNV, mkv's and delays

Post by Guest 3 »

I make a little sample, test_delay.mkv:
27/11/2020 18:51 669.803 test_delay.7z
27/11/2020 18:49 9.601 test_delay.dgi
27/11/2020 18:48 1.390.422 test_delay.mkv
27/11/2020 18:49 1.232.896 test_delay_track2_eng_DELAY -140720463ms.ac3
The first dgi lines (to see DGIndexNV version):
DGAVCIndexFileNV22 DGIndexNV 2053.0.0.221 X64
C:\Portable\Avs\DGNV\

D:\Temp\t\test_delay.mkv 1390422

DEVICE 0
DECODE_MODES 0,0,0,0,0
STREAM 2 0
RANGE 0 0 18446744073709551615 0
DEMUX 2
DEPTH 8
ASPECT 0 0
COLORIMETRY 2 2 2

IDR 80000000
Attachments
test_delay.7z
(654.1 KiB) Downloaded 374 times
User avatar
Rocky
Posts: 3605
Joined: Fri Sep 06, 2019 12:57 pm

Re: DGDecNV, mkv's and delays

Post by Rocky »

Thank you!

Fixed here:

http://rationalqm.us/misc/DGIndexNV_rc7.rar

The problem was that I had assumed that the first frame must be a video frame. That is not necessarily true.
DAE avatar
Guest 3
Posts: 67
Joined: Mon Mar 26, 2018 6:00 am

Re: [RESOLVED] DGDecNV, mkv's and delays

Post by Guest 3 »

Perfect, thank you.
Post Reply