Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Nvidia shield auto framerate switching not working in 4k@60hz #15915

Closed
6 tasks
ptidav opened this issue Apr 14, 2019 · 76 comments
Closed
6 tasks

Nvidia shield auto framerate switching not working in 4k@60hz #15915

ptidav opened this issue Apr 14, 2019 · 76 comments
Labels
Component: Video Issue Cleanup: Obsolete This issue is no longer relevant and is now closed. Platform: Android Triage: Confirmed issue has been reproduced by a team member v18 Leia

Comments

@ptidav
Copy link

ptidav commented Apr 14, 2019

Bug report

Describe the bug

Here is a clear and concise description of what the problem is:

Auto frame rate switching not working in kodi 18.1 fresh install if the nvidia shield TV resolution is set to 4k@59,94hz ou 60hz.

Expected Behavior

Here is a clear and concise description of what was expected to happen:

Kodi should set the framerate to the frame rate of the played content keeping the 4K resolution (to keep the benefit of the TV upscaling)

Actual Behavior

Contents are all played at 60hz instead of 24 or 25/50hz

Possible Fix

To Reproduce

Steps to reproduce the behavior:

  1. Set your nvidia shield tv resolution to 3140x2160@59,94hz
  2. Launch Kodi (fresh install), set the auto frame rate switching to "on start/stop" ; do not add resolutions to whitelist.
  3. Play a 24hz movie, the resolution stays at 3140x2160p@60hz

Debuglog

The debuglog can be found here:
https://paste.kodi.tv/aroyabacun.kodi

Screenshots

Here are some links or screenshots to help explain the problem:

Additional context or screenshots (if appropriate)

Here is some additional context or explanation that might help:

Your Environment

Used Operating system:

  • [x ] Android -Nvidia Shield TV

  • iOS

  • Linux

  • OSX

  • Raspberry-Pi

  • Windows

  • Windows UWP

  • Operating system version/name: Android 8.0 / Nvidia Shield TV 7.2.3

  • Kodi version: 18.1 (2019/04/10)

note: Once the issue is made we require you to update it with new information or Kodi versions should that be required.
Team Kodi will consider your problem report however, we will not make any promises the problem will be solved.

@xbmc-gh-bot xbmc-gh-bot bot added the Triage: Needed (managed by bot!) issue that was just created and needs someone looking at it label Apr 14, 2019
@DaVukovic DaVukovic added the Ignored rules issue that does not follow the rules (no template, missing debug log, ...) label Apr 14, 2019
@xbmc-gh-bot
Copy link

xbmc-gh-bot bot commented Apr 14, 2019

Thank you for using Kodi and our issue tracker. This is your friendly Kodi GitHub bot 😉

The issue that you have opened was marked as ignoring the rules of our bug tracker by a team member. Please review the following requirements for issue reports and make sure that you follow all of them:

  • Reports must follow our template and have all relevant fields filled in.
  • A full debug log is always mandatory.
    • Make sure that you restart Kodi after setting the log level to debug.
    • Log files may not be modified except for the removal of personally identifying information, usernames/passwords and similar.
    • For build errors, include a full build log instead.
  • You may not have any unsupported add-ons installed. If possible, reproduce on a clean Kodi installation or at least remove all offending add-ons.

Please understand that adherence to these rules is required for the team to be able to handle the volume of open issues efficiently. The issue will be closed after one week has passed without satisfactory follow-up from your side.

@Hitcher
Copy link
Contributor

Hitcher commented Apr 14, 2019

Have you enabled 3140x2160p@24hz in the whitelist?

@ptidav
Copy link
Author

ptidav commented Apr 14, 2019

If i enable it in the whitelist, 1080p 24hz is still played at 60hz....
Normally without elements in the whitelist, KODI should switch to the correct framerate without changing the resolution, no ?

@DaVukovic
Copy link
Member

As mentionerd above by the bot, could we see a debuglog, please?

@ptidav
Copy link
Author

ptidav commented Apr 14, 2019

Yes, i will upload it soon

here : https://paste.kodi.tv/aroyabacun.kodi

@M2k80
Copy link

M2k80 commented Apr 14, 2019

you need to setup the whitelist, your log sais whitelist is empty, so default resolution will be used.
i am using a shield too, and resolution switching is working for me

