xbmc / inputstream.adaptive

kodi inputstream addon for several manifest types
Other
451 stars 241 forks source link

Frame dropping playing 1080p (Netflix, Disney) #460

Closed facakente closed 1 year ago

facakente commented 4 years ago

Every time I play 1080p in kodi in my firestick 4K , I get regularly frames dropping / stuttering , image is not fluid at all.

It happens only with Netflix and Disney , tested other addons and play fine.

On the other hand when playing hdr10 or DV it does play fine , no frame dropping .(Disney or Netflix)

https://paste.kodi.tv/pucovakeko

Played 2 movies in hd , frames drop , then played one movie in DV , no problems .

I suppose problem isn’t the build but the new IA I have installed to fix other problems I had with Netflix or Disney .

matthuisman commented 3 years ago

Did notice a possible framerate issue with some MPDs But this won't affect Disney as Disney uses HLS

I have a PR for what I think is a suitable fix here: https://github.com/peak3d/inputstream.adaptive/pull/575

MaccyGit commented 3 years ago

I have the new Firestick Lite with Fire OS 7.2.2.8 and Kodi 19 beta 2 (upgraded from latest Kodi 18 stable due to this issue) and stuttering is happening in Netflix with 1080p24hz streams but NOT in Disney+. Both switch to 24hz correctly (info from TV OSD). Firestick directly connected to TV.

