2021-09-06, 19:52
I'm seeing a general UPnP video streaming bug on 19.x Matrix (and 20.x Master) on Windows and Android. This bug is not present on Leia 18.9. I've tested it on multiple machines. The description I'm providing is Windows-centric, but the problem also occurs on Android.
After doing a fresh install of Kodi and enabling UPnP support in the settings, I simply add to the Videos section the generic "UPnP Media Servers (Auto Discover)" (upnp://) source. Then I browse the folder structure of the videos stored remotely on my NAS, select one of the videos (doesn't matter if it's an AVI, MKV, or MP4), and this begins a seemingly perpetual loading animation (spinning), and ever increasing memory use in Task Manager. When this happens, the video controls cannot be accessed to stop the video from loading, and no new videos can be loaded, so I must Exit Kodi. However, on clicking Exit in Kodi, Kodi will hang. If you use the X in Windowed mode in the right hand corner, Kodi will disappear but the process will not actually close, and the memory leak will continue to occur in the background until the process is forced to quit.
What I believe is happening is that Kodi 19.x is for some reason trying to download the entire video file into RAM before it will play, rather than streaming it as was done previously. I can prove this with a relatively small sized MP4 video while monitoring the amount of RAM being taken up by the process until the video does finally load. A respectively large video file never loads, as it will just start to fill up a large amount of the system's memory and never fully download to RAM (which shouldn't be happening in the first place, these videos should be streaming).
The problem here is not some problem with UPnP over my network, as it works just fine in Leia 18.9, as well as in VLC. And the problem is not the video format or bad video files, as all tested will play back fine locally in Matrix.
Here is the debug log: https://paste.kodi.tv/eqodaharib.kodi
After doing a fresh install of Kodi and enabling UPnP support in the settings, I simply add to the Videos section the generic "UPnP Media Servers (Auto Discover)" (upnp://) source. Then I browse the folder structure of the videos stored remotely on my NAS, select one of the videos (doesn't matter if it's an AVI, MKV, or MP4), and this begins a seemingly perpetual loading animation (spinning), and ever increasing memory use in Task Manager. When this happens, the video controls cannot be accessed to stop the video from loading, and no new videos can be loaded, so I must Exit Kodi. However, on clicking Exit in Kodi, Kodi will hang. If you use the X in Windowed mode in the right hand corner, Kodi will disappear but the process will not actually close, and the memory leak will continue to occur in the background until the process is forced to quit.
What I believe is happening is that Kodi 19.x is for some reason trying to download the entire video file into RAM before it will play, rather than streaming it as was done previously. I can prove this with a relatively small sized MP4 video while monitoring the amount of RAM being taken up by the process until the video does finally load. A respectively large video file never loads, as it will just start to fill up a large amount of the system's memory and never fully download to RAM (which shouldn't be happening in the first place, these videos should be streaming).
The problem here is not some problem with UPnP over my network, as it works just fine in Leia 18.9, as well as in VLC. And the problem is not the video format or bad video files, as all tested will play back fine locally in Matrix.
Here is the debug log: https://paste.kodi.tv/eqodaharib.kodi