Buffering/Stuttering of 1080p Videos

Hi there,
unfortunately I have some props playing full HD videos with the latest OSMC on the Pi3.
The Problem is not new as I have it some weeks ago on the first LibreElec install with Kodi, and I read a lot about that and finally I found a solution in a forum by using an external Gigabit Ethernet Device instead of the internal 100Mbit one. Any other solution does not had any positiv effect.
Noone really knows why but it works. The Storagepath is on a NAS mounted to the PI with fstab.
The LibreElec is just to small, and even the apt-get does not work, but I want to run something else in the background.
I tried OSMC and nearly everything worked well, except the buffering issue with large vids. Of course the first thing I thought of is the deluge client in the background, and I setup a clean install of osmc without anything else, but the buffering is still there.
After that I changed the SD-Card to a clean LibreElec and the buffering is gone. So I am quite sure that there is no issue with my network or the NAS. I’m assured that the issue is somewhere with the osmc, but I have no idea what to do.
As a workaround the pi runs normally with the osmc and the deluge-client in the background, but to watch a movie I change the SD-Card with that one on wich LibreElec is installed and plays without buffering.

1 Like

@Syncro20VTurbo

Hi,

First off some logs would be good

how-to-submit-a-useful-support-request

Also with testing I found Gigabit Ethernet, caused more problems than it solved.

Also have you looked at kodi video cache.

I’m running the latest osmc with kodi v17 and these settings work well me (my videos are also on a Nas:)

<cache>
	<memorysize>157286400</memorysize>
	<buffermode>1</buffermode>
	<readfactor>4.0</readfactor>
</cache>

Thanks Tom

1 Like

Well this could be an explanation why the USB dongle works slightly better

1 Like

Hi Tom,

thanks for that quick reply.
I added the kodi.log and hopefully you can find something usefull in it. If you need something more please let me know. While the debugging was turned on, there was a generally lag of the gui and I hope this will not have an impact to the log.

kodi.log

During the hole test the osmc was fresh restarted and the deluge client hat not been started.
The lag of the movie is still there.
Yes of course I read a lot about the video cache an did a lot of experiments with it while searching for the issue with the LibreElec buffering some weeks ago, and not even one of the tested settings was able to solve this. However, that’s why I did not try to play around with these settings here, because I’m pretty shure that it will not have any effect.
Anyway, I tested your suggested settings of the created advancedsettings.xml and as I expected the lag is still there.
As I wrote in the initial post, the same movie plays without any lag or issue with the LibreElec. I can not grab the difference, but for me it’s clearly that it is nothing in the settings or the network or the pi itself. The LibreElec with kodi does not has a factory delivered advancedsettings.xml as well. So why should the Problem be in there?

Thanks fzinken for sharing this report, it is very interesting.

Kind regards Mathias

You should show us the mediainfo output for a problematic file. How to do so is in the useful support request link above.

Hi ActionA,

here is one of the files, but all of the (tested) HD ones have the same issue.

Media Info

Hi Syncro20VTurbo,

Does this show the issue after you added the suggested to advancesettings.xml?

If so where are you placing the file?

> "15:08:13.394 T:1959101360  NOTICE: Loaded settings file from special://xbmc/system/advancedsettings.xml
> 15:08:13.394 T:1959101360  NOTICE: Contents of special://xbmc/system/advancedsettings.xml are...
>                                             <?xml version="1.0" encoding="UTF-8" ?>
>                                             <!-- Do not modify! These are OSMC Optimised Settings for your device  !-->
>                                             <!-- If you wish to override any of these values, then create a file in /home/osmc/.kodi/userdata/advancedsettings.xml !-->
>                                             <!-- It will override these settings, and your settings will be preserved across OSMC updates !-->
>                                             <advancedsettings>
>                                               <imageres>540</imageres>
>                                               <fanartres>720</fanartres>
>                                               <splash>false</splash>
>                                               <handlemounting>0</handlemounting>
>                                               <samba>
>                                                 <clienttimeout>30</clienttimeout>
>                                               </samba>
>                                             </advancedsettings>
> **15:08:13.397 T:1959101360   ERROR: Error loading special://profile/advancedsettings.xml, no <advancedsettings> node**"

It seems when OSMC is loading up its only finding the system default one.

advancesettings.xml should be placed in /home/osmc/.kodi/userdata/advancedsettings.xml.

If this log is showing without the suggested changes to advancesettings.xml, then apologies and I’ll take another look.

Thanks Tom.

Hi Tom,

