MoojMidge / service.upnext

GNU General Public License v2.0
19 stars 5 forks source link

UpNextDetector -> Capture failed on Nvidia Shield with Hardware Acceleration enabled #25

Closed booyakafoo closed 6 months ago

booyakafoo commented 7 months ago

Hello. I have a Nvidia Shield 2017 and have been testing this addon and noticed that I get the following errors when I have hardware acceleration enabled. If I disable hardware acceleration the captures seem to work fine but that introduces quality issues and most videos are unplayable. Are there any options to correct this? Thanks!

2023-11-25 04:19:45.109 T:2290  warning <general>: [service.upnext] UpNextDetector -> Capture failed using 56kB data limit
2023-11-25 04:19:45.110 T:2290    error <general>: CRenderManager::Capture - unknown capture id: 0
2023-11-25 04:19:45.110 T:2294    debug <general>: [service.upnext] UpNextDetector -> Queue empty - retry
2023-11-25 04:19:46.110 T:2290  warning <general>: [service.upnext] UpNextDetector -> Capture failed using 48kB data limit
2023-11-25 04:19:46.110 T:2290    error <general>: CRenderManager::Capture - unknown capture id: 0
2023-11-25 04:19:46.111 T:2292    debug <general>: [service.upnext] UpNextDetector -> Queue empty - retry
2023-11-25 04:19:47.111 T:2290  warning <general>: [service.upnext] UpNextDetector -> Capture failed using 40kB data limit
2023-11-25 04:19:47.111 T:2290    error <general>: CRenderManager::Capture - unknown capture id: 0
2023-11-25 04:19:47.111 T:2295    debug <general>: [service.upnext] UpNextDetector -> Queue empty - retry
2023-11-25 04:19:48.112 T:2290  warning <general>: [service.upnext] UpNextDetector -> Capture failed using 32kB data limit
2023-11-25 04:19:48.112 T:2290    error <general>: CRenderManager::Capture - unknown capture id: 0
2023-11-25 04:19:48.112 T:2291    debug <general>: [service.upnext] UpNextDetector -> Queue empty - retry
2023-11-25 04:19:49.112 T:2290  warning <general>: [service.upnext] UpNextDetector -> Capture failed using 24kB data limit
2023-11-25 04:19:49.113 T:2290    error <general>: CRenderManager::Capture - unknown capture id: 0
2023-11-25 04:19:49.113 T:2293    debug <general>: [service.upnext] UpNextDetector -> Queue empty - retry
2023-11-25 04:19:50.113 T:2290  warning <general>: [service.upnext] UpNextDetector -> Capture failed using 16kB data limit
2023-11-25 04:19:50.113 T:2290    error <general>: CRenderManager::Capture - unknown capture id: 0
2023-11-25 04:19:50.116 T:2294    debug <general>: [service.upnext] UpNextDetector -> Queue empty - retry
2023-11-25 04:19:51.114 T:2290  warning <general>: [service.upnext] UpNextDetector -> Capture failed using 8kB data limit
2023-11-25 04:19:51.114 T:2290    error <general>: CRenderManager::Capture - unknown capture id: 0
2023-11-25 04:19:51.115 T:2292    debug <general>: [service.upnext] UpNextDetector -> Queue empty - retry
2023-11-25 04:19:52.115 T:2290  warning <general>: [service.upnext] UpNextDetector -> Capture failed using 8kB data limit
2023-11-25 04:19:52.115 T:2290    error <general>: CRenderManager::Capture - unknown capture id: 0
2023-11-25 04:19:52.115 T:2295    debug <general>: [service.upnext] UpNextDetector -> Queue empty - retry
2023-11-25 04:19:53.115 T:2290  warning <general>: [service.upnext] UpNextDetector -> Capture failed using 8kB data limit
2023-11-25 04:19:53.116 T:2290    error <general>: CRenderManager::Capture - unknown capture id: 0
2023-11-25 04:19:53.116 T:2291    debug <general>: [service.upnext] UpNextDetector -> Queue empty - retry
2023-11-25 04:19:54.116 T:2290  warning <general>: [service.upnext] UpNextDetector -> Capture failed using 8kB data limit
2023-11-25 04:19:54.116 T:2290    error <general>: CRenderManager::Capture - unknown capture id: 0
2023-11-25 04:19:54.117 T:2293    debug <general>: [service.upnext] UpNextDetector -> Queue empty - retry
2023-11-25 04:19:55.117 T:2290  warning <general>: [service.upnext] UpNextDetector -> Capture failed using 8kB data limit
2023-11-25 04:19:55.117 T:2290    error <general>: CRenderManager::Capture - unknown capture id: 0
2023-11-25 04:19:55.120 T:2294    debug <general>: [service.upnext] UpNextDetector -> Queue empty - retry
2023-11-25 04:19:56.117 T:2290  warning <general>: [service.upnext] UpNextDetector -> Capture failed using 8kB data limit
2023-11-25 04:19:56.118 T:2290    error <general>: CRenderManager::Capture - unknown capture id: 0
MoojMidge commented 7 months ago

Are there any options to correct this?

Unfortunately not.

There is more discussion of this issue in #24, specically https://github.com/MoojMidge/service.upnext/issues/24#issuecomment-1774120073, except that you would be using the mediacodec rather than drmprime renderer on your Shield.

Eventually I will add some other detector methods (based on chapters and subtitles if they are available), but for the moment the detector will need to be disabled to prevent the log spam.

booyakafoo commented 7 months ago

Thanks for the info. I have been thinking about moving away from the Shield for a while. Is there a particular platform I should be looking at, that would allow me the option of using detector? Thanks again.

MoojMidge commented 7 months ago

I wouldn't feel confident in recommending any platform based solely on whether the detector will work, and personally wouldn't make a purchasing decision based on it working as a criteria, even though I wrote it.

This is because the code in Kodi that implements the functionality that the detector relies on is not well maintained, and while it still works for some platforms and renderers, future changes may mean that it may no longer work for the platform that you use.

This has already happened for ARM devices running Kodi on Linux (not sure if it ever worked on Android) and even on x86_64 devices running Kodi on Linux depending on the graphics card/drivers/kernel/display pipeline, being used.

The device I use was similarly impacted by changes to Kodi that broke this functionality. Unfortunately, because it is a niche feature, that no one really maintains, this basically means that if it breaks it may not be fixed for a while, if at all. While I have temporarily fixed it for myself on my device, it needs time and effort to fix properly, and I wouldn't be capable of fixing it on other devices or platforms.

The render capture functionality has remained relatively unaffected on x86_64 devices running Kodi on Windows.