Resolution whitelist is broke
#16
(2018-06-28, 12:03)jjd-uk Wrote: With the whitelist function you should always set the Kodi resolution for the GUI to the highest possible value your device can handle, I asked because I wasn't sure if the Amlogic SoC in that Odriod C2 is capable of a 2160p GUI, as devices that can do 4K video without breaking a sweat via VPU hardware accelerated decoding, may not be able to do 4K GUI rendering via software operation on the CPU which are more resource intensive. If that Amlogic can run a 2160p GUI ok then you should set that as the Kodi resolution, and select both 2160p and 480p in the whitelist (or if you want native output for all resolutions when select everything in whitelist), that way when you play 480p it sends 480p then everything else will be sent as 2160p.
 The problem is when I play 480p content resolution DOES NOT switch to 480p.  If it did that would be awesome.  I created this thread to see if Kodi whitelist functionality could be improved so that switching works because exact match is too restrictive to be useful.

For example most of our 4:3 720x480 content is actually 704x480 (1.21 aspect) there is an extra 16 pixels 8 on each side of the image left blank for overscan margins leaving actual content as 704x480 not 720x480.

Resolution matching does not work because there are 8 black pixels on either side of the image missing.  Kodi demands 720x... and when it sees 704x it fails to switch 480p content to 480p resolution.
Reply
#17
Ah right so it doesn’t take account of any black bar cropping in the encode, hadn’t thought of that.
Reply
#18
The problem is the decoder in this case. It should set size to a standard and attach cropping information for renderer.

EDIT: or handle std size and cropping in some other component. but having renderer do this kind of scaling is wrong.

EDIT2: we actually consider this already and have a setting for it: videoplayer.errorinaspect
If no error in aspect ration is allowed, we render black bars on top/bottom of 704.

The problem is that we currently don't use this info when selecting a resolution. I'll fix this.
Reply
#19
https://github.com/xbmc/xbmc/pull/14132

now either width OR height need exact match
Reply
#20
Thanks, this should help a lot.
Reply
#21
If it helps at all I've compiled some data from my library.  Don't pretend for this to be representative of others.

All content has been cropped using ffmpeg detector selecting most popular crop configuration over first 5000 frames.  To keep things simple all content in this library is either 480 or 1080 resolution.

Total of 2613 videos.

Exact matching width only (720 or 1920) matches 1645 of 2613.
Exact matching width (720 or 1920) or height (480 or 1080) matches 1880 of 2613.

Matching to within 16 pixels of width (704-720 or 1904-1920) or height (464-480 or 1064-1080) matches 2610 of 2613

Three videos that don't match have resolutions:
1536 x 800
528 x 352
1872 x 800

Table of resolutions in my library ranked by popularity:
WidthHeightMatches
720480660
19201072637
704464265
704480227
720464152
14561072125
14241072122
14401072113
72035279
1904107256
192080036
192081632
70435217
1920108013
72036810
1920104010
19207848
6884807
155210726
19048005
7043684
179210723
7042723
192010243
6884642
19048162
7203842
7204482
7043361
147210721
6724641
19047841
5283521
7044481
18728001
19048481
6724801
15368001
19208801
190410401
Reply
#22
I was able to try new code and while it is better for many videos resolution switching still isn't occurring properly.

If matching could allow for a margin of up to 16 less pixels than horizontal or vertical resolution instead of an exact match of horizontal or vertical it would be perfect.  This addresses content having a different aspect AND overscan margin.
Reply

Logout Mark Read Team Forum Stats Members Help
Resolution whitelist is broke0