2016-08-02, 22:38
Hi,
I posted over on the OSMC forum to get ideas for what may be causing the issues I've experienced. I've found a way around it, by mounting the SMB share instead of adding it in Kodi. I would prefer if playing directly from an SMB share in Kodi would also work satisfactory. This is a cross-post, as it appears to be a Kodi issue more so than related to OSMC.
https://discourse.osmc.tv/t/freezing-stu...work/18160
Hardware: Raspberry Pi 3, with 2.4 A power supply.
Software: OSMC 2016.06-02 (Kodi 16.0)
Freshly installed, yesterday, on a SanDisk Mobile Ultra microSDHC 16 GB UHS-I (Class 10).
I'm having issues while playing certain movie files with very high variable bit rate video and audio via SMB. One particular file (http://paste.osmc.io/kuxikiyetu.tex) I attempt to play has (according to MediaInfo1 0.7.87) roughly 5 Mbps audio (TrueHD) (although OSMC overlay says closer to 9 Mbps), and h264 (x264, AVC) video at an average 20.1 Mbps (max 30 according to encoding parameters). I've enabled hardware decoding, which when there is data in the buffer makes the video and audio flow perfectly. (With software decoding it's not working as well, but that's another issue I may address in a separate post.)
The issue is that the buffer is not refilled fast enough. Slowly it is depleted (vq and aq drop down to 0%), video freezes, buffer starts to refill (vq and aq increase), and only once the buffer has refilled to 90+% (vq and aq) playback starts again.
The buffering happens with varying frequency. To me it appears to vary somewhat depending on the current measured bit rate of the video file. Often playback stops for buffering with between 30-90 second intervals.
Using bcmstat.sh (https://github.com/MilhouseVH/bcmstat) I see the RX rate is between 1.5-3.5 MB/s, with the occasional rare spike close to 5 MB/s. Testing file transfer independently from the servers on my network, I was able to saturate the 100 Mbps line to the RPi, so it's not a network issue. It is also not an issue with the share providing the video, as I am able to stream the same file to my Windows PC with no impact on the concurrent behavior on the Raspberry Pi. It continues to get stuck buffering as often as before.
I attempted to change readbufferfactor in the advancedsettings.xml, to no avail. This seem to be described also in other threads (https://discourse.osmc.tv/t/buffering-ev...onds/10758). I experience the same buffering freezes with readbufferfactor=4.0, readbufferfactor=8.0, and even readbufferfactor=80.0, and I believe this is to be expected when buffermode is not set explicitly to 1.
http://paste.osmc.io/enahusixof
I did further tests with buffermode=1 together with an increased cachemembuffersize (between 30-100 MB) and high readbufferfactor (between 4-16). Playback generally takes slightly longer to start, but buffers better and only stutter once in a while. bcmstat.sh shows spikes of 5-9 MB/s (depending somewhat on readbufferfactor). It still seem to be too slow sometimes, especially during first start of playback, or during seek, where it can take many seconds before playback gets going. And with these settings I also sometimes receive "cache full" popups, which according to some research (http://forum.kodi.tv/showthread.php?tid=216835) is more of an annoyance than a real problem itself.
Issue is circumvented by mounting the SMB share in the file system and adding the local folder to Kodi.
https://discourse.osmc.tv/t/freezing-stu...rk/18160/8
Is there a way to tune the speed at which Kodi loads data over an SMB share when the share is added via the Kodi interface?
I posted over on the OSMC forum to get ideas for what may be causing the issues I've experienced. I've found a way around it, by mounting the SMB share instead of adding it in Kodi. I would prefer if playing directly from an SMB share in Kodi would also work satisfactory. This is a cross-post, as it appears to be a Kodi issue more so than related to OSMC.
https://discourse.osmc.tv/t/freezing-stu...work/18160
Hardware: Raspberry Pi 3, with 2.4 A power supply.
Software: OSMC 2016.06-02 (Kodi 16.0)
Freshly installed, yesterday, on a SanDisk Mobile Ultra microSDHC 16 GB UHS-I (Class 10).
I'm having issues while playing certain movie files with very high variable bit rate video and audio via SMB. One particular file (http://paste.osmc.io/kuxikiyetu.tex) I attempt to play has (according to MediaInfo1 0.7.87) roughly 5 Mbps audio (TrueHD) (although OSMC overlay says closer to 9 Mbps), and h264 (x264, AVC) video at an average 20.1 Mbps (max 30 according to encoding parameters). I've enabled hardware decoding, which when there is data in the buffer makes the video and audio flow perfectly. (With software decoding it's not working as well, but that's another issue I may address in a separate post.)
The issue is that the buffer is not refilled fast enough. Slowly it is depleted (vq and aq drop down to 0%), video freezes, buffer starts to refill (vq and aq increase), and only once the buffer has refilled to 90+% (vq and aq) playback starts again.
The buffering happens with varying frequency. To me it appears to vary somewhat depending on the current measured bit rate of the video file. Often playback stops for buffering with between 30-90 second intervals.
Using bcmstat.sh (https://github.com/MilhouseVH/bcmstat) I see the RX rate is between 1.5-3.5 MB/s, with the occasional rare spike close to 5 MB/s. Testing file transfer independently from the servers on my network, I was able to saturate the 100 Mbps line to the RPi, so it's not a network issue. It is also not an issue with the share providing the video, as I am able to stream the same file to my Windows PC with no impact on the concurrent behavior on the Raspberry Pi. It continues to get stuck buffering as often as before.
I attempted to change readbufferfactor in the advancedsettings.xml, to no avail. This seem to be described also in other threads (https://discourse.osmc.tv/t/buffering-ev...onds/10758). I experience the same buffering freezes with readbufferfactor=4.0, readbufferfactor=8.0, and even readbufferfactor=80.0, and I believe this is to be expected when buffermode is not set explicitly to 1.
http://paste.osmc.io/enahusixof
I did further tests with buffermode=1 together with an increased cachemembuffersize (between 30-100 MB) and high readbufferfactor (between 4-16). Playback generally takes slightly longer to start, but buffers better and only stutter once in a while. bcmstat.sh shows spikes of 5-9 MB/s (depending somewhat on readbufferfactor). It still seem to be too slow sometimes, especially during first start of playback, or during seek, where it can take many seconds before playback gets going. And with these settings I also sometimes receive "cache full" popups, which according to some research (http://forum.kodi.tv/showthread.php?tid=216835) is more of an annoyance than a real problem itself.
Issue is circumvented by mounting the SMB share in the file system and adding the local folder to Kodi.
https://discourse.osmc.tv/t/freezing-stu...rk/18160/8
Is there a way to tune the speed at which Kodi loads data over an SMB share when the share is added via the Kodi interface?