Determining source of buffering

Dear friends,
I am experiencing severe buffering issues on a single data stream (so far).

Here is the mediainfo for that file:

Unique ID                                : 80178881262574009327528025547139563302 (0x3C51E40DA37071278500E81E53F1BF26)
Complete name                            : The.Best.Nature.Video_hires.mkv
Format                                   : Matroska
Format version                           : Version 4
File size                                : 30.4 GiB
Duration                                 : 2 h 19 min
Overall bit rate mode                    : Variable
Overall bit rate                         : 31.2 Mb/s
Encoded date                             : UTC 2022-06-22 20:08:34
Writing application                      : mkvmerge v67.0.0 ('Under Stars') 64-bit
Writing library                          : libebml v1.4.2 + libmatroska v1.6.4

ID                                       : 2
Format                                   : AVC
Format/Info                              : Advanced Video Codec
Format profile                           : High@L4.1
Format settings                          : CABAC / 4 Ref Frames
Format settings, CABAC                   : Yes
Format settings, ReFrames                : 4 frames
Codec ID                                 : V_MPEG4/ISO/AVC
Duration                                 : 2 h 19 min
Bit rate mode                            : Variable
Bit rate                                 : 26.3 Mb/s
Maximum bit rate                         : 37.0 Mb/s
Width                                    : 1 920 pixels
Height                                   : 1 080 pixels
Display aspect ratio                     : 16:9
Frame rate mode                          : Constant
Frame rate                               : 23.976 (24000/1001) FPS
Color space                              : YUV
Chroma subsampling                       : 4:2:0
Bit depth                                : 8 bits
Scan type                                : Progressive
Bits/(Pixel*Frame)                       : 0.528
Stream size                              : 25.6 GiB (84%)
Language                                 : English
Default                                  : Yes
Forced                                   : No

I am also attaching an hopefully self explanatory schema of the connections and iperf speeds between my Vero 4K+ and my media server (an RPi):

How can I understand where’s the bottleneck? Networking or Vero’s performance and/or support for that stream?


PS I don’t remember if the share from the media server to the Vero is Samba or NFS. How to tell?

Provide logs via MyOSMC - Log Uploader and share the URL

1 Like

It always stops buffering in the same spot after approx 10 seconds of playback. I see CPU number 2 pegged at 100%.

URL is

Thanks a lot

  1. Not related to your issue you should set your GUI resolution to 1080p (see below)
  2. you are using NFS (good) but you are using the Kodi internal NFS implementation which can give performance issues so you might want to try kernel based mounting (see below)

Is that with all files or only this specific file?

Kernel Mounts

GUI Resolution
We recommend people with 4K TVs set their user interface (UI) to 1080p. Kodi’s UI is not optimized for 4K yet and this can put unnecessary demands on your device and can lead to a suboptimal picture quality, as well as potentially cause other issues.

The settings we recommend are as follows…

Settings>System>Display>Resolution> 1920x1080p
Settings>System>Display>Whitelist> (empty) *
Settings>Player>Videos>Adjust display refresh rate>Always

Some televisions may also need, or benefit from, the following being set…

System>Display>Force 4:2:2 colour subsampling> (enable)

With the above settings your UI will be output in Full HD and your 4K content will be output in 4K.

*Information regarding the whitelist can be found here. If you have any doubt, feel free to upload some logs so we can verify that your settings are indeed correct.

1 Like

Thanks a bunch.
Yes this happens only with this stream.
Fixed the rest as per your kind suggestions.
Will now try to setup the NFS share as you hinted.

Than it might be an encoding issue. You always can try to play it from USB Stick/Disk to determine if it is a network issue or an issue of the file.

1 Like

For sure this is a large file, but I can play even larger files without problems so yes probably you are right.

Would you also switch to your NFS suggestion or let things as they are now?

Personally I would switch to autofs for the simple reason it is more performant and mounting to a local folder is more straight for future changes.

1 Like

Ok setup is working. Just a little detail is different since all mounted files belong to a 501.501 user. This is my “bob” user id on the remote system, while on Vero I am “osmc” with uid and gid = 1000.
Should I bother doing anything to fix this or should I just ignore?

I see this with the mount command:

/etc/auto.nfs.shares on /mnt/rpi4 type autofs (rw,relatime,fd=6,pgrp=3213,timeout=15,minproto=5,maxproto=5,direct,pipe_ino=23918)

looks good?

No way of seeing the occupied space? df does not show this mounted share

This autofs mount seems to create some problems.
Many several thumbnails of the movies are not rebuilt anymore despite having deleted the original source and recreated a new Movie resource pointing to the new mount. Will try reverting to the fstab and see if this changes.

When it is mounted df will show the occupied space, but remember it will automatically unmount if not accessed.

That depends on how you handle it on the server (e.g. using squash user), but normally I would suggest to create a osmc user with those ids on the server.

Thats odd, first you could try to remove the thumbnail database to force a rebuild.

1 Like