[RESOLVED] 2 Issues I hit today

Support forum for DGDecNV
User avatar
MeteorRain
Moose Approved
Posts: 127
Joined: Fri Jul 25, 2014 4:04 pm
Location: New Jersey

[RESOLVED] 2 Issues I hit today

Post by MeteorRain » Sun Dec 29, 2019 4:59 am

One is a regression. I've been using b179 for a good while, and I can reload the avs script inside VD2 with no problem. In the progress of debugging the 2nd issue, I tried b198 which is the latest. Every time I reload the avs script inside VD2 it crashes.

---------------------------
DGSource
---------------------------
cuMemHostAlloc() failed
---------------------------

I happen to have b187 and b188. b187 is last known good, and b188 is the first known bad. I guess it has something to do with the new 8k support, but I'm not 100% sure. Yes I'm still on RTX 950 2G, and the file I'm opening is 1440x1080 MPEG2 TS, using VirtualDub2 build 43702 32-bit.

==========

2nd issue is the main issue I hit today. I have a fairly long video capped, a TV program. It has 543022 frames. Eac3to thinks the stream is clean and my video player doesn't complain about it.

Code: Select all

dgsource("main.dgi")
pointresize(960,544)
This works perfectly from top to bottom.

Code: Select all

dgsource("main.dgi",deinterlace=1)
pointresize(960,544)
This works perfectly from top to bottom.

Code: Select all

dgsource("main.dgi",deinterlace=2)
pointresize(960,544)
This doesn't work when seeking or playing beyond 1000063 frames. Immediately after 1000063 frames all I see is black image, even when seeking back below 1000063 frames, and reload the video is the only choice.

Seeking to 104xxxx frames could somehow make it produce some correct images, but seeking still cause decoding issues.

Image


I can reproduce it by trim the clip:

Code: Select all

dgsource("main.dgi",deinterlace=2)
pointresize(960,544)
trim(1000000,0)
This triggers the issue at frame #63.

Tested against both b179 and b198. Behavior is exact the same.

However if I simply cut the TS video (using a raw binary file cutter) and re-index, the result works perfectly. I cut at 29292768800 bytes which is about 490000 (980000 at double rate) frames, leaving the remaining 53000 (106000 at double rate) frames.

Any ideas?

User avatar
Rocky
Moose Approved
Posts: 646
Joined: Fri Sep 06, 2019 12:57 pm

Re: 2 Issues I hit today

Post by Rocky » Sun Dec 29, 2019 11:20 am

Ooh, that's not good.

I'll look at the reload issue today. I assume you mean 'File/Reopen video file'. If not, please advise.

On the second issue, is there any chance to upload the stream to my ftp? Maybe you can cut it down if needed such that it still fails.

User avatar
Rocky
Moose Approved
Posts: 646
Joined: Fri Sep 06, 2019 12:57 pm

Re: 2 Issues I hit today

Post by Rocky » Sun Dec 29, 2019 1:20 pm

Due to a quirk of VirtualDub(2) reload function, a constructor on the new instance of DGDecodeNV is called before the destructor on the first instance. So you need enough memory to allocate twice.

EDIT: Ah, just tested 32-bit and was able to reproduce the failure. Works for me with 64-bit stuff. I'll look into it, but why can't you use 64-bit?

EDIT2: I've experimented with a lot of things and I just can't find a way to get enough memory on 32-bit windows to allow the reload function to work.

User avatar
Mr. Peabody
Posts: 12
Joined: Tue Dec 24, 2019 10:20 am

Re: 2 Issues I hit today

Post by Mr. Peabody » Sun Dec 29, 2019 3:34 pm

The 8K support could be disabled for 32-bit operation. However, do we want ugly warts just to salvage the 32-bit reload in VirtualDub(2)? Methinks not. With the status quo 8K can still be opened in 32-bit, although VirtualDub(2) reload fails.

User avatar
Natasha
Posts: 43
Joined: Wed Nov 20, 2019 12:11 pm

Re: 2 Issues I hit today

Post by Natasha » Sun Dec 29, 2019 3:45 pm

Not so simple. You can open the script multiple times no problem. So a simple reload goes bananas? Think about it!

Fake news about hospital is joke. Be careful, or I drink you dry.

User avatar
MeteorRain
Moose Approved
Posts: 127
Joined: Fri Jul 25, 2014 4:04 pm
Location: New Jersey

Re: 2 Issues I hit today

Post by MeteorRain » Sun Dec 29, 2019 5:29 pm

Rocky wrote:
Sun Dec 29, 2019 11:20 am
On the second issue, is there any chance to upload the stream to my ftp? Maybe you can cut it down if needed such that it still fails.
Cut it down and problem seems to go away.

I'm not sure if it has anything to do with the number 1000000 but looks suspicious.

Because if I disable double rate deinterlace (which make it <600000 frames) problem also goes away.

I just cut 180MB off the head so full video moves forward. Problem starts at the new 1000063 frames after cut.

Where can I upload? It's around 32GB. I'll upload RAR part volumes if you don't mind.
Last edited by MeteorRain on Sun Dec 29, 2019 5:35 pm, edited 1 time in total.

User avatar
MeteorRain
Moose Approved
Posts: 127
Joined: Fri Jul 25, 2014 4:04 pm
Location: New Jersey

Re: 2 Issues I hit today

Post by MeteorRain » Sun Dec 29, 2019 5:34 pm

Rocky wrote:
Sun Dec 29, 2019 1:20 pm
EDIT: Ah, just tested 32-bit and was able to reproduce the failure. Works for me with 64-bit stuff. I'll look into it, but why can't you use 64-bit?

EDIT2: I've experimented with a lot of things and I just can't find a way to get enough memory on 32-bit windows to allow the reload function to work.
I could. But my encoding farm and lots of filters are still on 32-bit and I haven't invest the time to sort that out and maybe rewrite lots of C code.

For the time being I think I can switch to 64-bit for previewing and still use 32-bit for encoding. (Unfortunately the farm doesn't have graphics cards so I'm using traditional DG, which still works perfectly by the way.) It's not a blocker issue to me, and I just want to brought the regression issue to your attention.

User avatar
Rocky
Moose Approved
Posts: 646
Joined: Fri Sep 06, 2019 12:57 pm

Re: 2 Issues I hit today

Post by Rocky » Sun Dec 29, 2019 6:29 pm

Sending ftp details by PM. Upload the full unprocessed source. Thank you so much. Together, all is possible.

There is no coded limit of 1000000 frames anywhere in DGDecNV. So I'm curious about this.

Too bad for win32. :cry:

User avatar
Mr. Peabody
Posts: 12
Joined: Tue Dec 24, 2019 10:20 am

Re: 2 Issues I hit today

Post by Mr. Peabody » Mon Dec 30, 2019 12:49 pm

With respect to Natasha's comment, the limits are per-process. Opening the script in multiple VirtualDub(2) instances involves multiple processes, whereas the reload involves only one process.

Fortunately there is a simple solution to this problem. DGDecNV has MAX_WIDTH and MAX_HEIGHT of 8192 and 8192. Changing this to 7680 and 4320 (max 8K resolution for UHD) allows the reload to succeed in 32-bit.

User avatar
Rocky
Moose Approved
Posts: 646
Joined: Fri Sep 06, 2019 12:57 pm

Re: 2 Issues I hit today

Post by Rocky » Mon Dec 30, 2019 12:51 pm

Thank you, Mr. Peabody. That's what we'll do!

Investigating issue 2...

Post Reply