4k buffering/stuttering

Hi

Just got my Vero 4k, and trying to get it to work with 4k media. High quality media seems to buffer/stutter a lot. I hope someone here can help me :slight_smile:

I have uploaded logs here http://paste.osmc.tv/saduhezose

The Vero is connected to 5ghz ac wifi, and when i run iperf i get ~180Mbits/sec consistently ( http://paste.osmc.tv/uwiseyibat )

Overall bitrate of the file tested with is 63.9 Mbps (mediainfo: http://paste.osmc.tv/ocegekijak ) so bandwidth should be ok… right?

I have tried different settings for buffermode/memorysize/readfactor in advancedsettings.xml, but it does not seem to fix my problem.

I have also tried mapping the smb share using fstab, from the guide in this thread https://discourse.osmc.tv/t/configuring-fstab-based-samba-share-mounts/38167 only difference is that i had to add vers=3.0, or else it would not mount the drive, but this have even worse performance than the builtin smb in kodi.

Anyone have any ideas to what could be causing my problem?

  1. Your wifi seems to be stable. I’d expect ~180 Mbits/sec to be enough.
  2. Is the problem confined to just one file?
  3. To eliminate any possible network issues, have you tried to copy it to a locally attached device or to the Vero4K,s internal eMMC storage?
  4. I’m surprised that you found Kodi SMB to be faster than using the fstab. Could you post the /etc/fstab line you used?

+1

Hey, thanks for reply.
The problem is for multiple files.
I have tried copying the file to an external USB hdd, and directly attached to the Vero, then it runs smooth.
I am linux rookie, so I might have done something wrong with the fstab hehe. The line i added was:
//192.168.1.40/movies-d /mnt/movies-d cifs vers=3.0,x-systemd.automount,noauto,rw,iocharset=utf8,username=XXX,password=XXX,uid=osmc,gid=osmc,file_mode=0770,dir_mode=0770 0 0

I tried without the vers=3.0, but then it would not mount.

Did you change the source in Kodi to point to the new /mnt/movies-d instead of the original smb:// source?

What’s in your ~osmc/.kodi/userdata/advancedsettings.xml

Yes I did.

Currently my settings are:

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

but also tried:

   <buffermode>1</buffermode>
   <memorysize>90000000</memorysize>
   <readfactor>10</readfactor>

I edited your post for you. Instead of using Blockquote, use Preformatted for your future reference.

I forgot to ask you to also show the contents of sources.xml (found in the same directory as advancedsettings) And repost your advancedsettings.xml, not just a snippet of it.

Sorry about that.
I have copied both here: Link removed
(For testing using the new fstab mount, i just added it from files)

First thing, get rid of the banned addons in your sources.xml before we continue much further :wink:

I’d suggest that you start with a clean sources.xml. (you can copy your current one to back it up) with only the fstab mounted shares.

As for the cache settings, these are the current recommended for the 4K;

 <cache>
  <memorysize>524880000</memorysize>
  <buffermode>1</buffermode>
 </cache>

Hey

I cleaned out the config files: http://paste.osmc.tv/sonucugasu

No difference in speeds. What is weird for me, is that if i read using smbclient, the speed is way faster.

using mount in fstab:

osmc@vero:~/Movies$ dd if=/mnt/movies-d/test.file of=/dev/null bs=1M count=3072
115+1 records in
115+1 records out
121505600 bytes (122 MB) copied, 110.04 s, 1.1 MB/s

Using smbclient:

osmc@vero:~/Movies$ smbclient //192.168.1.40/movies-d --user=vero -m SMB3
Enter vero's password:
Domain=[BEASTIE] OS=[] Server=[]
smb: \> get test.file /dev/null
getting file \test.file of size 121505600 as /dev/null (12205.1 KiloBytes/sec) (average 11666.6 KiloBytes/sec)

I am confused :smiley:

Yes, strange. What’s the output from running the command mount?

osmc@vero:~$ mount
devtmpfs on /dev type devtmpfs (rw,relatime,size=803956k,nr_inodes=200989,mode=755)
proc on /proc type proc (rw,relatime)
sysfs on /sys type sysfs (rw,relatime)
tmpfs on /run type tmpfs (rw,relatime)
/dev/mapper/vero--nand-root on / type ext4 (rw,relatime,stripe=1024,data=ordered)
securityfs on /sys/kernel/security type securityfs (rw,nosuid,nodev,noexec,relatime)
tmpfs on /dev/shm type tmpfs (rw,nosuid,nodev)
devpts on /dev/pts type devpts (rw,nosuid,noexec,relatime,gid=5,mode=620,ptmxmode=000)
tmpfs on /run/lock type tmpfs (rw,nosuid,nodev,noexec,relatime,size=5120k)
tmpfs on /sys/fs/cgroup type tmpfs (ro,nosuid,nodev,noexec,mode=755)
cgroup on /sys/fs/cgroup/systemd type cgroup (rw,nosuid,nodev,noexec,relatime,xattr,release_agent=/lib/systemd/systemd-cgroups-agent,name=systemd)
cgroup on /sys/fs/cgroup/cpuset type cgroup (rw,nosuid,nodev,noexec,relatime,cpuset)
cgroup on /sys/fs/cgroup/cpu,cpuacct type cgroup (rw,nosuid,nodev,noexec,relatime,cpu,cpuacct)
cgroup on /sys/fs/cgroup/memory type cgroup (rw,nosuid,nodev,noexec,relatime,memory)
cgroup on /sys/fs/cgroup/devices type cgroup (rw,nosuid,nodev,noexec,relatime,devices)
cgroup on /sys/fs/cgroup/freezer type cgroup (rw,nosuid,nodev,noexec,relatime,freezer)
cgroup on /sys/fs/cgroup/blkio type cgroup (rw,nosuid,nodev,noexec,relatime,blkio)
cgroup on /sys/fs/cgroup/bfqio type cgroup (rw,nosuid,nodev,noexec,relatime,bfqio)
systemd-1 on /mnt/movies-d type autofs (rw,relatime,fd=22,pgrp=1,timeout=300,minproto=5,maxproto=5,direct)
systemd-1 on /proc/sys/fs/binfmt_misc type autofs (rw,relatime,fd=24,pgrp=1,timeout=300,minproto=5,maxproto=5,direct)
mqueue on /dev/mqueue type mqueue (rw,relatime)
debugfs on /sys/kernel/debug type debugfs (rw,relatime)
fusectl on /sys/fs/fuse/connections type fusectl (rw,relatime)
configfs on /sys/kernel/config type configfs (rw,relatime)
//192.168.1.40/movies-d on /mnt/movies-d type cifs (rw,relatime,vers=3.0,sec=ntlmssp,cache=strict,username=vero,domain=BEASTIE,uid=1000,forceuid,gid=1000,forcegid,addr=192.168.1.40,file_mode=0770,dir_mode=0770,nounix,serverino,rsize=65536,wsize=65536,actimeo=1)
tmpfs on /run/user/1000 type tmpfs (rw,nosuid,nodev,relatime,size=183220k,mode=700,uid=1000,gid=1000)

I don’t see anything obvious but the mount is using a few options that I’m unfamiliar with - nounix,serverino - and I’m unsure of their consequences. The blocksize is 65536, which should be large enough.

Out of interest, what’s the server? I noticed you had an NFS share defined in the Kodi sources.xml file for the server’s IP address. Is NFS a possibility?

I got the options from this post: https://discourse.osmc.tv/t/configuring-fstab-based-samba-share-mounts/38167

The “server” is a Windows 10 1709 machine. I Tried to install a NFS server on the Win10, but it turns out, it’s not super easy to do that, so I never succeeded with that :slight_smile:

Understood. I don’t use Win10.

Perhaps @Tom_Doyle or @fzinken might be able to take this one forward.

Hi,

If you are using Windows I would stick to samba/cifs as the windows NFS support is iffy at best. I would suggest mounting cifs using fstab, for better throughput.

Thanks Tom.

Hey Tom

That is what I do :smile:

Hi,

Sorry been a long week and only speed read the thread, and seen kodi smb mounts.

As Dilthedog has advised a constant 180 Mbits/sec, should be more than amble for stable playback of 4k. Have you tried playing these files back locally from usb or sdcard?

Thanks Tom.

Yea, I tried to connect a USB HDD directly, and then it plays fine

Hi,

Is the the win10 machine connected to network via wired or wifi and when you ran iperf, was the win 10 machine the iperf server?

Despite my previous statement about windows nfs support being iffy (which it is) it may provide better throughput in this case, can you provide a link to the instructions you have been following?

Thanks Tom.