DGSource seems to be delivering incorrect aspect ratio ?

Support forum for DGDecNV
User avatar
hydra3333
Posts: 394
Joined: Wed Oct 06, 2010 3:34 am
Contact:

Re: [Solved] DGSource seems to be delivering incorrect aspect ratio ?

Post by hydra3333 »

I got a green video alright when I finally looked at it ... I was focused on the logs.
I really do like it here.
User avatar
hydra3333
Posts: 394
Joined: Wed Oct 06, 2010 3:34 am
Contact:

Re: [Solved] DGSource seems to be delivering incorrect aspect ratio ?

Post by hydra3333 »

Rocky wrote:
Sun Aug 02, 2020 11:26 am
Hmm, now SOLVED or RESOLVED? :scratch:

https://englishlessonsbrighton.co.uk/wh ... d-resolve/
he he, I used to work for the gov't where the worth of a report was assessed by the "n grams" method ... don't get me started ;)
edit: oh, in the US that'd be "n ounces" or something I guess
I really do like it here.
User avatar
Rocky
Posts: 3556
Joined: Fri Sep 06, 2019 12:57 pm

Re: [SOLVED] DGSource seems to be delivering incorrect aspect ratio ?

Post by Rocky »

:scratch: :?:
User avatar
hydra3333
Posts: 394
Joined: Wed Oct 06, 2010 3:34 am
Contact:

Re: [SOLVED] DGSource seems to be delivering incorrect aspect ratio ?

Post by hydra3333 »

Rocky wrote:
Sun Aug 02, 2020 6:05 pm
:scratch: :?:
... although I'm lazier nowadays, playing with English was the name of the game back in the day, if one wanted to get on in gov't. The more verbose it was, the weightier the report was, and of course the more valuable it must have been ! ;) Hence, "n grams" where the greater the n the greater the obvious value :)
I really do like it here.
User avatar
Rocky
Posts: 3556
Joined: Fri Sep 06, 2019 12:57 pm

Re: [SOLVED] DGSource seems to be delivering incorrect aspect ratio ?

Post by Rocky »

I see, yes. Thank you for the explanation. Writing is hard and exhausting for me; still I enjoy it in moderation. Sky writing!
User avatar
hydra3333
Posts: 394
Joined: Wed Oct 06, 2010 3:34 am
Contact:

Re: [RESOLVED] DGSource seems to be delivering incorrect aspect ratio ?

Post by hydra3333 »

Hello.

I got some aspect ratio problems again "recently" after a NV download. Well, I'm lazy, I worked around it via ffmpeg commandline option and forgot about it for some time.

Just wondering, it really is a funny world, would it be possible for the aspect ratio fix to have become unfixed, or is it somehow me ?

Separately and while I'm here, asking your opinion if you're prepared to give it :-
Someone purporting to be "Sabine Hossenfelder" has a "for dummies" science/physics type youtube channel which has a lot of interesting videos for lay people (like me), however she is said to be German but has what appears to be a Russian accent.
Would you happen know offhand if she's real, or fake ?
Not that I expect fake things on the internet or anything ;) ...
https://www.youtube.com/watch?v=nGVIJSW0Y3k (this example video is well off-topic for her and funny, if a tad pointed; she goes off at lefties and righties and "follow the science").
Thanks
I really do like it here.
User avatar
Rocky
Posts: 3556
Joined: Fri Sep 06, 2019 12:57 pm

Re: [RESOLVED] DGSource seems to be delivering incorrect aspect ratio ?

Post by Rocky »

Regarding aspect ratio stuff, please post a source sample and method to duplicate your issue. I am not aware of any regressions in this area.

Regarding Sabine Hossenfelder, she's a "science populizer" and a mainstream quantum mysterian (she believes in quantum nonlocality, which she tries to account for with "superdeterminism"). She doesn't appear to have any significant original research in QM, but correct me if I have missed anything.

Her blog is here:

