I played around with advancedsettings.xml extensively and wasn't able to solve the buffering issues at all. I then stumbled across a thread that suggested using system mounts rather than what Kodi uses (which I think is libsmb). This has fixed the problem! No buffering at all.
To set this up, SSH into your box and make a copy of /storage/.config/system.d/cifs.mount.sample (in the same directory) and then follow the instructions contained within it.
Sorry to hijack such an old thread, but I am trying to do what is being suggested here. Amending the sample file was pretty straight forward so I have:
# The share we want mount
What=//192.168.178.10/Film6
# Where we want mount this share
Where=/storage/film
I also set the loginname and password for the windows smb share.
Then I named the file storage-film.mount, and put it in the storage directory, then ran enable storage-film.mount which it said was succesful.
But how do I then make it visible in Kodi? It does not show up when I go to add a location, and I actually also tried there to add an SMB share there by enterting the pi´s network IP address and then the folder named film, but it does not manage to connect to it..
I never had issues with buffering on xbian, so theres either a larger buffer there or they mount in the background in the way I´ve just done it, dunno. It plays fine from a USB stick and the pi is on cable to my router where it gets a 100 mbit speed.
I should also add that its not all content giving me this problem. Stuff where an hour is 2 GB works fine, but a movie I just wanted to watch which is 100 mins long and 9 GB in size would stop and buffer every 10 secs..
Edit: I checked the status of the mount and got the following. Maybe someone can provide an explanation based on that:
● storage-film.mount - test cifs mount script
Loaded: loaded (/storage/.config/system.d/storage-film.mount; enabled; vendor preset: disabled)
Active: failed (Result: exit-code) since Sun 2019-04-21 20:30:57 CEST; 3h 40min ago
Where: /storage/film
What: //192.168.178.10/Film6
LibreELEC:~ # # The share we want mount
LibreELEC:~ # What=//192.168.178.10/Film6
LibreELEC:~ #
LibreELEC:~ # # Where we want mount this share
LibreELEC:~ # Where=/storage/film
LibreELEC:~ # Jun 22 13:11:56 LibreELEC systemd[1]: Mounting test cifs mount script...
LibreELEC:~ # Apr 21 20:30:57 LibreELEC mount[438]: mount: mounting //192.168.178.10/Film6 on /storage/film failed: Permission denied
LibreELEC:~ # Apr 21 20:30:57 LibreELEC systemd[1]: storage-film.mount: Mount process exited, code=exited status=255
LibreELEC:~ # Apr 21 20:30:57 LibreELEC systemd[1]: storage-film.mount: Failed with result 'exit-code'.
LibreELEC:~ # Apr 21 20:30:57 LibreELEC systemd[1]: Failed to mount test cifs mount script.
LibreELEC:~ # Jun 22 13:11:56 LibreELEC systemd[1]: Mounting test cifs mount script...
LibreELEC:~ # Apr 21 20:30:57 LibreELEC mount[438]: mount: mounting //192.168.178.10/Film6 on /storage/film failed: Permission denied
LibreELEC:~ # Apr 21 20:30:57 LibreELEC systemd[1]: storage-film.mount: Mount process exited, code=exited status=255
LibreELEC:~ # Apr 21 20:30:57 LibreELEC systemd[1]: storage-film.mount: Failed with result 'exit-code'.
LibreELEC:~ # Apr 21 20:30:57 LibreELEC systemd[1]: Failed to mount test cifs mount script.
Display More
EDIT (again): Went off to try doing this via NFS instead. This seems a bit more stable, less buffering occurs but is still there..
Another edit: I did as suggested in the beginning although I was under the impression that it would not work and took the 4th example from:
HOW-TO:Modify the video cache - Official Kodi Wiki
That didnt do nothing for SMB indeed, but seems to now have cured the buffering under NFS!
Still would like to know how to get things working with SMB though.