Kodi Community Forum

Full Version: Non-trivial buffering problem streaming from a NAS with SMB
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
I have an inexplicable problem with Kodi 19.0 running on my Sony KD65 A89 Android 9 TV.

I get frequent buffering problems, even on a 720p video file with an average bit rate of 4/5 Mbit/s, reproduced from a local NAS accessed through a SMB share.

Let's give some details.
The TV is connected with an Ethernet cable. The Ethernet adapter of this TV is a 100 Mbit/s one, which should be enough for almost all contents (and for sure for 720p/1080p contents).
The NAS has a Gigabit connection.
Using iperf3 to measure the local bandwidth of the TV with another device with a Gigabit connection (similar to the NAS one), I get around 97 MBit/s throughput, so the cable connection of the TV is working fine.
Using iperf to measure the local bandiwth of the NAS with the same other device brings more than 300 Mbit/s throughput.
Unfortunately I can't benchmark the direct connection between the TV and the NAS because I can use only iperf (not iperf3) on the NAS, while I could only find an app with just iperf3 (not iperf) support on the Play store for the TV, but I think that the two tests I made are enough to exclude a bandwidth problem between the TV and the NAS.
Also trying a speed test for the Internet connection from the TV brings a 60 Mbit/s, which is the maximum allowed by my VDSL connection. So, once again, the cable interface of this TV is able to sustain at least 60 Mbit/s (but almost certainly around the theoretic 100 Mbit/s supported by the interface).
Nevertheless, streaming the mentioned contents in Kodi leads to frequent buffering problems.
The same contents reproduced by the same TV using VLC play just fine, no buffering problem at all and very quick seeks.
I also tried to switch the TV to use the WiFi connection: it connects at 2,4 GHz at around 130 Mbit/s, but I don't see any improvement with Kodi (still buffering problems occur), and I wouldn't expect any.

Playing the same contents from the same source NAS with a €20 FireTV Stick, on the same network (but even with a WiFi connection!), with Kodi 18.9 works perfectly fine, with no buffering problem at all.

I already tried to change the video cache in the Sony TV with the following options:

xml:

<advancedsettings>
  <cache>
    <buffermode>4</buffermode>
    <memorysize>52428800</memorysize>
    <readfactor>30</readfactor>
  </cache>
</advancedsettings>

Perhaps this helps a bit, because it seems like to double the available cache size, but doesn't fix the problem.

Any idea on what could be causing this behaviour? Is there any Kodi settings that may impact on the speed at which Kodi can read from the local network?
(2021-04-05, 20:29)mauromol Wrote: [ -> ]I have an inexplicable problem with Kodi 19.0 running on my Sony KD65 A89 Android 9 TV.

I get frequent buffering problems, even on a 720p video file with an average bit rate of 4/5 Mbit/s, reproduced from a local NAS accessed through a SMB share.

Let's give some details.
The TV is connected with an Ethernet cable. The Ethernet adapter of this TV is a 100 Mbit/s one, which should be enough for almost all contents (and for sure for 720p/1080p contents).
The NAS has a Gigabit connection.
Using iperf3 to measure the local bandwidth of the TV with another device with a Gigabit connection (similar to the NAS one), I get around 97 MBit/s throughput, so the cable connection of the TV is working fine.
Using iperf to measure the local bandiwth of the NAS with the same other device brings more than 300 Mbit/s throughput.
Unfortunately I can't benchmark the direct connection between the TV and the NAS because I can use only iperf (not iperf3) on the NAS, while I could only find an app with just iperf3 (not iperf) support on the Play store for the TV, but I think that the two tests I made are enough to exclude a bandwidth problem between the TV and the NAS.
Also trying a speed test for the Internet connection from the TV brings a 60 Mbit/s, which is the maximum allowed by my VDSL connection. So, once again, the cable interface of this TV is able to sustain at least 60 Mbit/s (but almost certainly around the theoretic 100 Mbit/s supported by the interface).
Nevertheless, streaming the mentioned contents in Kodi leads to frequent buffering problems.
The same contents reproduced by the same TV using VLC play just fine, no buffering problem at all and very quick seeks.
I also tried to switch the TV to use the WiFi connection: it connects at 2,4 GHz at around 130 Mbit/s, but I don't see any improvement with Kodi (still buffering problems occur), and I wouldn't expect any.

Playing the same contents from the same source NAS with a €20 FireTV Stick, on the same network (but even with a WiFi connection!), with Kodi 18.9 works perfectly fine, with no buffering problem at all.

I already tried to change the video cache in the Sony TV with the following options:

xml:

<advancedsettings>
  <cache>
    <buffermode>4</buffermode>
    <memorysize>52428800</memorysize>
    <readfactor>30</readfactor>
  </cache>
</advancedsettings>

Perhaps this helps a bit, because it seems like to double the available cache size, but doesn't fix the problem.

Any idea on what could be causing this behaviour? Is there any Kodi settings that may impact on the speed at which Kodi can read from the local network?
Hi, sorry for not helping but just wanted to chime in, I have Sony TV as client (2020 model with enough juice) connected by WLAN to quad-core server with SMBv3 share. WLAN speed is 250-300MBit so more than enough (measured with iperf3 TV <-> server). I have also tested NFS shares which does not make significant difference.

I believe there is something weird going on with buffering settings in Kodi 19/Android (I have not used Kodi 18.x). _Whatever settings_ I have tried manually always ends up with terrible buffering. If I remove advancedsettings.xml (e.g. back to defaults whatever those are) I get best results. Jellyfish 140Mbps sample plays fine with defaults but if I make any custom settings for buffering/cache I get problems. Unfortunately at the moment I don't have other hardware powerfull enough to test same share as client.
(2021-04-07, 07:04)wsnipex Wrote: [ -> ]see https://github.com/xbmc/xbmc/issues/19429

This is promising, thank you! I will monitor its progress.