• 1
  • 2
  • 3
  • 4(current)
  • 5
  • 6
  • 7
Kodi doesn't choose the correct resolution from the whitelist
#46
(2024-01-22, 23:27)boboc Wrote: The first two pages of this thread were specifically about Fire TV 4K Max 2nd gen. I do have this device, I also have a similar LG TV. Therefore I took my time, did the tests and was able to reproduce the problem.

For those who don’t own Fire TV 4K Max 2nd gen: the device perfectly supports 1280x720 50Hz or 60Hz. When the playback starts Kodi switches to 1280x720. Then a half-second later Kodi changes resolution to 1920x1080. This second change of resolution is initiated by GUI renderer.

Steps to reproduce:
  • Download test video from this page, choose the third video, which is the only one for 1280x720. It has 30 fps.
  • In Kodi settings in resolution whitelist select all resolutions incl. 1280x720 60Hz and activate option to allow double refresh rates.
  • Play the video.
  • The screen resolution is briefly changed to 1280x720 60Hz, but almost instantly it is changed to 1920x1080 30Hz.
  • Open whitelist again, deselect 1920x1080 30Hz and play the file again. The file is played back at 1920x1080 60Hz.
  • Open whitelist again, deselect 1920x1080 60Hz and play the file again. The file is played back at 3840x2160 30Hz.
  • Open whitelist again, deselect 3840x2160 30Hz and play the file again. The file is played back at 3840x2160 60Hz.
  • Last step: open whitelist again, deselect 3840x2160 60Hz and play the file again. Aha! Now we finally have our 1280x720 60Hz.

I personally don’t care if the video is played back at native 1280x720 or upscaled to 1920x1080 but the fact the resolution is changed twice indicates a potential problem in the code.

It would be nice if you could repeat this test on your device and report back. I wonder if that issue is specific to Fire TV 4K Max 2nd gen or even to the combination of this device and LG TV. Please mention your device and TV when posting results.
I've tried what you suggested and I got a different behavior. In the third run when both 1080p 30Hz and 60Hz have been removed from the whitelist, then when I start playing the video I do get the correct resolution of 720p 60Hz.
In my test I didn't have to remove also the 2160p 30Hz and 60Hz resolutions in order to get the correct matching -> zihadiheya (paste)
Reply
#47
I made the tests on Fire TV Stick 4K (non Max) 1st gen and got exactly same results as in my previous tests with Max 1st gen and Max 2nd gen (playback with wrong resolution).

Interesting observation: changing of GUI resolution in Kodi to 1280x720 doesn’t help. The behavior is the same: first 1280x720 is selected, then it switches to 1920x1080.

Since we all have different results, the issue has probably something to do with HDMI handshake. Therefore even Fire sticks of the same model behave differently depending on TVs.
Reply
#48
(2024-01-23, 15:54)boboc Wrote: Since we all have different results, the issue has probably something to do with HDMI handshake. Therefore even Fire sticks of the same model behave differently depending on TVs.

In the logs it can be seen that there's a HDMI disconnect after the initial whitelist check.. I think this is normal, as resolution/refresh rate change requires HDMI re-init.

Anyway after the HDMI "resync" there's probably handshake where the display capabilities are negotiated.. is it possible 720p disappears at this point for some reason?
Reply
#49
With the latest built things got worse, now Kodi never finds the correct matching in the withelist and so it always matches the GUI resolution. With the GUI set to 1080p, 4k videos are played at 1080p:

GUI 1080p -> Log
Code:
[WHITELIST] Searching the whitelist for: width: 3840, height: 2176, fps: 24.000, 3D: false
[WHITELIST] Searching for an exact resolution with an exact refresh rate
[WHITELIST] No match for an exact resolution with an exact refresh rate
[WHITELIST] Searching for an exact resolution with double the refresh rate
[WHITELIST] No match for an exact resolution with double the refresh rate
[WHITELIST] Searching for an exact resolution with a 3:2 pulldown refresh rate
[WHITELIST] No match for a resolution with a 3:2 pulldown refresh rate
[WHITELIST] Searching for a desktop resolution with an exact refresh rate
[WHITELIST] Matched a desktop resolution with an exact refresh rate 1920x1080 @ 24.000002 - Full Screen (31)
Display resolution ADJUST : 1920x1080 @ 24.000002 - Full Screen (31) (weight: 0.000)

With the GUI set to 4k the same video is played correctly, but not because Kodi finds a correct matching but simply because again it matches the GUI:

GUI 2160p -> Log
Code:
[WHITELIST] Searching the whitelist for: width: 3840, height: 2176, fps: 24.000, 3D: false
[WHITELIST] Searching for an exact resolution with an exact refresh rate
[WHITELIST] No match for an exact resolution with an exact refresh rate
[WHITELIST] Searching for an exact resolution with double the refresh rate
[WHITELIST] No match for an exact resolution with double the refresh rate
[WHITELIST] Searching for an exact resolution with a 3:2 pulldown refresh rate
[WHITELIST] No match for a resolution with a 3:2 pulldown refresh rate
[WHITELIST] Searching for a desktop resolution with an exact refresh rate
[WHITELIST] Matched a desktop resolution with an exact refresh rate 3840x2160 @ 24.000002 - Full Screen (26)
Display resolution ADJUST : 3840x2160 @ 24.000002 - Full Screen (26) (weight: 0.000)
Reply
#50
What happens if you disable the whitelist?
Reply
#51
(2024-02-04, 09:43)Zuikkis Wrote: What happens if you disable the whitelist?