@DaVukovic DaVukovic added Component: Video Platform: Android Triage: Confirmed issue has been reproduced by a team member v18 Leia and removed Ignored rules issue that does not follow the rules (no template, missing debug log, ...) Triage: Needed (managed by bot!) issue that was just created and needs someone looking at it labels Apr 15, 2019
@ptidav
Copy link
Author

ptidav commented Apr 15, 2019

Hum, the framerate switch correctly when i watch 4K content (25hz or 24hz) without the withelist.
In the log i can see that kodi try to detect the framerate ; so why it can not ?...
Futhermore, after new tests this morning, there are some movies that I have already watched for which the framerate is set correctly !
It seems that the problem occurs for new films not yet watched

you need to setup the whitelist, your log sais whitelist is empty, so default resolution will be used.
i am using a shield too, and resolution switching is working for me

If you play a 24hz 1080p movie then your resolution is set to 3140x2160@24hz ?

@M2k80
Copy link

M2k80 commented Apr 15, 2019

i have enabled all resoloutions in the whitelist, exept 1080p/25hz. if i watch an 1080p/24hz movie its switching to 1080p/24hz
IMAG1256

@M2k80
Copy link

M2k80 commented Apr 15, 2019

in your logfile the movie has 23.97fps so you need to enable in whitelist 23.98hz too, 24hz is not enough.

here a screenshot with a part of my whitelist and enabled resolutions
IMAG1257

@lrusak
Copy link
Contributor

lrusak commented Apr 15, 2019

If you don't have any mode's selected in the whitelist Kodi will just try and match a refresh rate for your current resolution. So if you have kodi set to 4K, then it will look for 4k modes (even for 1080p content).

The whitelist is really meant for people that want to allow certain refresh rates only or if you want to allow switching down to a lower resolution.

So if you only want to watch content at your native resolution with whatever refresh rate is available it's best to just keep the whitelist blank.

@M2k80
Copy link

M2k80 commented Apr 15, 2019

hm ok, if he dont want use 1080p as resolution (this would be the benefit of TV upscaling, like he wrote), but his logfile sais something other as you just said.

Whitelist search for: width: 1920, height: 1040, fps: 23.976, 3D: false
Whitelist is empty using default one
Trying to find exact refresh rate
No exact whitelisted resolution matched, trying double refresh rate
No double whitelisted resolution matched, trying 3:2 pullback
No double refresh rate whitelisted resolution matched, trying current resolution
Matched current Resolution 3840x2160 @ 59.940060 - Full Screen (16)
Display resolution ADJUST : 3840x2160 @ 59.940060 - Full Screen (16) (weight: 0.000)

@lrusak
Copy link
Contributor

lrusak commented Apr 15, 2019

I think #15385 broke this behavior. @peak3d please take a look

@ptidav
Copy link
Author

ptidav commented Apr 15, 2019

in your logfile the movie has 23.97fps so you need to enable in whitelist 23.98hz too, 24hz is not enough.

Already tried 23.98hz and 24hz of course, but no framerate switching...

@M2k80
Copy link

M2k80 commented Apr 15, 2019

@ptidav you said you want the benefit of tv upscaling, then you need to whitelist 1080p for your 1080p content, if you stay at 4k resolution and only want to set the correct Hz for the movie, then shield upscaler is used and not the Tv upscaler ;)

@ptidav
Copy link
Author

ptidav commented Apr 15, 2019

If you don't have any mode's selected in the whitelist Kodi will just try and match a refresh rate for your current resolution. So if you have kodi set to 4K, then it will look for 4k modes (even for 1080p content).

that's what I want

The whitelist is really meant for people that want to allow certain refresh rates only or if you want to allow switching down to a lower resolution.

So if you only want to watch content at your native resolution with whatever refresh rate is available it's best to just keep the whitelist blank.

Yes, I want to see contents in 4K and at the right framerate ; that's all

@M2k80
Copy link

M2k80 commented Apr 15, 2019

@lrusak i just tested on my shield, i cleared my whitelist. framerate switch will happen on 24fps movies, but wont happen on 23.97fps movies.

