Wrong DAR after upscaling - non anamorphic source becomes anamorphic

I am not sure whether it is a bug or only a wrong setting. But it is an annoying behaviour.

Source (16:9, 480p): 854x480
Upscaling to FHD (custom resolution):
Prioritize height (1080) results in 1922x1080
Prioritize width (1920) results in 1920x1080
Both would be fine. But the DAR seems not to be correct.
I use Handbrake for postprocessing (so cropping to 1920 would be no problem):
But Handbrake says that Display size is smaller than 1920x1080:
image
or disabling anamorphic:
image

This could be partly a Handbrake problem - but the source (TVAI output) seems to have some wrong data.

One reason could be:
If the DAR of the source is set to 854x480 (SAR = DAR) and TVAI upscales to FHD (prio width) then I get a 1920x1080 output video. The SAR changed slightly, but the DAR is kept. So I have a SAR of 16:9 but my DAR is still 427x240 which makes the output anamorphic. Since the DAR is not only copied but divided by 2 TVAI is setting these values. This should in my opinion not happen when the final resolution is only rounded.

I never get SAR = DAR. Any ideas why?

Not sure whether I use anamorphic in the correct context but for me it is SAR != DAR.
SAR = Storage aspect ratio
DAR = Display aspect ratio

Edit:
For Handbrake I found a workaround (uncheck automatic for final dimensions)
But keeping the orignal DAR could be wrong in case of rounding the resolution while upscaling.

Hi,

480p - 16:9 SAR is always a problem, because 16:9 of 480 is 853.3333 in width, native pixels, and programs either round this up or down as they please

I recommend do not use DAR Flag to stretch something when playing. DAR must be always set exaclty to 16:9 when you have 16:9 content.

So this is the one you should choose. 1922 x 1080 is 15.98 but ignore this, because by croping the two pixels away you get the 16:9, and then Handbrake should say it’s 16:9 now.

Handbrake

1 Like

This is what I finally did.
But TVAI shouldn’t have set the “wrong” DAR. It kept it although it changed to aspect ratio and the old DAR and SAR were the same.

Btw. you can crop only with 2 (even number) - not 1, but I know what you meant

ok I see, then TVAI does nonsense? But why 427x240, I tought you’re source is 853x480? DAR is not a pixel count, just aspect ratio value and 427x240 gives 1.779… instead 1.7777…

After you cut is done and correct, you can set correct DAR if necessary, when you remux it, for example with MKVToolnix

I tried that already. Handbrake seems to ignore that for some reason for these output files. So I guess that there is still some information in the header which is not correct. I checked with MediaInfo - no idea what exactly is causing it.
I can fix it in Handbrake by switching off automatic. But I would prefer that it will be a no-brainer and I can use the default settings.
So I guess that it is a bug which TVAI could fix. I know that there are other priorities since there is a workaround. But they will only know these bugs when we report it.

yes you must switch off “automatic” and unfortunately handbrake does only auto crop blanc areas, you’re 2 pixel to many away, this must be done manually, or maybe you can make a new saved profile.

I think Handbrake changes DAR to get 1920 x 1080 when playing. You have 1922 native pixels, only 2 pixels to much and because of this Handbrake is too imprecise, it has not enough floating points and rounds DAR value which gives you 1918 x 1080 when you play the video instead 1920

I don’t know if you can tell handbrake somehow never change DAR and it should take and leave the one from source.