Page 1 of 1

[RESOLVED] Problematic stream

Posted: Tue Mar 07, 2017 8:08 am
by AJR
Hello,

I have one h264 TS stream which throw me some errors using DGDecNV. VideoReDo has no problem with this stream. Can you please check it?
I have upload two files and send you download link to PM:

1) small part of original TS - video.ts, it just show me first error window. No matter what I hit if YES or NO, it wont open the stream. I can play this file with MPC-HC without problem.
2) much bigger part of original TS demuxed by VideoReDo to *.h264, with this file DGDecNV show another error. I can play also this file with MPC-HC without problem.

Please try both files and let me know if found anything for fix or do you think the original TS file is just corrupted? If so why VideoReDo has no problem with it? ;)

I have tested it with latest 2053 and also some older versions 2052-2050. It doesnt work with any version. Other streams work fine, so I guess my problem is not related to HW(mobile GTX850) or license issue.

Thank you

Re: Problematic stream

Posted: Tue Mar 07, 2017 10:15 am
by admin
Downloading to investigate...

Re: Problematic stream

Posted: Tue Mar 07, 2017 11:31 am
by admin
I need to get the full original TS from which the h264 was demuxed by VideoRedo. CUVID does not like the first SPS in the demuxed ES. H.264 Video ES Viewer also sees problems with the SPS. The ES also fails an Assert() in the reference decoder, so there may be something fishy with it. I want to see if the original TS is also affected before digging further. Yes, I realize that you say it plays fine in MPC-HC, but I not have source code for the decoder being used.

While I wait for that I'll look into the audio mismatch seen with video.ts.

Re: Problematic stream

Posted: Tue Mar 07, 2017 2:35 pm
by AJR
Ok, I will upload original TS file. Give me a time ;)

Re: Problematic stream

Posted: Tue Mar 07, 2017 3:33 pm
by admin
Take your time. I've progressed somewhat. It runs OK with the nVidia decode sample and an old decoder I made as a proof of concept for DGDecNV. So something appears to be wrong in my backyard. I'm homing in on it.

Re: Problematic stream

Posted: Tue Mar 07, 2017 5:26 pm
by admin
It's a bug in my NALU parser. Some strange combination in that file is getting her confused. Should be fixable without too much trouble.

Re: Problematic stream

Posted: Tue Mar 07, 2017 5:32 pm
by AJR
Good news, thank you for your time!

Re: Problematic stream

Posted: Tue Mar 07, 2017 7:59 pm
by admin
False alarm. It wasn't the NALU parser. Still searching... This is a tough one. :facepalm:

Re: Problematic stream

Posted: Tue Mar 07, 2017 8:14 pm
by admin
If I open your original TS and hit cancel on the audio popup then that plays fine. Then I demux it with DGIndexNV and the resulting ES plays fine. So it is looking like something strange from the VideoRedo demuxing. I do see some custom SEIs in the demuxed file so maybe it is related to that.

Re: Problematic stream

Posted: Tue Mar 07, 2017 9:28 pm
by admin
Ha, I got it! It was the VideoRedo SEI after all. It's legal but it was doing something I never anticipated. I worked for 10 solid hours to find this (with a half hour beer break).

Technical details: When the semantic contents of a NALU contain 00 00 01 it gets mapped to 00 00 03 01 to prevent start code emulation. When I process SEI's I remove the 03's so that my parser can work correctly on the NALU. But when I pass the NALU to the CUVID decoder I have to leave the 03's in there (he also doesn't want to hit emulated start codes). I was doing this for all NALU types except for...wait for it...SEIs. Now this is the first time I have ever encountered an SEI containing an escaped start code like that. I added this handling for SEIs and everything works fine with video2.h264.

I also fixed the audio mismatch problem for video.ts. DVB subtitling was being detected as AC3 audio.

Tomorrow I'll slipstream these fixes and my new CUDA filter DGSharpen.

Re: Problematic stream

Posted: Wed Mar 08, 2017 12:42 am
by AJR
Superb! You are the master ;)

Re: Problematic stream

Posted: Wed Mar 08, 2017 1:11 pm
by admin
My pleasure. Thank you for bringing these issues to my attention. The fixes have been uploaded.