@ptidav just only for your information, the shield upscaler is not good, you would have a nicer picture if you would use it like i said. if you stay at 4k on your shield, your shield is upscaling 1080p content to 4k, if you use the whitelist, like i said, and send the movie in 1080p to your tv, your tv will upscale the 1080p to 4k.

@ptidav
Copy link
Author

ptidav commented Apr 15, 2019

SOMETHING INTERRESTING : I just changed the kodi resolution to 3140x2160@50hz and... the movie framerate is set correctly now !!
movie is played at 3140x2160 at the correct framerate : 23,98hz switching is working !

if I go back in 3140x2160 @ 60hz then the framerate does not switch...

@ptidav
Copy link
Author

ptidav commented Apr 15, 2019

@ptidav just only for your information, the shield upscaler is not good, you would have a nicer picture if you would use it like i said. if you stay at 4k on your shield, your shield is upscaling 1080p content to 4k, if you use the whitelist, like i said, and send the movie in 1080p to your tv, your tv will upscale the 1080p to 4k.

If i use whitelist to do that, my tv (panasonic fz800) switch to 1080p ; i loose the benefits of the 4K upscaling

@M2k80
Copy link

M2k80 commented Apr 15, 2019

no you wont, the screen on your tv shows 1080p, this is correct, but it internaly upscale to 4k (tv´s native resolution), because its an 4k tv. try and test the screen quality by yourself.

you can easily test this,
go to shield home menu and look at the quality of the screen now, when the shield is set to 4k resolution.
now change the shield resolution to 1080p and watch the home menu again, it should be much sharper now -> now tv does the upscaling (for this test dont use kodi).
if you now think your picture looks better when your shield is on 1080p, then set your resolution back to 4k and enable 1080p in whitelist in kodi, but if you think there is no change or with 4k it looks better, then stay at your default settings.

@ptidav
Copy link
Author

ptidav commented Apr 15, 2019

oh ok, i will test this tomorrow

@Hitcher
Copy link
Contributor

Hitcher commented Apr 16, 2019

If i use whitelist to do that, my tv (panasonic fz800) switch to 1080p ; i loose the benefits of the 4K upscaling

No, your TV is is only showing you the input signal resolution (1080p) it will then upscale it to 4k; if it was displaying it at 1080p it would only take up a quarter of the screen.
Best option is to let the TV do the scaling so you want to enable everything in the whitelist.

@peak3d
Copy link
Contributor

peak3d commented Apr 16, 2019

@ptidav I reread the thread and I'm confused about the usage of 59.94 / 60Hz and 23.97 / 24 fps movies.
Can you pls. write exactly (!!) what switch do you expect? Without mixing 59.94 and 60 and 23.97 and 24? Those are different values. (24 != 23.97 and 59.94 != 60 )

Edit: Your TV seems to provide no / wrong EDID, there is no chance for NVIDIA shield to switch to any other resolution / mode than the 59.94 one.

Edit2: This is normal output of a monitor / tv which provides correct EDID Data:

2019-04-11 22:12:05.305 T:29214   DEBUG: CAndroidUtils: current mode: 2: 1920x1080@59.940060
2019-04-11 22:12:05.309 T:29214   DEBUG: CAndroidUtils: available mode: 1: 1920x1080@60.000004
2019-04-11 22:12:05.309 T:29214   DEBUG: CAndroidUtils: available mode: 2: 1920x1080@59.940060
2019-04-11 22:12:05.309 T:29214   DEBUG: CAndroidUtils: available mode: 3: 1920x1080@50.000000
2019-04-11 22:12:05.310 T:29214   DEBUG: CAndroidUtils: available mode: 4: 1280x720@50.000000
2019-04-11 22:12:05.310 T:29214   DEBUG: CAndroidUtils: available mode: 5: 1280x720@60.000004
2019-04-11 22:12:05.311 T:29214   DEBUG: CAndroidUtils: available mode: 6: 1280x720@59.940060
2019-04-11 22:12:05.311 T:29214   DEBUG: CAndroidUtils: available mode: 7: 720x576@50.000000
2019-04-11 22:12:05.311 T:29214   DEBUG: CAndroidUtils: available mode: 8: 720x480@60.000004
2019-04-11 22:12:05.312 T:29214   DEBUG: CAndroidUtils: available mode: 9: 720x480@59.940060
2019-04-11 22:12:05.312 T:29214   DEBUG: CAndroidUtils: maximum/current resolution: 1920x1080

