nova-video-player / aos-AVP

NOVA opeN sOurce Video plAyer: main repository to build them all
Apache License 2.0
3.46k stars 202 forks source link

[Bug]: v6.0.61 no auto frame rate switch to 29.97 on Shield #620

Closed HDGuy closed 1 year ago

HDGuy commented 2 years ago

Problem description

Doesn’t switch frame rate for all 29.97:content on Nvidia Shield.

Steps to reproduce the issue

Play all 29.97 content.

Expected behavior

No response

Your phone/tablet/androidTV model

Nvidia Shield 2019

Operating system version

Android 11

Application version and app store

No response

Additional system information

No response

Debug logs

No response

courville commented 2 years ago

I trust adaptive refresh rate is selected in the options. Could you please let me know what is the selected refresh rate on the TV for 29.97fps content? What are the rates supported by your TV? I can provide a special build with debug logs providing this information.

HDGuy commented 2 years ago

Oops, sorry, didn’t notice this before now.

Yes, 29.97 is definitely supported by my TV (Vizio P85QX-H1) as I said all other apps on the Shield than do auto refresh rate changing ( and even older versions of Nova) switch to 29.97 just fine. I installed the most recent 6.0.66 and it’s still having the same issue, it just outputs at 60Hz instead of 29.97. Only the more recent versions of Nova 6x are having this problem.

The P85 supports all the standard refresh rates, 23.976, 24, 25, 29.97, 30, 50, 59.94 and 60. There are a few exceptions (like 1080p/25 isn’t in the EDID but the TV can output it) but I’m using the Shield’s AI upscaler so I output everything at 4k (for the most part) anyways.

HDGuy commented 1 year ago

I trust adaptive refresh rate is selected in the options. Could you please let me know what is the selected refresh rate on the TV for 29.97fps content? What are the rates supported by your TV? I can provide a special build with debug logs providing this information.

Still not working on latest Google Play release 60.80.

courville commented 1 year ago

OK I see something strange indeed:

D/com.archos.mediacenter.video.player.Player( 8962): CONFIG video.fpsRate=2997, video.fpsScale=100
D/com.archos.mediacenter.video.player.Player( 8962): CONFIG wantedFps=29.97
D/com.archos.mediacenter.video.player.Player( 8962): CONFIG current display mode is {id=15, width=3840, height=2160, fps=59.94006}
D/com.archos.mediacenter.video.player.Player( 8962): CONFIG display supported mode {id=1, width=3840, height=2160, fps=29.97003}
D/com.archos.mediacenter.video.player.Player( 8962): CONFIG display supported mode {id=2, width=3840, height=2160, fps=23.976025}
D/com.archos.mediacenter.video.player.Player( 8962): CONFIG display supported mode {id=3, width=1280, height=720, fps=59.94006}
D/com.archos.mediacenter.video.player.Player( 8962): CONFIG display supported mode {id=4, width=1920, height=1080, fps=59.94006}
D/com.archos.mediacenter.video.player.Player( 8962): CONFIG display supported mode {id=5, width=3840, height=2160, fps=30.000002}
D/com.archos.mediacenter.video.player.Player( 8962): CONFIG display supported mode {id=6, width=3840, height=2160, fps=25.0}
D/com.archos.mediacenter.video.player.Player( 8962): CONFIG display supported mode {id=7, width=3840, height=2160, fps=24.000002}
D/com.archos.mediacenter.video.player.Player( 8962): CONFIG display supported mode {id=8, width=720, height=480, fps=60.000004}
D/com.archos.mediacenter.video.player.Player( 8962): CONFIG display supported mode {id=9, width=1280, height=720, fps=50.0}
D/com.archos.mediacenter.video.player.Player( 8962): CONFIG display supported mode {id=10, width=1280, height=720, fps=60.000004}
D/com.archos.mediacenter.video.player.Player( 8962): CONFIG display supported mode {id=11, width=1920, height=1080, fps=50.0}
D/com.archos.mediacenter.video.player.Player( 8962): CONFIG display supported mode {id=12, width=3840, height=2160, fps=50.0}
D/com.archos.mediacenter.video.player.Player( 8962): CONFIG display supported mode {id=13, width=3840, height=2160, fps=60.000004}
D/com.archos.mediacenter.video.player.Player( 8962): CONFIG display supported mode {id=14, width=1920, height=1080, fps=60.000004}
D/com.archos.mediacenter.video.player.Player( 8962): CONFIG display supported mode {id=15, width=3840, height=2160, fps=59.94006}
D/com.archos.mediacenter.video.player.Player( 8962): CONFIG HDR display detected
D/com.archos.mediacenter.video.player.Player( 8962): CONFIG HDR10 supported
D/com.archos.mediacenter.video.player.Player( 8962): CONFIG min judder targeting 29.97 fps video
D/com.archos.mediacenter.video.player.Player( 8962): CONFIG min judder: highest rr matching rr%fr=0 pass
D/com.archos.mediacenter.video.player.Player( 8962): CONFIG evaluating 3840x2160(29.97003Hz) metric = 0
D/com.archos.mediacenter.video.player.Player( 8962): CONFIG selecting modeId 1 for 30000 Hz and 30000 fps (metric = 0)
D/com.archos.mediacenter.video.player.Player( 8962): CONFIG evaluating 1280x720(59.94006Hz) metric = 0
D/com.archos.mediacenter.video.player.Player( 8962): CONFIG evaluating 1920x1080(59.94006Hz) metric = 0
D/com.archos.mediacenter.video.player.Player( 8962): CONFIG evaluating 3840x2160(30.000002Hz) metric = 30
D/com.archos.mediacenter.video.player.Player( 8962): CONFIG evaluating 720x480(60.000004Hz) metric = 60
D/com.archos.mediacenter.video.player.Player( 8962): CONFIG evaluating 1280x720(50.0Hz) metric = 20050
D/com.archos.mediacenter.video.player.Player( 8962): CONFIG evaluating 1280x720(60.000004Hz) metric = 60
D/com.archos.mediacenter.video.player.Player( 8962): CONFIG evaluating 1920x1080(50.0Hz) metric = 20050
D/com.archos.mediacenter.video.player.Player( 8962): CONFIG evaluating 3840x2160(50.0Hz) metric = 20050
D/com.archos.mediacenter.video.player.Player( 8962): CONFIG evaluating 3840x2160(60.000004Hz) metric = 60
D/com.archos.mediacenter.video.player.Player( 8962): CONFIG evaluating 1920x1080(60.000004Hz) metric = 60
D/com.archos.mediacenter.video.player.Player( 8962): CONFIG evaluating 3840x2160(59.94006Hz) metric = 0
D/com.archos.mediacenter.video.player.Player( 8962): CONFIG selecting modeId 15 for 60000 Hz and 30000 fps (metric = 0)
D/com.archos.mediacenter.video.player.Player( 8962): CONFIG surfaceChanged: 1280x720
D/com.archos.mediacenter.video.player.Player( 8962): mRefreshRateCheckerAsync
courville commented 1 year ago

OK debugging it a little more: with the 29.97fps video on the nvidia shield using 4k resolution it goes through the various modes and first picks the 29.97Hz and then sees that 59.94Hz works two (double rate 29.97*2=59.94) and decides to pick 59.94Hz as designed. For me there is nothing wrong.

Could you check on your side the adb logcat and let me know if another refresh rate is picked?

courville commented 1 year ago

@HDGuy please confirm that autorate switch in your case selects 59.94Hz (which is the current intended behavior)? This is what I get.

courville commented 1 year ago

Any confirmation that autorate is still broken?

HDGuy commented 1 year ago

I just checked the latest version 6.0.89, 29.97fps content is still not switching on my setup- stays at the default 59.94. No problems with 23.976fps content switching properly.

