[RESOLVED] Issue with 4k file

Support forum for DGDecNV
Post Reply
DAE avatar
jpsdr
Posts: 214
Joined: Tue Sep 21, 2010 4:16 am

[RESOLVED] Issue with 4k file

Post by jpsdr »

I have issue with a 4k h264 MKV file comming from a camera. As it's comming from a camera, i don't think i am out of specs...
Output is totaly messed-up, sequences loop, well, you'll see.
I'll PM you information on my ftp server where you can get one file (i have around 120 like this one).
The file is in the DGIndexNV directory, notify me when you've retreive it.
User avatar
admin
Posts: 4551
Joined: Thu Sep 09, 2010 3:08 pm

Re: Issue with 4k file

Post by admin »

OK, finished downloading and duplicated your issue.

Interesting, it works fine in DGIndexNV but fails in DGDecodeNV. Also, if you demux the ES with mkvextract and use that, everything is fine. It's pointing to a bug in the MKV parser in DGDecodeNV. Investigating...
User avatar
admin
Posts: 4551
Joined: Thu Sep 09, 2010 3:08 pm

Re: Issue with 4k file

Post by admin »

Oy, this is a tough one. Waiting for a big burst of energy...

Workaround for now is to demux the ES and use that. You can do it with DGIndexNV.
DAE avatar
jpsdr
Posts: 214
Joined: Tue Sep 21, 2010 4:16 am

Re: Issue with 4k file

Post by jpsdr »

So, for now, you're suggesting for working on all my files to do something like this :

Code: Select all

for %%f in (*.mkv) do DGIndexNV -i %%f -od %%~nf.dgi -e
for %%f in (*.264) do DGIndexNV -i %%f -o %%~nf.dgi -e
First, extracting the video stream, and then, recreate the dgi from these extracted video stream ?
Am i correct ?
User avatar
admin
Posts: 4551
Joined: Thu Sep 09, 2010 3:08 pm

Re: Issue with 4k file

Post by admin »

Yes, that is correct. You can also remux to TS or MP4.
DAE avatar
jpsdr
Posts: 214
Joined: Tue Sep 21, 2010 4:16 am

Re: Issue with 4k file

Post by jpsdr »

I've put another 4k file on the same place.
This time it's an mp4 file, i've splitted it and provided only the first 100Mb.
No issue with the video, but the reported audio in the "Information" windows is not correct.
Notify me when you've retreive it, and/or if you need the whole file.
User avatar
admin
Posts: 4551
Joined: Thu Sep 09, 2010 3:08 pm

Re: Issue with 4k file

Post by admin »

OK, I have it. Note also that audio demux doesn't work for this stream. I will fix both.
User avatar
admin
Posts: 4551
Joined: Thu Sep 09, 2010 3:08 pm

Re: Issue with 4k file

Post by admin »

Here's some technical explanation on the MKV issue...

I started with some MKV parser code from the Matroska guys. When I implemented MKV support I had noticed an anomaly with seeking that I thought was a bug. I implemented a workaround in my application level, but it was heuristic and not based on a real understanding of the root cause. Now I have invested some time and know the true cause. The seek code in the parser assumes closed GOPs. That means with open GOPs you may not get exactly the timecode that you request. That is tolerable for a player but not for a frame-accurate source filter! I know what I have to do to fix it and am studying my options in that regard.
DAE avatar
jpsdr
Posts: 214
Joined: Tue Sep 21, 2010 4:16 am

Re: Issue with 4k file

Post by jpsdr »

Houaa... This workaround was somehow very good, because open gop is something very common.
And maybe running (or '"playing") the file instead of seeking (when running a VDub job/process for exemple) may also reduce the case of error. But, with this file, even the result of a VDub job (without even seeking) was messed up.
Of course,i've noticed only afterward, when watching the avi result files...
Anyway, thanks for these informations. The workaround you provided in previous post allow me to be able to continue to work and not be stalled.
This work was more critical than my other works, because it requires more time from mise side (Editing, etc...), and i have this kind of time only during my holydays, so not being stalled was very appreciated for being able to continue right now, and not postpone to a very later time waiting another holydays.
User avatar
admin
Posts: 4551
Joined: Thu Sep 09, 2010 3:08 pm

Re: Issue with 4k file

Post by admin »

Trust you to notice the nuances! Yes, there is another issue with linear play. I am working on that now as I have fixed the open GOP issue.
User avatar
admin
Posts: 4551
Joined: Thu Sep 09, 2010 3:08 pm

Re: Issue with 4k file

Post by admin »

I found and fixed the second MKV issue. In DGDecodeNV (DGIndexNV is OK), when the MKV file's CodecPrivate stored more than one PPS, I was delivering only the first one multiple times. So I missed delivering the PPS needed for the non-reference frames, causing the decoder to deliver only the IDR frames. That is why when you single-stepped in VirtualDub it erroneously moved by GOP. :shock:

Moving on to your MP4 audio issue now...
User avatar
admin
Posts: 4551
Joined: Thu Sep 09, 2010 3:08 pm

Re: Issue with 4k file

Post by admin »

I slipstreamed the MKV fix into 2052. Please test it and report your results.

Regarding the PCM in MP4, it's not formally supported by the MP4 spec. If you can point me to an applicable spec, I will consider supporting it, but honestly I'd rather not bother. How did you make that file?
DAE avatar
jpsdr
Posts: 214
Joined: Tue Sep 21, 2010 4:16 am

Re: Issue with 4k file

Post by jpsdr »

It's not me who made this file, it's someone else who recorded it, and he gave me all of his files comming from his recording. But now, indeed, it's odd having one mp4 file when all others 4k files are mkv... I also have mp4 from this recording, but they are 1080p, not 4k, and audio is aac.
Anyway, I've been able to get the audio using the ffmpeg VDub pluggin of karlpritchett.
Well, if according your informations this file is out of spec, in that case, don't bother with it.
For testing.... As i've finished my project (thanks to the workaround you provided) and needed place, i've deleted my files... :facepalm:
As you have one complete file, and fixed it on your side with it, i think the issue can be said to be solved.
Post Reply