In my case opening the OSD will fix the issue (or at least it will improve it by 99% because in the first 2 minutes of Stranger Things S3E1 I couldn't detect any visible stuttering).

Thanks in advance

hunterzero99 commented 3 years ago

I have the new Firestick Lite with Fire OS 7.2.2.8 and Kodi 19 beta 2 (upgraded from latest Kodi 18 stable due to this issue) and stuttering is happening in Netflix with 1080p24hz streams but NOT in Disney+. Both switch to 24hz correctly (info from TV OSD). Firestick directly connected to TV.

In my case opening the OSD will fix the issue (or at least it will improve it by 99% because in the first 2 minutes of Stranger Things S3E1 I couldn't detect any visible stuttering).

Thanks in advance

This sounds like that might be fixed by the PR that matthuisman submitted. Can you try manually selecting a playback framerate of 23.97 in Kodi?

MaccyGit commented 3 years ago

I have the new Firestick Lite with Fire OS 7.2.2.8 and Kodi 19 beta 2 (upgraded from latest Kodi 18 stable due to this issue) and stuttering is happening in Netflix with 1080p24hz streams but NOT in Disney+. Both switch to 24hz correctly (info from TV OSD). Firestick directly connected to TV. In my case opening the OSD will fix the issue (or at least it will improve it by 99% because in the first 2 minutes of Stranger Things S3E1 I couldn't detect any visible stuttering). Thanks in advance

This sounds like that might be fixed by the PR that matthuisman submitted. Can you try manually selecting a playback framerate of 23.97 in Kodi?

I've set Kodi interface to @23.98, disabling auto change frame rate and it won't help. And it still improves dramatically enabling the OSD during playback

matthuisman commented 3 years ago

anyone tried forcing it to 24fps and see if better?

advancedsettings.xml

    <video>
        <adjustrefreshrate>
            <override>
                <fpsmin>23.97</fpsmin>
                 <fpsmax>24</fpsmax>
                 <refresh>24</refresh>
            </override>
           <fallback>
               <refresh>60.0</refresh>
         </fallback>
        </adjustrefreshrate>
    </video>
</advancedsettings>
hunterzero99 commented 3 years ago

Forcing the frame rate did not help on my system. I pulled some logs while it was dropping frames, and I also pulled a log of framerate switching off where it doesn't drop frames for comparison. I played the same video, but did not run them for the same length of time during the tests.

Log of not dropping frames Log of dropping frames

I'm trying to pick out differences between the two, so far this is something I've found that shows only on the one where frames aren't dropped:

DEBUG <general>: GL: Pixel Shader compilation log:
DEBUG <general>: Success.
DEBUG <general>: GL: Vertex Shader compilation log:
DEBUG <general>: Success.

ffmpeg also mentions the swscaler when using framerate matching (this one drops frames):

DEBUG <general>: ffmpeg[(nil)X]: [swscaler] Forcing full internal H chroma due to odd output size
DEBUG <general>: ffmpeg[(nil)X]: [swscaler] Forcing full internal H chroma due to input having non subsampled chroma
DEBUG <general>: ffmpeg[0x9d517680X]: [swscaler] No accelerated colorspace conversion found from yuv420p to bgra.
DEBUG <general>: ffmpeg[0x79962940X]: [swscaler] No accelerated colorspace conversion found from yuv420p to bgra.

I'll keep looking for differences between the two, might at least point in a particular direction.

CastagnaIT commented 3 years ago

If someone want to test the matthuisman PR fix (Kodi 19): inputstream.adaptive-android-armv7-matrix-e64c045.zip inputstream.adaptive-android-aarch64-matrix-e64c045.zip

hunterzero99 commented 3 years ago

This patch did not fix the problem for me.

On Mon, Jan 4, 2021 at 3:44 AM Stefano Gottardo notifications@github.com wrote:

If someone want to test the matthuisman PR fix (Kodi 19): inputstream.adaptive-android-armv7-matrix-e64c045.zip https://github.com/peak3d/inputstream.adaptive/files/5763714/inputstream.adaptive-android-armv7-matrix-e64c045.zip inputstream.adaptive-android-aarch64-matrix-e64c045.zip https://github.com/peak3d/inputstream.adaptive/files/5763755/inputstream.adaptive-android-aarch64-matrix-e64c045.zip

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/peak3d/inputstream.adaptive/issues/460#issuecomment-753842200, or unsubscribe https://github.com/notifications/unsubscribe-auth/AJROONUD5NWBKMAPT4XPHZTSYF5WXANCNFSM4NVGZAUA .

MaccyGit commented 3 years ago

Also NOT fixed here too

Msel88 commented 3 years ago

Edit: Resolution is limited to 960x540p with widevine forced to level 3. I haven't noticed that at first.

Just in case anybody else is still looking for a solution to this, I'd like to share my findings here. For me, setting the Widevine Security Level to 3 did the job for Netflix. The setting is located in Netflix addon settings / Expert (see screenshot).

20210328_125847

I now have smooth playback @540p24 on my FireTV Stick 4k.

Fire OS 6.2.7 6 (NS6276/2933) Fire TV framerate switching = ON Kodi 18.9.0 Kodi adjust framerate = on start/stop, sync to screen = OFF Netflix Addon 1.12.3, HEVC Profile enabled

hunterzero99 commented 3 years ago

Just in case anybody else is still looking for a solution to this, I'd like to share my findings here. For me, setting the Widevine Security Level to 3 did the job for Netflix. The setting is located in Netflix addon settings / Expert (see screenshot).

20210328_125847

I now have smooth playback @1080p24 on my FireTV Stick 4k.

Fire OS 6.2.7 6 (NS6276/2933) Fire TV framerate switching = ON Kodi 18.9.0 Kodi adjust framerate = on start/stop, sync to screen = OFF Netflix Addon 1.12.3, HEVC Profile enabled

When I turn this on I'm getting a 960x540p stream which does playback without dropping frames.

Msel88 commented 3 years ago

When I turn this on I'm getting a 960x540p stream which does playback without dropping frames.

You're right, same for me. I missed that in the first place. My bad...

jellejans commented 3 years ago

Any update on this?

glennguy commented 3 years ago

@jellejans unless Amazon have fixed on their end (not likely) then no.

From what I can understand reading this thread the issue is with AVC/h264 content (most 1080p). 4K (HEVC/h265) content doesn't have the issue. And as others have pointed out, for $30 it's hard to complain.

jellejans commented 3 years ago

@jellejans unless Amazon have fixed on their end (not likely) then no.

From what I can understand reading this thread the issue is with AVC/h264 content (most 1080p). 4K (HEVC/h265) content doesn't have the issue. And as others have pointed out, for $30 it's hard to complain.

Yeah indeed hard to complain for a 30$ streaming device. Strange part is that i also have the stutter with 4k content on Disney+ and Netflix. When i change the refresh rate to 60hz it’s gone

CastagnaIT commented 3 years ago

i report a note found on the old PR of HDR implementation on Kodi https://github.com/xbmc/xbmc/pull/16557

1080p streams don't play smooth yet, but there are still ptions to optimize the render chain (e.g. YUV scanout instead our own YUV2RGB shader)

I don't know if these shader optimizations have already been done, maybe they could help the problem?

Also specify that Kodi setting Use display HDR capabilities when enabled do the HDR calulation on GPU / display instead of internal calculation, now i do not have an HDR device to check but what happens if you turn off this setting?

farlight1 commented 3 years ago

I'm suffering this problem too. After change all individual settings and combinations, I landed here.

I'm using: Fire TV stick 4K - FireOS 6.2.8.1 Kodi 19.1 24Hz 4K capable TV

I found in the comments some missinformation, I shall try to explain when the problem appears.

Doing some tests, I can confirm that:

All the test confirmed with FireOs debug tools. I hope that if anyone is still checking, this will help.

jchtt commented 2 years ago

Also just ran into this, any news?

Edit: Only testing this on Netflix. Disabling the secure decoder fixes it but forces all output to 1080p. For me a great workaround would be if the secure decoder could be conditionally disabled for h264 content and enabled for 4k/h265 content.

Edit 2: Actually, while it seems better without the secure decoder, it is actually still pretty choppy.

CastagnaIT commented 2 years ago

someone know if this problem there is also on the new Amazon Fire TV Stick 4K Max?

hunterzero99 commented 1 year ago

I do not have the issue on the 4k stick!

On Sat, Mar 12, 2022, 4:07 AM Stefano Gottardo @.***> wrote:

someone know if this problem there is also on the new Amazon Fire TV Stick 4K Max?

— Reply to this email directly, view it on GitHub https://github.com/xbmc/inputstream.adaptive/issues/460#issuecomment-1065846853, or unsubscribe https://github.com/notifications/unsubscribe-auth/AJROONSJY2H6VTT7JY56QN3U7RNFXANCNFSM4NVGZAUA . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.

You are receiving this because you are subscribed to this thread.Message ID: @.***>