If you disable the whitelist, kodi's behaviour is: Check all refreshrate of the current resolution we have, but also allow switching upwards. This default is coming from a time where most devices were too weak to run a 4K Gui at 60 hz, so people used it at 1080p60, but also wanted to switch up to 4k@24p, 4k@30 and so on for their native video output.

Switching down resolutions was always a niche requirement by most likely < 1% of the users. I think no one ever tested that on Android and from the number of reports until now, you see how many use it ;-).

The logs are clear. Let's find out if someone of those 1% comes up with a PR to fix it. My personal interest is not existing and the change is no one-liner.
First decide what functions / features you expect from a system. Then decide for the hardware. Don't waste your money on crap.
Reply
#52
(2024-02-04, 11:21)fritsch Wrote: If you disable the whitelist, kodi's behaviour is: Check all refreshrate of the current resolution we have, but also allow switching upwards. This default is coming from a time where most devices were too weak to run a 4K Gui at 60 hz, so people used it at 1080p60, but also wanted to switch up to 4k@24p, 4k@30 and so on for their native video output.

Switching down resolutions was always a niche requirement by most likely < 1% of the users. I think no one ever tested that on Android and from the number of reports until now, you see how many use it ;-).

The logs are clear. Let's find out if someone of those 1% comes up with a PR to fix it. My personal interest is not existing and the change is no one-liner.
Excuse me, maybe I didn't understand... so this isn't a problem, but the correct behavior from now on with the whitelist enabled ?
What should I do then ? Keep the GUI at 4K with the whitelist enabled ? I mean if this is the correct way no problem at all.
You tell me Smile

I woudn't want that my presence here would have been misunderstoood; I'm not here to annoy people with stupid and useless things. If they're stupid or useless please tell me and I'll move on...
I'm here to understand and learn; my intent is to achieve the best audio/vide experience, possibly using this device that I've just bought Smile

Maybe should I simply change device instead ? I mean it's a good device, I also get all the audio formats passthrough to my soundbar...This thanks to your efforts Smile
Reply
#53
Na. The people who designed the whitelist, exactly wanted the user to give the possibility to switch the "TVs" resolution down, so that all upscaling would happen with the TV / AVR / whoever itself. What you see on Android is a bug, after having switched correctly it does something else ... and landing somewhere else.

I think this feature was never thoroughly tested on Android. Bug is valid ... I don't want to judge if it is worth quality wise to go down this route.
First decide what functions / features you expect from a system. Then decide for the hardware. Don't waste your money on crap.
Reply
#54
(2024-02-04, 19:58)fritsch Wrote: Na. The people who designed the whitelist, exactly wanted the user to give the possibility to switch the "TVs" resolution down, so that all upscaling would happen with the TV / AVR / whoever itself. What you see on Android is a bug, after having switched correctly it does something else ... and landing somewhere else.

I think this feature was never thoroughly tested on Android. Bug is valid ... I don't want to judge if it is worth quality wise to go down this route.

Ok. So is this an answer for the main topic or for the latest problem I mentioned ? Because I think they're different. In the first case the whitelist works, but there's a problem with let's say Kodi that try to avoid going down from 1080p; so basically every resolution lower is upscaled to 1080p and then send to the TV.

In the second case, that to my knowledge I've experienced only with the latest Kodi version, the whitelist is practically ignored....
Reply
#55
(2024-02-04, 11:21)fritsch Wrote: Switching down resolutions was always a niche requirement by most likely < 1% of the users.

It's not about switching down resolutions. I can confirm the last issue reported by Kayn a few posts above. That's how I can reproduce the issue on Fire TV Stick 4K Max 2nd gen:
  • Set Kodi UI resolution to [email protected]
  • Add all available resolutions to whitelist
  • Playback a 4K video with height less than 2160 (I used a video with 3840x1744). It is played with black bars, but they are not part of the video image
  • Result: video is played back at 1920x1080 resolution

If video has full 4K resolution 3840x2160 it is played back correctly at 3840x2160.
If whitelist is empty both videos (with smaller height and the full 4K video) are played back correctly at 3840x2160.

This issue has the same cause as the issue reported in the very first post of this thread - the resolution is adjusted twice. The first time it is adjusted by video player and correct resolution is chosen. Then the resolution is adjusted again but it looks for a wrong resolution 3840x2176:
[WHITELIST] Searching the whitelist for: width: 3840, height: 2176, fps: 23.976, 3D: false

Log with whitelist empty: https://paste.kodi.tv/hegadebame.kodi
Log with whitelist filled: https://paste.kodi.tv/zusuzabeko.kodi