http://backreaction.blogspot.com

She'll be happy to talk to you for $150 per hour. :roll:

http://backreaction.blogspot.com/p/talk ... st_27.html

Bargain basement. Any competent consultant makes 300-500/hour.

She uses sensationalism (a form of rhetoric) to draw attention to herself. For example, using profanity in her videos and blog, wearing a mask in her avatar, calling people stupid, etc. This is how people with no really significant ideas behave. It's all about Sabine!
User avatar
hydra3333
Posts: 394
Joined: Wed Oct 06, 2010 3:34 am
Contact:

Re: [RESOLVED] DGSource seems to be delivering incorrect aspect ratio ?

Post by hydra3333 »

OK and Thanks.

I'll try to locate a recent source.
I really do like it here.
DAE avatar
JKyle
Posts: 9
Joined: Sun May 24, 2020 2:29 pm

[RESOLVED] DGSource seems to be delivering incorrect aspect ratio ?

Post by JKyle »

I'm afraid this AR issue is not resolved yet.
It seems that DGSource passes on a reversed DAR value as a SAR value for some videos in VapourSynth.

Here's the sample video: here.

Its SAR is 1:1 and DAR is 16:9. You can see that in DGIndexNV too.

Image

The vpy is very simple:

Code: Select all

import os, sys
import vapoursynth as vs
core = vs.get_core()

sys.path.append(r"D:\Utilities\StaxRip\Apps\Plugins\VS\Scripts")
core.std.LoadPlugin(r"D:\Utilities\StaxRip\Settings\Plugins\Dual\DGDecNV\DGDecodeNV.dll")
clip = core.dgdecodenv.DGSource(r"D:\Downloads\test_1audio_temp\test_1audio.dgi", deinterlace=0, fieldop=0)
clip.set_output()
But when this script is passed to x265, a wrong SAR value (=reversed DAR) is passed on.
x265 3.4+65-aMod(GCC10.2.1) DJATOM

D:\Utilities\StaxRip\Apps\Encoders\x265\x265.exe --crf 27 --output-depth 10 --output D:\Downloads\test_1audio_temp\test_1audio_DGSource_x265-direct-input_out.hevc D:\Downloads\test_1audio_temp\test_1audio_DGSource_x265-direct-input.vpy

vpy [info]: 1920x1080 fps 24000/1001 i420p8 sar 9:16 frames 0 - 2478 of 2479
...
At first, I thought this was an issue with the x265 build, so I reported an issue on its repo.

Here.

The author agreed to add an option to ignore the SAR value passed on by the script just like vspipe does.
But, the issue still remains: it seems that DGSource passes on a reversed DAR value as the SAR value in VapourSynth.

Can you please take a look into this? Thanks.
User avatar
Curly
Posts: 712
Joined: Sun Mar 15, 2020 11:05 am

[RESOLVED] DGSource seems to be delivering incorrect aspect ratio ?

Post by Curly »

Thanks man. Two things seem to have gone wrong.

1. Confusion about meaning of SAR. Vapoursynth is apparently using "SAR" as "pixel (sample) aspect ratio", but that is strictly the PAR, while SAR is the "storage aspect ratio", and is inferred as DAR/PAR. So we tried to calculate and return SAR thus defined. But when that was coded, it was erroneously inverted.

2. Vapoursynth says it wants the SAR with _SARNum/_SARDen, but interpreting SAR as PAR would require returning the PAR in _SARNum/_SARDen.

So, bottom line, we will change it to return the PAR. That would always be 1:1 for HD and may be != 1:1 for SD (could be NTSC or PAL).

Please confirm this is what you want and we'll make a slipstream right away. We also have a Doom9 thread asking Myrsloik to confirm this interpretation.
User avatar
Curly
Posts: 712
Joined: Sun Mar 15, 2020 11:05 am

[RESOLVED] DGSource seems to be delivering incorrect aspect ratio ?

Post by Curly »

