Req Could we have 576p and 480p output with the correct aspect ratio?
#1
Possibly this is more of a bugfix request than a feature request, I'm not sure....

On Leia beta builds on a Vero 4K+ and also on a Raspberry Pi, it's possible to whitelist 576p/50 and 480p/60 resolutions. If you do that and then play 576 or 480 video, the output switches to that resolution, but the aspect ratio is wrong.

The reason, I assume, is that 720p and above have square pixels, while 480p and 576p have rectangular pixels. You can get close to the right aspect ratio by playing with the "pixel ratio" setting, but because you can't set that to more than 2 decimal places, you can't get it exactly right.

Setting the View mode to "Stretch 16:9" also gets the aspect ratio roughly right, but I'm not sure if it's bypassing scaling entirely.

I'd like to be able to play a 576i/p or 480i/p video and output it as 576p or 480p without any scaling or aspect ratio manipulation at all.
Reply
#2
Hi

Do you have a post about this on the OSMC forums?

It's probably best for us to verify that this is a Kodi issue. If it happens on two platforms (Pi and Vero 4K); then it may well be a Kodi issue. Can you try with hardware acceleration disabled to see if the issue occurs with ffmpeg (software) decoding?

Cheers

Sam
Reply
#3
(2018-10-12, 01:26)Sam.Nazarko Wrote: Do you have a post about this on the OSMC forums?

Yes, that was me.
 
(2018-10-12, 01:26)Sam.Nazarko Wrote: It's probably best for us to verify that this is a Kodi issue. If it happens on two platforms (Pi and Vero 4K); then it may well be a Kodi issue.

The same thing happens under OSMC on the Vero 4K+, and under LibreELEC on a Raspberry Pi 3B+; so my working theory is that it's a Kodi problem.
 
(2018-10-12, 01:26)Sam.Nazarko Wrote: Can you try with hardware acceleration disabled to see if the issue occurs with ffmpeg (software) decoding?

I'm not in a position to check that on my 4K+, because you're currently testing it for a possible Ethernet fault.  Cool But I'm using software decoding on the Pi (I haven't paid for hardware MPEG2 decoding on that device).
Reply
#4
I don't observe any issues on systems that use OpenGL. OSX, Linux X11 / Wayland


EDIT: note that even with sw decoding, raspberry pi follows a unique path.
Reply
#5
(2018-10-12, 17:46)FernetMenta Wrote: I don't observe any issues on systems that use OpenGL. OSX, Linux X11 / Wayland


EDIT: note that even with sw decoding, raspberry pi follows a unique path.
Did you check it with a 4:3 (non-anamorphic) DVD rip?

EDIT:

(lightbulb over head)

I bet that's the issue! While I verified that I get the problem with both a 576i video and a 480i one, it occurs to me that I didn't actually test with an anamorphic rip. So it may well be the fact that the video is 4:3 that causes the problem, not just the fact that it's SD.

If the video is upscaled to 1080p then reducing the width of it is the correct way to handle 4:3, obviously; but if the output is 480p or 576p then it isn't - it should still be output as 720x576 or 720x480, and the display should take care of the aspect ratio.

If I play the 4:3 video at native res (view mode "Normal") and lock the TV to 16:9 a/r, then the video appears to be 4:3; if I set the TV to 4:3 a/r then the video is far too narrow. So, in Normal mode, Kodi is downscaling horizontally to get the 4:3 aspect ratio, even when the output is SD. It shouldn't do that unless the output resolution is at least 720p.
Reply
#6
So (provisionally) I revise my original change request, as follows:

If playing an SD video whose aspect ratio is 4:3, can horizontal downscaling please not be applied if the output resolution is 480p or 576p?
Reply
#7
Some illustrative screenshots....

Here we're playing a direct DVD rip, 480i. 480p is the only whitelisted resolution. The output goes to my Lumagen video processor. This is set to upscale to 2160p, and also shrink the upscaled mage by 10% on each side (as if compensating for 10% overscan). The area outside the shrunk video image is filled in grey.

We start with View Mode set to Normal.

Aspect ratio set to 16:9:
Image

Aspect ratio set to 4:3:
Image

The grey is being generated by the processor. The black bars are being generated by Kodi, and the image is being horizontally downscaled.


Now switch View Mode to "Stretch 16:9".

Aspect ratio 16:9:
Image

Aspect Ratio 4:3:
Image
Reply
#8
(2018-10-12, 17:46)FernetMenta Wrote: I don't observe any issues on systems that use OpenGL. OSX, Linux X11 / Wayland


EDIT: note that even with sw decoding, raspberry pi follows a unique path.
 This morning I tried to confirm this issue on Leia latest beta on Linux Mint 19. I set whitelist to 720x576p (only) and played a 720x576i 4:3 clip.  It played at desktop resolution (1080p) so is subject to the scaling that @"Shasarak" is concerned about.  This happens irrespective of the setting for 'Adjust refresh rate'.

Is there anywhere where it's set out exactly what whitelisting is supposed to achieve? Otherwise it's not possible to test and confirm whether it's working properly and if necessary suggest improvements.  For the moment, I'm left with the following questions from this morning's tests:
  1. should Kodi list in its log all the display modes my TV is capable of? (it doesn't on LM19)
  2. should Kodi list in the candidates for whitelisting all those available as potential desktop modes? (it doesn't on LM19 - notably missing out interlaced modes)
  3. should Kodi recognise a TV that supports 4:3 modes (in particular VICs 2 and 17) and use those if available? (it doesn't, but really should to satisfy @"Shasarak"'s concern - I think he's got a good point)
  4. Is the 'Adjust refresh rate' setting redundant in Leia?
  5. In order to display in a whitelisted mode, do all of width, height, refreshrate, interlace, fractional rate and aspect ratio have to match?  Exactly? or does, say, 704 match 720?
Reply
#9
(2018-10-14, 15:56)graham-h Wrote: It played at desktop resolution (1080p) so is subject to the scaling that @"Shasarak" is concerned about.
Just to be absolutely clear: I'm comfortable with what it does if the output resolution is 1080p (scales to 1440x1080 and then pads the side of the image with black bars); my problem is that it does exactly the same thing when the output resolution is 576p or 480p. At 1080p it's upscaling and padding, which is fine; at 576p or 480p it's downscaling and padding, which is not fine.
 
(2018-10-14, 15:56)graham-h Wrote:
  • should Kodi recognise a TV that supports 4:3 modes (in particular VICs 2 and 17) and use those if available? (it doesn't, but really should to satisfy @"Shasarak"'s concern - I think he's got a good point)
Yes, exactly that! Smile
Reply

Logout Mark Read Team Forum Stats Members Help
Could we have 576p and 480p output with the correct aspect ratio?0