OSMC Problems playing Movies from NAS

Hey,

I’ve installed OSMC on my Raspberry Pi 3 and everything works fine if I’m playing movies from a USB Drive or if I’m streaming from an app.
Moreover a NAS folder (SMB) is added as a video source. Scanning this library also works fine.

The problem is that watching movie files in DVD quality from the NAS is barely ok. However playing a 720p file is nearly impossible. The video is stuttering and always buffering.

The Raspberry Pi is connected per WLan with a good signal quality.

Do you have any ideas?

Hi,

A log showing the issue would help:

Also are the SMB shares mounted via fstab?

Thanks Tom.

hey. Thanks for the answer. I will provide a logfile soon.

However I’ve no idea if I mounted the shares via fstab.

I’ve mounted it by “adding sources”. There I tried out “windows network (SMB)” and “zeroconf browser”. This two options do not make any performance difference.

Hi,

You should get better playback using fstab mount smb shares, which from sounds of it you are currently not using.

searching the forum for smb or samba fstab, should give you good overview of the setup, if not give us a shout and we will help you set it up. If you provide more details about the nas, this will give us more idea what the fstab entry should be.

Logs would still be helpful

Thanks Tom.

If you can get a USB keyboard, attach it to the Pi and then reboot.

Before playing a video, type Ctrl-Shift-o on the keyboard and you should see some diagnostic information appearing at the top of the screen. You’re interested in the number after “Forward:” since that’s the amount of data in the read-ahead cache.

Try playing different videos and see if you can see any kind of pattern emerging. For example, does the stuttering/buffering occur when Forward falls to zero bytes?

Would be good to see the mediainfo output of that file.

Good signal doesn’t mean stable throughput. Suggest to run iperf3 for 2 minutes and see any throughput issues.

I was having a similar problem (mostly with 1080p content though) when I first setup OSMC on my Raspberry Pi 3. Based on some stuff I found on this forum and on the Kodi wiki, here are a couple of things:

1- If you haven’t purchased the MPEG2 and VC1 licenses, do that. You really need to do hardware decoding of MPEG2 and VC1 material.

2- I added the following to my advancedsettings.xml and it really helped:
<cache>
<memorysize>157286400</memorysize>
<buffermode>1</buffermode>
<readfactor>20</readfactor>
</cache>

That increases the size of the video cache as well as the speed at which Kodi reads data from the network.

Hey guys,

I’ve provided an osmc logfile which you can find at

https://paste.osmc.tv/nonokaxovo

I stopped the movie after some minutes when the buffering starts. Also I made a media info file from the played movie.
https://drive.google.com/open?id=11fhKIxyrM0k8YGMqv7MFohuDlTrekQwU

By pressing Ctrl-Shift-o I saw that the buffering, stuttering and sound problems start when the value after forward is at 0%.

I’ve installed also iperf3. However even after some reserach I’ve absolutely no idead how I can test the connection to my NAS (old DLINK DNS 323 Raid0 2 TB) with this tool

First thing, get rid of the banned add-ons. Those could be causing you problems.

Second, please supply a mediainfo of one of the files, as @fzinken asked you to do.

Full debug logs could also help, not just the kodi log.

If you can’t install iperf3 on your NAS, you can run it on another (preferably wired) system on your network.

Hey,
Sorry, I thought you can address my second link (google drive) which should provide you the media info file.

Here’s the link to the full logs:
https://paste.osmc.tv/voyeqojama

This is the iperf3 file between the raspberry pi 3 (wlan) and my notebook (wlan):
https://drive.google.com/open?id=1scjnrwjVqgagFuN5wj-0L71yiVMLoGK5
also I did another one raspberry pi 3 (wlan) and my notebook (lan):
https://drive.google.com/open?id=1EzqBoge4e2huZS7I_NkQlL5ycH76ziWr
Of course the NAS is also connected per Lan (100Mbit)

I hope that the links are working.

[  6]   0.00-180.01 sec   859 MBytes  40.0 Mbits/sec                  receiver

That’s probably part of your problem. If possible, connect your Pi to the lan, instead of the wlan.

It doesn’t look like you have the VC1 or the MPG codecs for the Pi. Since you still have not given us the mediainfo of one of the files I can’t say for sure if that’s also part of the problem.

Ok. Than once again. If this isn’t the media info you want I currently don’t know what you mean:

http://paste.osmc.io/amuzevevok.tex

However the problematic video files work fine if I play them from a USB drive connected to the Pi.
Sadly it’s not possible for me to connect the Pi per Lan at its position.

Yes, that was the mediainfo we were looking for.

I see you are using Kodi to mount the SMB shares. You should look at using fstab to mount them as you will get better performance: Configuring fstab based Samba share mounts

Or even better, if your NAS supports NFS, use that instead.

Hey, thanks for your help.

However this brings me to the next problem. There is an dlink addon from 2011 which provides a NFS server for the NAS. I’ve just installed it.

By adding a source and searching the network, osmc finds the right ip-address of the NAS, but it can’t access to it. There is only the loading symbol after clicking on the IP and nothing happens.

From the Pi, try:

$ showmount --exports name_or_ip_of_nas

that will show if the mounts are properly exported on the NAS.

Export list for 192.168.1.5:
/mnt/HD_a2/Medien retropie

However I dont know why there is “retropie”

I can find this in the file manager:
/mnt/HD_a2/Medien

Trying to connect to the server leads to the message: no connection to network server

Edit:
I just found out that many people complain about a buggy NFS NAS addon. But there is a fun_plug which will provide better NFS support. I’ll try that out.

You will have to check the setup on the NAS, but they do some odd things sometimes. showmount show you the directories that are exported, but not the actual way they are shared. On my nas, they are shared as /nfs, to the actual mount would be /nfs/Medien, not /mnt/HD_a2/Medien

The retropie part of the line is what systems are allowed to mount that share. For a secure home network, you probably want to just have the allowed system as *

Hi,

I used to use fun_plug but its quite out of date now, I assuming your nas is a dlink. Modify your current samba Medien):

tick nfs, (if its like my dlink cifs & afp will ticked by default) click next

you should be presented nfs settings:

Set host to your ip subnet /24 so for example 192.168.1.0/24 and tick Root Squash and write if required. Click next and finish

On pi

showmount --exports ip of nas, to confirm the share is now correct

should appear: /mnt/HD_a2/Medien 192.168.1.0/24

sudo mkdir /mnt/Medien

sudo nano /etc/fstab

Add the following entry:

ipaddressofnas:/mnt/HD_a2/Medien /mnt/Medien nfs x-systemd.automount,noauto,ro

you can change ro to read write if required.

sudo mount /mnt/Medien

if you get no errors

ls /mnt/Medien confirm you can see your subfolders and files

The mount should now come up on reboot, you can test to confirm

To add video sources select browse, root file system mnt, Medien and then select the subfolder required e.g. _hd movies

Thanks Tom.

1 Like

hey,
I’ve installed fun_plug on my DNS 323, however it wasn’t worth the effort.

Also I set up the NFS server on my NAS with the original DLINK addon. It only works properly if i set * as host. It just doesn’t work if I use a subnet, but that’s not a problem at all - only more work for me.

First of all I tried out adding a new NFS source in Kodi file manager. It works much better than the samba source, but movies stuttered also a bit.
So I mounted the NFS share via fstab according to @Tom_Doyle instruction. It works really well now. No stuttering and buffering any more. Thanks for your help :slight_smile:

But why is mounting via fstab so much better? Respectively why is NFS via adding sources not the same?

1 Like

One uses kernel base driver the other a userspace driver

1 Like