Pls. compare with your log file, there are no (!!) additional modes enumerated.

@peak3d
Copy link
Contributor

peak3d commented Apr 24, 2019

@ptidav Sync playback to display is not working with audio set to passthrough.
You will have smooth video playback with passthrough disabled.
But we'll rework the selection of the refresh rate in the near future (not in kodi v18, but v19)

@peak3d
Copy link
Contributor

peak3d commented Apr 24, 2019

Beside this "Sync Playback To Display" is still not on during your test.
At the time you find this one: "CVideoSyncAndroid::Setup setting up" in your debug log file, its really on.
Its not found in your log, maybe start really with a clean / fresh install.

@ptidav
Copy link
Author

ptidav commented Apr 24, 2019

@ptidav Sync playback to display is not working with audio set to passthrough.
You will have smooth video playback with passthrough disabled.

I want audio passthrough : sound dynamic is really better, less crushed.
But i will try to disable it and watch the result

But we'll rework the selection of the refresh rate in the near future (not in kodi v18, but v19)

ok, one year to wait...do your best as usual ! thanks for your work

@peak3d
Copy link
Contributor

peak3d commented Apr 24, 2019

v19 is already out (build every night), so I assume it's more weeks than a year.

Beside this: on my shield I get the above mentioned log line even I have passthrough enabled, so it still seems that there is something wrong with your settings / setup.

@ptidav
Copy link
Author

ptidav commented Apr 24, 2019

@peak3d Sorry but i understood that i have to activate ONLY the "adjust display refresh rate", not "Sync Playback To Display"...
I've enable "Sync Playback To Display" AND "adjust display refresh rate" ; now i have the mention "CVideoSyncAndroid::Setup setting up" in the debug log but movies don't play smoothly...

should I still try with a fresh install ?

@peak3d
Copy link
Contributor

peak3d commented Apr 24, 2019

Now you have it in log, pls. Provide a new log file with video component logging enabled, thx

@ptidav
Copy link
Author

ptidav commented Apr 25, 2019

@peak3d Ok, resolution set to 4K@59,94hz
"adjust display refresh rate" set to ON START/STOP
"Sync Playback To Display" set to ON
Played 3 movies 1080p@23,94hz (no switch, kodi played them at 59,94) and one 4k content for wich kodi switched to 23,98hz (that's good for me)

This is the log :
https://paste.kodi.tv/ekeqayubeb.kodi

@Dnkhatri
Copy link

Dnkhatri commented Apr 25, 2019

@peak3d Ok, resolution set to 4K@59,94hz
"adjust display refresh rate" set to ON START/STOP
"Sync Playback To Display" set to ON
Played 3 movies 1080p@23,94hz (no switch, kodi played them at 59,94) and one 4k content for wich kodi switched to 23,98hz (that's good for me)

This is the log :
https://paste.kodi.tv/ekeqayubeb.kodi

Does your tv support that 1080p@23.94hs in the color space. I was having a similar problem later found out that my tv supports all frame rates at 4k but only specific frame rates at lower resolution. And even those are dependent on the color space. So my tv might support 1080p 23.98hz in 2020 color space but not in others. You can see what frame rates and what color space is supported by checking advance hdmi settings in nvidia shield.

@brettwnaylor
Copy link

This may be helpful, just say if u want me to stay out of it.

My set up, Sony x900f, Shield tv, Kodi Leia. All set to recommended settings, whitelist is enabled.

When Kodi display resolution is set to 3840x2160p and playback is 1920x1080p I have to manually change to the correct option in whitelist.

when Kodi display resolution is set to 1920x1080p and playback is 1920x1080p the whitelist works, correct frame rate is auto selected.

when Kodi display resolution is set to 3840x2160p and playback is 3840x2160p the whitelist works, correct frame rate is auto selected.

My work around is to set up two profiles, one to playback 4k ( display resolution is set to 3840x2160p - all frame rates selected, all are available ) and the second one to playback 1920x1080p, display resolution is set 1920x1080p - all frame rates selected from 1920x1080p and below. As I have very little 4k content, I don't need to switch profiles often. This works 100% of the time. Playing any 1920x1080p content when display resolution set to 3840x2160p will never select correct frame rate for me, I have to manually select the correct one for smooth playback.

Is this the same issue as above? No big deal for me as the fix is quick to access and i have little 4K content. Tell me to bigger off if this is no help, no offence taken, trying to help.Big Kodi fan, thanks for the great software.

@M2k80
Copy link

M2k80 commented Apr 25, 2019 via email

@peak3d
Copy link
Contributor

peak3d commented Apr 25, 2019

@ptidav sry I'll stop supporting this issue from now, I don't understand why you provide truncated / modified logs.

@ptidav
Copy link
Author

ptidav commented Apr 25, 2019

@ptidav sry I'll stop supporting this issue from now, I don't understand why you provide truncated / modified logs.

@peak3d
Sorry but I had to cut the log because it was too big and I could not save it on paste.kodi.tv
I just removed the part relating to another film in 4K

There is no bad intention on my part

I did not see also that we could attach files directly to the discussion
This is the full log :
kodi.log

@peak3d
Copy link
Contributor

peak3d commented Apr 25, 2019

@ptidav your log contains a.) no alternative display modes (same issue we had at the beginning of this thread), and it contains only 1 refreshrate switch (search log for "SetNativeResolution").

1.) from the log your 23.97 videos are playing at 50Hz, but I don't think so, it looks more like that there are several log lines inbetween missing.