OK, let's just go ahead with this interpretation. We will return the PAR.
User avatar
DJATOM
Posts: 176
Joined: Fri Oct 16, 2015 6:14 pm

[RESOLVED] DGSource seems to be delivering incorrect aspect ratio ?

Post by DJATOM »

Yes, it's also confusing for me. I believe your interpretation is correct. x265's code says

Code: Select all

        /* Sample Aspect Ratio width in arbitrary units to be added to the VUI
         * only if aspectRatioIdc is set to X265_EXTENDED_SAR.  This is the width
         * of an individual pixel. If this is set then sarHeight must also be set */
        int sarWidth;

        /* Sample Aspect Ratio height in arbitrary units to be added to the VUI.
         * only if aspectRatioIdc is set to X265_EXTENDED_SAR.  This is the width
         * of an individual pixel. If this is set then sarWidth must also be set */
        int sarHeight;
So width is the "Num" and height is the "Den"? I got it right? :scratch:
User avatar
Bullwinkle
Posts: 338
Joined: Thu Sep 05, 2019 6:37 pm

[RESOLVED] DGSource seems to be delivering incorrect aspect ratio ?

Post by Bullwinkle »

Yes, AFAIK the ratio is always width/height.
DAE avatar
JKyle
Posts: 9
Joined: Sun May 24, 2020 2:29 pm

[RESOLVED] DGSource seems to be delivering incorrect aspect ratio ?

Post by JKyle »

I confirm this issue is fixed in the new binary.

Image

Thank you. :salute:

---

BTW, DGDemux.exe is unnecessarily included in the new dgdecnv2053.zip file. Can you check this out, please?
User avatar
DJATOM
Posts: 176
Joined: Fri Oct 16, 2015 6:14 pm

[RESOLVED] DGSource seems to be delivering incorrect aspect ratio ?

Post by DJATOM »

>DGDemux
I have noticed that too, but is that a problem? Just don't unpack if not needed :)
User avatar
Bullwinkle
Posts: 338
Joined: Thu Sep 05, 2019 6:37 pm

[RESOLVED] DGSource seems to be delivering incorrect aspect ratio ?

Post by Bullwinkle »

It's just there for the convenience of those who use the Open Disk functionality.
DAE avatar
JKyle
Posts: 9
Joined: Sun May 24, 2020 2:29 pm

[RESOLVED] DGSource seems to be delivering incorrect aspect ratio ?

Post by JKyle »

Bullwinkle wrote:
Tue Feb 02, 2021 1:22 pm
It's just there for the convenience of those who use the Open Disk functionality.
:D :salute:
User avatar
hydra3333
Posts: 394
Joined: Wed Oct 06, 2010 3:34 am
Contact:

DGSource seems to be delivering incorrect aspect ratio ?

Post by hydra3333 »

thanks.
my crud workaround was to just use info from mediainfo and set it on the ffmpeg commandline.
this is better.
cheers.
User avatar
Curly
Posts: 712
Joined: Sun Mar 15, 2020 11:05 am

DGSource seems to be delivering incorrect aspect ratio ?

Post by Curly »

Shoulda took things more seriously when you posted this. Sorry bout dat.
hydra3333 wrote:
Tue Sep 29, 2020 7:08 pm
I got some aspect ratio problems again "recently" after a NV download. Well, I'm lazy, I worked around it via ffmpeg commandline option and forgot about it for some time.

Just wondering, it really is a funny world, would it be possible for the aspect ratio fix to have become unfixed, or is it somehow me ?
User avatar
hydra3333
Posts: 394
Joined: Wed Oct 06, 2010 3:34 am
Contact:

DGSource seems to be delivering incorrect aspect ratio ?

Post by hydra3333 »

All cool, Curly, Sir or Madam etc.

I got busy (call it lazy if we must) and shoulda provided the sample as requested. Oh well. Please don't emulate Moe with the double finger poke to both of my eyes ;)
Post Reply