In both cases the resolution is changed twice. However the logic behind using whitelist and not using it is very different. With whitelist enabled, if a suitable resolution isn't found it looks for any resolution with requested frame rate and chooses 1920x1080. When whitelist isn't used such search isn't performed and the search for a suitable resolutions ends with a failure, which keeps the previously selected 3840x2160.

@Kayn: the problem exists not just in the latest builds but is also reproducible in a build from Dec 2023. As I explained above the issue doesn't happen with all videos.

I think the real question which is worth investigating is: why resolution is changed twice? even though the second "change" maybe invisible when it chooses the same resolution.
Reply
#56
(2024-02-04, 22:22)boboc Wrote:
(2024-02-04, 11:21)fritsch Wrote: Switching down resolutions was always a niche requirement by most likely < 1% of the users.

It's not about switching down resolutions. I can confirm the last issue reported by Kayn a few posts above. That's how I can reproduce the issue on Fire TV Stick 4K Max 2nd gen:
  • Set Kodi UI resolution to [email protected]
  • Add all available resolutions to whitelist
  • Playback a 4K video with height less than 2160 (I used a video with 3840x1744). It is played with black bars, but they are not part of the video image
  • Result: video is played back at 1920x1080 resolution

If video has full 4K resolution 3840x2160 it is played back correctly at 3840x2160.
If whitelist is empty both videos (with smaller height and the full 4K video) are played back correctly at 3840x2160.

This issue has the same cause as the issue reported in the very first post of this thread - the resolution is adjusted twice. The first time it is adjusted by video player and correct resolution is chosen. Then the resolution is adjusted again but it looks for a wrong resolution 3840x2176:
[WHITELIST] Searching the whitelist for: width: 3840, height: 2176, fps: 23.976, 3D: false

Log with whitelist empty: https://paste.kodi.tv/hegadebame.kodi
Log with whitelist filled: https://paste.kodi.tv/zusuzabeko.kodi

In both cases the resolution is changed twice. However the logic behind using whitelist and not using it is very different. With whitelist enabled, if a suitable resolution isn't found it looks for any resolution with requested frame rate and chooses 1920x1080. When whitelist isn't used such search isn't performed and the search for a suitable resolutions ends with a failure, which keeps the previously selected 3840x2160.

@Kayn: the problem exists not just in the latest builds but is also reproducible in a build from Dec 2023. As I explained above the issue doesn't happen with all videos.

I think the real question which is worth investigating is: why resolution is changed twice? even though the second "change" maybe invisible when it chooses the same resolution.

Yeah, I agree. The issue is with the cropped 4K, I mean as you said if the video is not a full 3840x2160 then with the GUI at 1080p it's played at 1080p; so you get 2160p ->1080p in the display info menu. With the GUI at 4K it's played at the correct 4K resolution. If I turn the withelist off then everything will be played matching the GUI; so if you have the GUI at 4K everything is upscaled to 4K. I mean with the withelist on and the GUI at 4K everything is kinda ok; of course if we pretend that the issue with the lower resolutions that are always upscaled is non existing....

But you know if something can go wrong it will, so I'm afraid that behind this there's the well known behavior of the Amazon's team aka: let's f***k everything up  Big Grin Therefore in the long run I can only see things getting worst unfortunately...
Reply
#57
I think I've found what's causing the second issue (4K video with GUI in 1920x1080) and how to fix this. I need to do more testing.

Still not certain about the first issue (wrong mode for 720p videos).

I'm still working on these both issues and will post my findings later.
Reply
#58
I've discovered another thing that to me puts even more confusion on the table: if I set the GUI to 1080p and remove all the 1080p resolutions from the whitelist I do get 480p to play at the proper resolution even the 480p that have been cropped; however the image AR becomes completley wrong...
It seems that the only way to get them played at the correct AR is to let Kodi upscale them at least to 1080p; because as I said if you remove the 1080p resolutions from the whitelist doing that you force Kodi to choose differently and then you get wrong AR...
Of course with the GUI at 4K and no 1080p on the whitelist Kodi upscales them to 4K, but the AR is correct even in this case.

All these tricks and tests in order to get the proper resolution matching and then when I get it.... in exchange I get an unwatchable image Rofl
Reply
#59
(2024-02-04, 11:21)fritsch Wrote: Switching down resolutions was always a niche requirement by most likely < 1% of the users. I think no one ever tested that on Android and from the number of reports until now, you see how many use it ;-).
Please don't say that. It's almost every modern tv. and if resolution select is a mess then majority of users may be viewing on unsuitable resolution, video looking not sharp because it's not upscaled properly.
(2024-02-04, 19:58)fritsch Wrote: I think this feature was never thoroughly tested on Android. Bug is valid ... I don't want to judge if it is worth quality wise to go down this route
I waited for 3 years. Anything I can do to make it happen?
Reply
#60
I had this issue on different Android TVs over more than 3 years.
My workaround:
  1. run Keymap Editor addon
  2. select "full screen video" - "Playback"
  3. map "select resolution" to a button on remote.
When video starts press button to manually select reslution.
Reply
  • 1
  • 2
  • 3
  • 4(current)
  • 5
  • 6
  • 7

Logout Mark Read Team Forum Stats Members Help
Kodi doesn't choose the correct resolution from the whitelist0