2.) the only refreshrate switch in the log cannot be happen because of the missing mode enumerations.

-> The log is not only truncated, there are missing lines here and there for whatever reason.

@ptidav
Copy link
Author

ptidav commented Apr 25, 2019

@peak3d
I don’t know why there are missing lines... it’s tiring...
I will make a reset of my shield and reinstall Kodi from scratch and see what happens

@ptidav
Copy link
Author

ptidav commented Apr 25, 2019

@peak3d
Ok, i've uninstalled KODI then make a fresh install, without addons, skins, etc
I've played a sequence of movies encoded with differents refresh rates (always in the same order ) ; for some movies kodi switch (24hz, 25hz, 50hz but never switch for 23,976hz)

I provide 3 logs taking care each time to launch kodi and close it at the end of the tests :
1 log debug with "adjust display refresh rate" set to ON START/STOP
kodi debug.log

1 log debug with video component and "adjust display refresh rate" set to ON START/STOP
kodi debug video comp.log

1 log debug with video comp - adjust display refresh rate AND sync playback to display ON
kodi debug video comp - adjust display refresh rate AND sync playback to display ON .log

I sincerely hope they will help you understand why kodi does not switch when a 23,976h movie is played

@M2k80
Copy link

M2k80 commented Apr 25, 2019