the issue with the changed xml settings is the same as without placing the file. So there is no difference. I did not recieve an issue Message or something.
/home/osmc/.kodi/userdata/advancedsettings.xml is the path the xml is stored on my pi. So your correct, the log is showing the suggested changes in the xml file.
I have no idea why the xml does not load on startup.

Hi,

This is the lines from my kodi log:

21:58:15.078 T:1958871984  NOTICE: Loaded settings file from special://profile/advancedsettings.xml
21:58:15.078 T:1958871984  NOTICE: Contents of special://profile/advancedsettings.xml are...

So for some reason your osmc is not picking up your advancesettings.xml, can you please post the contents of that file?

Thanks Tom.

Hi Tome,

sure:

<cache>
	<memorysize>157286400</memorysize>
	<buffermode>1</buffermode>
	<readfactor>4.0</readfactor>
</cache>

Maybe this is missing:

<advancedsettings>
...
</advancedsettings>

?

@Syncro20VTurbo
Hi,

Yes I would try adding those.

Then you will need to restart again. You can check the log to see if its loaded correctly, it located /home/osmc/.kodi/temp

Also

Thanks Tom.

Hi Syncro20VTurbo,

From looking at you logs you seem to be using samba for sharing you vids, you may get better playback with NFS kernel shares,

here is some guidance for setting up on WD cloud, steps 1 to 3 mainly.

I found these fstab settings on osmc worked the best:

IP:/folder share /mnt/video/ nfs x-systemd.automount,noauto,ro

Then add the video source in osmc:

browse

root file system

mnt

video

That should also help improve the playback.

Hi Tom,

it seems that the missing was the reason why the file did not load on startup.
After correction of this the log shows:

> 15:58:22.541 T:1958167472  NOTICE: Loaded settings file from special://profile/advancedsettings.xml
> 15:58:22.542 T:1958167472  NOTICE: Contents of special://profile/advancedsettings.xml are...
>                                             <advancedsettings>
>                                               <cache>
>                                                 <memorysize>157286400</memorysize>
>                                                 <buffermode>1</buffermode>
>                                                 <readfactor>4.0</readfactor>
>                                               </cache>
>                                             </advancedsettings>

Looks as it loads on startup. Unfortunately there is no change in playing movies. As before there is buffering/stuttering. I will try to change the sharing setup, but could you first explain why this should help me out. So as I said the identical movies, from the same NAS on the same PI3 with the same Networkadapter and so on, just with a change from OSMC to LibreElec plays with no stuttering/buffering. So it is hard for me to understand where the difference should be…
I did write another thing I noticed while the logging is enabled some posts ago. The handling in the gui is also not flowing. Every some seconds there is a short break. Different to the buffering while palying a movie, the complete gui does stop for that second or so. While playing the movie the gui does responds normaly.

Hi Syncro20VTurbo,

Can you please post a full log, with the advancesettings.xml loaded correctly.

Have you tried playing these files without the external gigabit adaptor, using the internal 100 mbit on osmc?

NFS shares: There are several posts in this forum that recommend nfs kernal shares, in testing I found this the best.

Libelec: I can’t advise why they play with no issue, as I’ve not used Libelec and I’m not a developer. I’ve just got a very similar setup as you and what I’ve advised works for me on OSMC.

Thanks Tom.

Hi Tom,

of course, here is the full log: kodi.log

Yes, to play the files with the internal 100MBit Ethernet port was one of the first things I tried after your first post and there are the same probs.

So I will try to setup the nfs share later and post the results.

Hi,

it may be worth trying to play the vids local, either from the SD Card or usb drive. Just to confirm it definitely isn’t a network related issue.

Thanks Tom.

Hi Tom,

thanks a lot for your support. The NFS share seems to be the correct option to solve the issue I have.
I’m totally confused about that, because on another pi, but with the same NAS I have a lot of Problems sharing a mysql Database via NFS.
Anyway, while connecting through NFS to the shared folders of the NAS it looks that the movies play fine. I’m not totally finished with testing, but at this point everything looks great.
So again: Thanks a lot for the great support.

Kind Regards Mathias

Glad to hear you got your videos playing correctly.

Thanks Tom.

Did you remember to buy and input the proper codec licenses? Mine was sticky too until I did that, and now it’s smooth as glass. My setup very similar to yours.

Hi David,

I did not bought any codec, never. Not in OSMC nor the LibreElec, and for now nearly everything is fine.
I have two stutters while playing a whole movie, and I’m not shure where it commes from. Maybe huge Networktraffic or so, but I will figure it out.

So what kind of codecs you are speaking from?

Kind regards Mathias