Playback of UHD over WiFi unwatchable due to stuttering

Hope someone with more knowledge can help me out with this.

Just upgraded to 4k setup everywhere, but playback of the files seems impossible due to stuttering/buffering. I’ve verified that everything works if using ethernet, but I can’t draw cables in a sane way.

IPerf output shows:
osmc@osmc:~$ iperf3 -c 192.168.1.5 -p 5201 -t 60 -i 10
Connecting to host 192.168.1.5, port 5201
[ 4] local 192.168.1.155 port 52606 connected to 192.168.1.5 port 5201
[ ID] Interval Transfer Bandwidth Retr Cwnd
[ 4] 0.00-10.00 sec 166 MBytes 139 Mbits/sec 0 128 KBytes
[ 4] 10.00-20.00 sec 206 MBytes 173 Mbits/sec 0 212 KBytes
[ 4] 20.00-30.00 sec 211 MBytes 177 Mbits/sec 0 214 KBytes
[ 4] 30.00-40.00 sec 213 MBytes 179 Mbits/sec 0 214 KBytes
[ 4] 40.00-50.00 sec 213 MBytes 179 Mbits/sec 0 214 KBytes
[ 4] 50.00-60.00 sec 214 MBytes 179 Mbits/sec 0 214 KBytes


[ ID] Interval Transfer Bandwidth Retr
[ 4] 0.00-60.00 sec 1.19 GBytes 171 Mbits/sec 0 sender
[ 4] 0.00-60.00 sec 1.19 GBytes 171 Mbits/sec receiver

iperf Done.

Which is far higher than the bitrates on the movies (20-50Mbps depending on movie).

I’m sort of at a loss, can the mounting be the issue?

Right now I am mounting SMB through AutoFS, since my NAS is running windows afaik that’s the highest performance I can get right?

This looks good, only advice would be to run iperf3 for longer time

Add the option ‘-R’ to iperf3 and do the test again.
iperf3 -c 192.168.1.5 -p 5201 -t 60 -i 10 -R

1 Like

You could try using HaneWin NFS server to set up a simulated NFS share - might get marginally better performance that way. Depends where the bottleneck is.

Can you post a log please.

osmc@osmc:~$ iperf3 -c 192.168.1.5 -p 5201 -t 60 -i 30 -R
Connecting to host 192.168.1.5, port 5201
Reverse mode, remote host 192.168.1.5 is sending
[ 4] local 192.168.1.155 port 52934 connected to 192.168.1.5 port 5201
[ ID] Interval Transfer Bandwidth
[ 4] 0.00-30.00 sec 420 MBytes 117 Mbits/sec
[ 4] 30.00-60.00 sec 453 MBytes 127 Mbits/sec


[ ID] Interval Transfer Bandwidth
[ 4] 0.00-60.00 sec 873 MBytes 122 Mbits/sec sender
[ 4] 0.00-60.00 sec 873 MBytes 122 Mbits/sec receiver

Still seems to be way above the actual bitrate…

Log from KODI? Or some other log?

This is still a lot less then what you posted first and this is the one that counts.
Try changing what channels your wifi transmits on and redo the iperf3 test, keep changing channels until you see some improvements.

I’d recommend that you don’t specify the interval (-i) since a 30-second interval can mask transient events.

Remember that iperf3 measures just the network performance. The problem might, for example, be with the server.

To produce logs run grab-logs -A from the command line and post the URL.

Kodi. Turn on debug logging, reboot twice, Play a video till it reproduces the problem, then upload a log with either the grab-logs -A or OSMC app in Kodi.

I’ve experienced similar issues in the past to streaming UHD MKV files over Wi-Fi, below are the solution that worked for me:

  • Force the Vero 4K+ box to connect via 802.11ac 5GHz wireless connection.
  • Enable and tweaked file cache in Kodi.
  • Use autoFS to mount a NFS share on the NAS.

The last OSMC update has brought everything back in line and I’ve not had buffering issues since.

However, there are a few things I’ve noted:

  • My iperf3 test is well over 200Mbps Rx/Tx but actual usable rate over NFS is around 95-130Mbps, likely of some kind of protocol overhead or fragmentation.
  • The total data rate is a combination of video (which can vary between 9 - 90Mbps from experience) and audio streams (varies between 1 - 8Mbps), plus any other metadata that is part of the package.
2 Likes

Done, over a 60 second period it hovered around 120Mbps, both with and without -R, lowest dip was 86ish but that was only for a second so file cache should have dealt with that.

Added as a pastebin at https://pastebin.com/CzthvK5e , hope that’s OK.

Please follow @darwindesign’s instructions above:

and provide full logs, not just a Kodi log.

2 Likes

https://paste.osmc.tv/owoteleruy

Should have full logs.

I am running in 1080p still (new TV hasn’t arrived), but the same file works fine if I just connect the ethernet. Could it simply be that WiFi eats up tons of CPU power?

Could you try removing these lines from your advancedsettings.xml file, reboot, and test again with the wifi…

	<cache>
		<buffermode>1</buffermode>
		<memorysize>139460608</memorysize>
		<readfactor>20</readfactor>
	</cache>

Although unrelated and should just be getting ignored by Linux, I am curious exactly why so many of your sources have double slashes where they don’t belong…

/mnt/mainpc//mnt/WD-WMC1T1033442/Movies/

On another unrelated note I would suggest turning on sync playback to display (on start/stop).

100 Mbit or 1 Gbit?

Unlikely.

@darwindesign beat me to it on the caching parameters. :slight_smile: One other observation is that you’re using WiFi channel 100 that is a DFS channel, so might show breaks if it feels the need to jump to a new channel.

I had kind of the same problem, all media on a dedicated server (that also runs mysql for among other things kodi), and the vero 4k+ had some issues playing back the files on wifi, my tv can play those same files via upnp and is wireless. With some tweaking I could play most files wireless on the vero but skipping forward/backward was significantly slower than with a cable. So i use a cable.

(I could even use my laptop as kodi upnp server (files still on dedicated server), wireless on both laptop and tv)

My conclusion was that both the tv and laptop has a 2x2 antenna and the vero 4k+ only has 1x1.

Increasing the cache size and the readfactor in kodi was what made it better for me, but I would have needed more ram for it to be really useful (those 4k movies are huge which fills the cache fast). (using and external ssd for the cache could probably be an option, but it would add more cables and that was what I was trying to avoid)

I took some days testing and mailing back and forth with @sam_nazarko who was helpful. I’m satisfied with my setup, it plays everything silky smooth (hdr10+ is the only thing on my wishlist, but my tv can play those via upnp until the vero can do that too).

The next update has some improvements here.

1 Like

No idea, it works so I never bothered.

Done, no difference sadly =(

1Gbit

It’s weird though since the actual throughput seems fine, the file I’m testing with has an avg bitrate of 30Mbps and speed is around 4 times that…

Weird, my file skips as fast as cable (or at least extremely close to it)

what is the device that the Vero is connecting to wirelessly? If you drew a straight line from the Vero to that device what exactly is between those two points?

An ASUS RT-AC66U

Only a small door frame, which is like 3cm of drywall in total. Distance is like 4m so nothing crazy.