Android NVIDIA SHIELD TV PRO - Frame drops when playing high bitrate 4k content (Kodi v21.1) - Printable Version +- Kodi Community Forum (https://forum.kodi.tv) +-- Forum: Support (https://forum.kodi.tv/forumdisplay.php?fid=33) +--- Forum: General Support (https://forum.kodi.tv/forumdisplay.php?fid=111) +---- Forum: Android (https://forum.kodi.tv/forumdisplay.php?fid=164) +---- Thread: Android NVIDIA SHIELD TV PRO - Frame drops when playing high bitrate 4k content (Kodi v21.1) (/showthread.php?tid=379024) |
NVIDIA SHIELD TV PRO - Frame drops when playing high bitrate 4k content (Kodi v21.1) - APIPerfi - 2024-10-02 Long time lurker and first time poster here. I'm somewhat competent with Kodi, but am at the end of my troubleshooting capabilities. When watching high bitrate 4k content from my local media source plugged directly into my SHIELD via USB, playback starts dropping frames at a seemingly random interval for some unknown reason. I suspect that it has something to do with A/V sync trying to correct itself, but it happens regardless of me seeking or pausing. I have audio passthrough turned on and a capable receiver connected directly to my SHIELD. I also have adjust refresh rate on start/stop enabled within Kodi. If I need to provide any addition information, just let me know. Here is a debug log I created when observing the issue. I would greatly appreciate any insight regardring what I could do next! RE: NVIDIA SHIELD TV PRO - Frame drops when playing high bitrate 4k content (Kodi v21.1) - jogal - 2024-10-04 This is almost certainly due to other background processes/services/apps using too much CPU. To fix this you need to connect via adb and identify these processes and then kill them. e.g. adb shell pm uninstall -k --user 0 com.google.android.tvrecommendations Another more drastic but perhaps easier solution is to factory reset Shield and reinstall Kodi only (avoid installing apps you don't need). You can follow this guide as reference: https://florisse.nl/shield-debloat/ But I don't recommend doing all the steps in any case. It is not necessary to install custom launchers or downgrade firmware. Shield with latest firmware works perfectly fine with Kodi. RE: NVIDIA SHIELD TV PRO - Frame drops when playing high bitrate 4k content (Kodi v21.1) - APIPerfi - 2024-10-04 I really appreciate you taking the time to help me with my issue jogal. Factory resetting my Shield has certainly crossed my mind during this, but it doesn't seem all that logical as the device is brand new as of a month ago and I only have 5 applications installed, including Kodi. When running Kodi, I also make sure to kill any background processes. Originally, I had Kodi installed directly on my Sony TV running 19.3 and the Arctic Zephyr Reloaded Skin (with no video related issues), but switched to the Shield running 21.1 (same skin) in order to take advantage of my receiver's audio passthrough capabilities. As a last ditch effort instead of doing a factory reset, I tried running a fresh install of 20.5 (same skin) but observed the frame dropping behavior again. It just seems strange that other 4k content (albeit not quite as high of avg bitrate, but still good quality and encoded the same) runs without so much as a hitch. This leads me to wonder if I have a faulty HDMI cable, causing inconsistent handshakes on more demanding content. I fully understand that this issue is extremely nuanced and could be related to any number of different factors, so I'm grateful for any input. RE: NVIDIA SHIELD TV PRO - Frame drops when playing high bitrate 4k content (Kodi v21.1) - Zuikkis - 2024-10-05 Try to disable caching. Caching can be configured inside Kodi in 21 version.. I don't know why but I always get frame drops if caching is enabled. Just as you say, start of the movie is fine, but then after 15-30 minutes it starts dropping.. without cache it's fine. RE: NVIDIA SHIELD TV PRO - Frame drops when playing high bitrate 4k content (Kodi v21.1) - wpbpete - 2024-10-05 (2024-10-02, 22:25)APIPerfi Wrote: When watching high bitrate 4k content from my local media source plugged directly into my SHIELD via USB, playback starts dropping frames at a seemingly random interval for some unknown reason. I suspect that it has something to do with A/V sync trying to correct itself, but it happens regardless of me seeking or pausing. Did you look at 'chunk size'? https://kodi.wiki/view/Settings/Services/Caching I have mine at 512kb and buffer all and rarely have any issues after the movie starts. It takes a couple seconds to load the movie while it caches but then it's smooth sailing. There doesn't seem to be a right way to set these settings so you may need to play with them. RE: NVIDIA SHIELD TV PRO - Frame drops when playing high bitrate 4k content (Kodi v21.1) - jogal - 2024-10-05 I don't think OP issue is related to Cache at all because for local storage and USB files Cache is default disabled anyway. (2024-10-04, 21:50)APIPerfi Wrote: As a last ditch effort instead of doing a factory reset, I tried running a fresh install of 20.5 (same skin) but observed the frame dropping behavior again. v20.5 is unsupported and has known issues with com.google.android.tvrecommendations precisely so test clean v21.1 install (default skin and no add-ons).See: https://github.com/xbmc/xbmc/issues/24980 and https://github.com/xbmc/xbmc/pull/24986#pullrequestreview-1999469591 and https://github.com/xbmc/xbmc/issues/25681 v21.1 (and v22) is the only version that has a fix for this. In debug log posted there are activity with some add-ons: script.litebox , plugin.video.youtube , script.embuary.helper and may others so please test first without any add-on and default estuary skin.
RE: NVIDIA SHIELD TV PRO - Frame drops when playing high bitrate 4k content (Kodi v21.1) - jogal - 2024-10-05 (2024-10-05, 07:59)Zuikkis Wrote: Try to disable caching. Caching can be configured inside Kodi in 21 version.. I was looking at CPU usage on the Cache thread a while ago and found no major problems (the cause of the problems was elsewhere at the time). However, I found that it was possible to reduce CPU usage by half or more. That is, the current usage is very low but it can be reduced even further. As seems you now can reproduce this related to Cache worth test this again. I'll post a build here with the Cache change to see if it makes a real difference... RE: NVIDIA SHIELD TV PRO - Frame drops when playing high bitrate 4k content (Kodi v21.1) - jogal - 2024-10-05 FileCache test builds - v22 ARM64 (Shield): kodi-20241005-8bb382ac-file-cache-improv-arm64-v8a.apk ARM: kodi-20241005-8bb382ac-file-cache-improv-armeabi-v7a.apk FileCache test builds - Omega v21.2 ARM64 (Shield): kodi-20241005-f447140b-file-cache-improv-Omega-arm64-v8a.apk ARM: kodi-20241005-f447140b-file-cache-improv-Omega-armeabi-v7a.apk Omega builds can be installed on top of current v21.1 without risk of cause damage on settings or media library. RE: NVIDIA SHIELD TV PRO - Frame drops when playing high bitrate 4k content (Kodi v21.1) - APIPerfi - 2024-10-05 I noticed the cache was disabled by default for local files in 21.1, so after finding this issue I thoroughly tested enabling it with all kinds of different cache settings but unfortunately saw no improvements. I will test the build you kindly provided jogal, and report back with my findings. Do you recommend that I do anything specific/alter any settings, or can I simply install the Omega apk over my current 21.1 build with the file explorer of my choice? Once again, I really appreciate everyone's help! RE: NVIDIA SHIELD TV PRO - Frame drops when playing high bitrate 4k content (Kodi v21.1) - jogal - 2024-10-06 (2024-10-05, 23:17)APIPerfi Wrote: Do you recommend that I do anything specific/alter any settings, or can I simply install the Omega apk over my current 21.1 build with the file explorer of my choice? No, you should uninstall v20.5 and clean install v21.1 or build "v21.2" of top post (default estuary skin, no add-ons). For Cache settings I recommend the new default settings that v22 will have: Memory Size = 64 MB Read Factor = Adaptive In your case for local files also "Buffer Mode = Buffer all file systems, including local files" Also as you are using USB storage, in Shield Settings: Shield Settings > System > USB mode set to "Max performance" This is default disabled and USB bandwidth limited to half to avoid possible interference with Bluetooth devices. Quote:This setting is to help with people using USB devices which have a negative impact on 2.4 GHz wifi or Bluetooth which can be seen as slow wireless or laggy remotes/controllers and cutting out Bluetooth audio. Auto means shield has a list of devices it knows interferes and runs them in usb2 mode to remove the wireless interference and anything not in that list runs at usb3. Performance mode means ignore the black list and run everything at usb3 speeds and compatability means run everything at usb2 speeds. But all this is speculation: the only way to know if some external Shield process is eating CPU or some Kodi CPU thread is consuming more as should is with ADB: adb shell top --> list of all processesadb shell top -H --> list of all CPU threads
RE: NVIDIA SHIELD TV PRO - Frame drops when playing high bitrate 4k content (Kodi v21.1) - jogal - 2024-10-06 For reference this is the CPU usage I have on Shield: Playback 4K HDR10 Playback 4K Dolby Vision Note that Kodi CPU usage only varies from 30% to 33% due Dolby Vision but total CPU usage on device from 29% to 60% (due media.codec and graphics.composer system processes) RE: NVIDIA SHIELD TV PRO - Frame drops when playing high bitrate 4k content (Kodi v21.1) - APIPerfi - 2024-10-06 (2024-10-06, 07:33)jogal Wrote: Also as you are using USB storage, in Shield Settings: I have previously tested this setting with no luck, but will try with the new builds and see what happens when I get the chance. RE: NVIDIA SHIELD TV PRO - Frame drops when playing high bitrate 4k content (Kodi v21.1) - fritsch - 2024-10-06 In any case please post the Debug Log from the failure, if it's cache related you can see that in the logs. If you have kodi-send available in your network, you can verify with: kodi-send -a PlayerDebug --host=192.168.178.93 (obviously the IP needs to be changed to your infrastructure). Here the Audio-Queue might run towards zero which is an indicator, also you see the Forward Cache, which is only a fraction of the 64M you are setting up, but might be due to double buffering. offtopic start For me - without sidetracking this thread - the Adaptive / 100 ms combination does not work too good - my FireTV is one of those with CPU issues. I do very well with the above builds and Read-Factor fixed to 4.0, my guessing - still might not be your cause, your Debug Log will show - is that the adaptive is too slow to adapt, but we will find out. What I also find odd in the code is, that it seems that read is always behind write, which is fine, but at a point the Circular Cache needs to role over - but that's probably only me not having fully understood how that worked. offtopic end. RE: NVIDIA SHIELD TV PRO - Frame drops when playing high bitrate 4k content (Kodi v21.1) - APIPerfi - 2024-10-07 After some further testing, the frame drops are still persisting. Out of curiosity, I first uninstalled my 21.1 build with my library and skin configs and did a fresh install of the default 21.1 build from the play store in order to rule out the Arctic Zephyr Reloaded skin causing issues (I still saw frame drops). Next, I tested jogal's provided Omega "Cache Improv" build with the default skin and recommended cache settings + max performance USB mode enabled. Unfortunately, I still observed a handful of frame drops spread out at random intervals during a 40 minute playback test. Here is the resulting log. Let me know if testing the v22 build is still worthwhile and I will try it when I can and share the log. RE: NVIDIA SHIELD TV PRO - Frame drops when playing high bitrate 4k content (Kodi v21.1) - Zuikkis - 2024-10-08 (2024-10-06, 18:18)fritsch Wrote: . What I also find odd in the code is, that it seems that read is always behind write, which is fine, but at a point the Circular Cache needs to role over - but that's probably only me not having fully understood how that worked. Perhaps there is something there? The cache related dropouts are not "normal" frame skips, it looks more like broken file. Sometimes it gets stuck for gew seconds and then resumes. Of course it can't bug in every buffer roll, 64MB buffer is only a few seconds in a high bitrate movie and video often plays for 30 minutes without errors. But maybe there's an edge case where buffer read or write happens just on a boundary of the buffer, or something.. Also thanks @jogal for the test version, haven't been able to try it out yet but I will. |