I have:

Vizio PQX85-H1 Denon AVR-S760H Nvidia Shield Pro 2019

Shield is connected to receiver.

All other software apps change rates fine, one of the reasons I am using Nova to launch JustPlayer (that, PGS sub support and pass through sync issues).

courville commented 1 year ago

@HDGuy thanks for getting back to me. In the current algorithm it is normal that it stays at 59.94Hz = 29.97fps * 2. It thus works as intended: in this case it matches the highest refresh rate multiple of the framerate (i.e. one frame displayed during two refreshes of the TV). This should not cause any judder. If you were at 60Hz or 50Hz it would switch back to 59.94Hz.

HDGuy commented 1 year ago

If your TV supports 29.97 natively there won’t be any judder. Kodi has the option to double 29.97 output if you need it.

courville commented 1 year ago

There is no judder at 59.94Hz as explained above for 29.97fps. There is thus no need to set a 29.97Hz refresh rate which would result in poorer UI performance when displaying something on top of the movie. I consider that the algorithm works as intended. Without opposition and technical data that contradicts the explanation, I will close this issue.

HDGuy commented 1 year ago

Yes, but source frame rates are important to those who want to watch content as originally intended.

I don’t understand the framerate can’t be left as-is for those who desire it this way? All other framerate matching apps work this way.

On Sun, Dec 11, 2022 at 2:10 PM CourvilleSoftware @.***> wrote:

There is no judder at 59.94Hz as explained above for 29.97fps. There is thus no need to set a 29.97Hz refresh rate which would result in poorer UI performance when displaying something on top of the movie. I consider that the algorithm works as intended. Without opposition and technical data that contradicts the explanation, I will close this issue.

— Reply to this email directly, view it on GitHub https://github.com/nova-video-player/aos-AVP/issues/620#issuecomment-1345632818, or unsubscribe https://github.com/notifications/unsubscribe-auth/AFQ2WG7ZZITV27IAXKOI6ZTWMYRJPANCNFSM5TTEHQ4A . You are receiving this because you were mentioned.Message ID: @.***>

courville commented 1 year ago

Do you agree that if you have a frame displayed during two refreshes of the screen you will not notice? I.e. you will still watch the content as originally intended (to which I do subscribe fully). Constraining frame rate to match screen refresh rate is like trying to match bananas with apples.

HDGuy commented 1 year ago

Content shot at 59.97fps is usually live content, such as news and sports. 29.97fps content is usually pretaped and both have a decidedly different look to it.

But that’s ok, if you want to do it this way that’s fine, I will just keep using JustPlayer as my video player, as it doesn’t have any of the bitstreaming sync issues and PGS support.

Nova’s front end is great, and easy to use.

Also, is there a way not to lost collections for a single film in a series?

On Sun, Dec 11, 2022 at 2:31 PM CourvilleSoftware @.***> wrote:

Do you agree that if you have a frame displayed during two refreshes of the screen you will not notice? I.e. you will still watch the content as originally intended (to which I do subscribe fully). Constraining frame rate to match screen refresh rate is like trying to match bananas with apples.

— Reply to this email directly, view it on GitHub https://github.com/nova-video-player/aos-AVP/issues/620#issuecomment-1345637034, or unsubscribe https://github.com/notifications/unsubscribe-auth/AFQ2WG32YOXBHHCUDN4ISJ3WMYTX5ANCNFSM5TTEHQ4A . You are receiving this because you were mentioned.Message ID: @.***>

ghost commented 1 year ago

Content shot at 59.97fps is usually live content, such as news and sports. 29.97fps content is usually pretaped and both have a decidedly different look to it.

Yes, but with actual 59.94 content you actually have 59.94 unique frames. With 29.97 content displayed over 59.94 you still have 29.97 unique frames, but you basically see every frame twice (as long). And those two frames are displayed for the same timespan as if it was shown as 29.97fps. There is actually no difference at all.