TeamNewPipe / NewPipe

A libre lightweight streaming front-end for Android.
https://newpipe.net
GNU General Public License v3.0
31.4k stars 3.06k forks source link

Match screen refresh rate with content for smooth video playback #5329

Open k9janer opened 3 years ago

k9janer commented 3 years ago

Checklist

Describe the feature you want

I think it would be great if NewPipe would adjust the screen refresh rate to match the content.

Currently NewPipe doesn't do this. For example 50 fps videos from the German ARD Youtube channel are played with a lot of judder as the 50 fps can't be distributed evenly across the default screen refresh rate of 60hz. This judder is extremely noticeable to some people, especially on a bigger screen like a tablet or tv.

Is your feature request related to a problem? Please describe it

It's not directly a problem/bug but video playback - probably THE core part of NewPipe - could be a lot smoother in a lot of situations.

Additional context

Android provides some ways to adjust the screen refresh rate and solve this problem. I'm not a developer but it seems like there are two ways to go about this:

1) The new frame rate API introduced with Android 11 2) Setting Display.Mode introduced with Android 6.0

This issue and the solutions are discussed here: https://android-developers.googleblog.com/2020/04/high-refresh-rate-rendering-on-android.html

Ideally NewPipe would detect the frame rate of the video and then adjust the refresh rate of the screen accordingly. Some apps like Kodi already make use of this feature.

How will you/everyone benefit from this feature?

By matching the screen refresh rate to the content you could severely improve the user experience since playing videos is probably what most users are doing in NewPipe and now THE CORE FEATURE of NewPipe would be as smooth as possible.

Example: The user wants to play a 50 fps video.

a) Current situation: The video will play with a lot of judder since the screen refresh rate will very likely stay at the default 60hz and you can't distribute the 50 fps over 60 hz evenly.

b) On a Pixel 4 with Android 11 using frame rate API: Using the new frame rate API NewPipe could report to the system that it would like to display a 50 fps video. The system could then decide to change the screen refresh rate to the 90 hz mode supported by the Pixel 4 for smoother video playback and reduced judder.

c) On AndroidTV/FireTV using Display.Mode: Using Display.Mode NewPipe could retrieve all possible resolutions and refresh rates of the device and then set the output mode to 4k@50hz if the display supports this resolution for perfectly smooth video playback.

triallax commented 3 years ago

@HTSamurai please don't make comments like that. You should be using reactions instead.