@ptidav thx for the complete log. And yes, 59.94 s from sorting order the first match we find (matches are in your case 23.97 and 59.94 (what is called 3:2 pullback and should play fine on nowdays devices. This is the reason why shield's default refreshrate is 59.94: to play 23.97 movies fine.

If your 23.97fps movie does not play smooth, pls. enable "Sync Playback To Screen" in kodi settings (settings::player::video).

What we can do for the future kodi releases: Priorize 59.94 down (sort resolutions before search) to hit first 23.97. But: This would mean a refreshrate switch (~ 1 second gap) and slower GUI. I personally play all my 23.97 videos on 59.94 because of the beforementioned reasons.

You may see, that there is no real right and wrong, all depends on what users prefer or not.

Final question: do you have any issues playing 23.97 on 59.94 ?

peak3d already explained it here. without using the whitelist, kodi wont switch to 23.97hz if 59.94hz is set as default framerate, because its normaly working fine and no extra time for switching is needed. if you want that extra switch you have to use the whitelist and enable all that resolutions you want to switch to.

@ptidav
Copy link
Author

ptidav commented Apr 25, 2019

@M2k80 : ok, if i add 3840x2160@23,976hz in the whitelist kodi will switch at 3840x2160@23,976 when i'll play a 1080p@23,976hz movie ?

@peak3d
Copy link
Contributor

peak3d commented Apr 25, 2019

@ptidav we are currently not looking for the reason why it does not switch, we look for the reaon why 23.97 is not smooth on your 59.94Hz display. So -> I only need exactly 1 log with one movie playing (23.97 video on 59.94Hz), let it run some seconds until you investigate stutter, provide the log and try to explain how your stutter looks like (hickup every n sec? Or do you mean micro-stutter which normally are only when pans?).

@ptidav
Copy link
Author

ptidav commented Apr 25, 2019

@ptidav thx for the complete log. And yes, 59.94 s from sorting order the first match we find (matches are in your case 23.97 and 59.94 (what is called 3:2 pullback and should play fine on nowdays devices. This is the reason why shield's default refreshrate is 59.94: to play 23.97 movies fine.
If your 23.97fps movie does not play smooth, pls. enable "Sync Playback To Screen" in kodi settings (settings::player::video).
What we can do for the future kodi releases: Priorize 59.94 down (sort resolutions before search) to hit first 23.97. But: This would mean a refreshrate switch (~ 1 second gap) and slower GUI. I personally play all my 23.97 videos on 59.94 because of the beforementioned reasons.
You may see, that there is no real right and wrong, all depends on what users prefer or not.
Final question: do you have any issues playing 23.97 on 59.94 ?

peak3d already explained it here. without using the whitelist, kodi wont switch to 23.97hz if 59.94hz is set as default framerate, because its normaly working fine and no extra time for switching is needed. if you want that extra switch you have to use the whitelist and enable all that resolutions you want to switch to.

@M2k80
Sorry but it does not work, no switching ; framerate still @59,94hz

@ptidav
Copy link
Author

ptidav commented Apr 25, 2019

@ptidav we are currently not looking for the reason why it does not switch, we look for the reaon why 23.97 is not smooth on your 59.94Hz display. So -> I only need exactly 1 log with one movie playing (23.97 video on 59.94Hz), let it run some seconds until you investigate stutter, provide the log and try to explain how your stutter looks like (hickup every n sec? Or do you mean micro-stutter which normally are only when pans?).

@peak3d
There is micro-stuttering effects during the playback ; about 4 snags per second
This is the log :
kodi.log

I've tested with "sync playback to display" OFF : same problem during the playback.
It's like the option "sync playback to display" had no effect

@peak3d
Copy link
Contributor

peak3d commented Apr 26, 2019

@ptidav the mkv container does not provide stable PTS values, this is the reason why this movie does not playback well. Until we have more options with refreshrate in kodi, simply add your 23.97 refreshrates in the whitelist. 1080p@23.97 will then be scaled from TV to your native display resolution (TV does the job)

@ptidav
Copy link
Author

ptidav commented Apr 26, 2019

@peak3d
no stable PTS, ok, i'll google this later
I've added refreshrates to the wthitelist.
But for some movies kodi does not switch, why ?
This is the log :
kodi.log

@peak3d
Copy link
Contributor

peak3d commented Apr 26, 2019

Whitelist search for: width: 1280, height: 534, fps: 23.976, 3D: false

There is no exact 1280x534 screen resolution, because of that there is no switch using whitelist.
For your usecase (switch only refreshrate, but not resolution) you'll have to wait for the implementation in kodi.

@ptidav
Copy link
Author

ptidav commented Apr 26, 2019

@peak3d
OK, I wait the neXt kodi
you mean V19 ?

@peak3d
Copy link
Contributor

peak3d commented Apr 26, 2019

yes, v19, not sure if we beckport it to 18.3

@ptidav
Copy link
Author

ptidav commented Apr 26, 2019

@peak3d
18.3 would be great !
Thanks for your time and your work

@Rumpa112
Copy link

Rumpa112 commented May 13, 2020

Its the same on Win10 when I use Real Fullscreen. Everything plays at 60 have been like this sense 2016. Also HDR looks crap...

@thexai
Copy link
Member

thexai commented Mar 30, 2022

Switch display refresh rate at Start/Stop works fine in current master/Matrix (Shield)

@thexai thexai closed this as completed Mar 30, 2022
@thexai thexai added the Issue Cleanup: Obsolete This issue is no longer relevant and is now closed. label Mar 30, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Component: Video Issue Cleanup: Obsolete This issue is no longer relevant and is now closed. Platform: Android Triage: Confirmed issue has been reproduced by a team member v18 Leia
Projects
None yet
Development

No branches or pull requests

10 participants