Raspberry Pi/KODI is freezing during movie play

What ethernet port/s are you using on that and exactly what are they plugged into?

If your NAS lacks the ability to run iperf or some similar tool then another option would be to plug in another computer in its place that does. The idea being that there is a problem somewhere and iperf is often a easy way to isolate away most lower level networking issues as being a cause.

You also didn’t answer my question about weather your using shielded plugs on your network cables. The plugs that attach to your RPi and NAS, are they covered in metal or not?

It was a cat 5e cable, unshielded, connecting the raspberry pi to the Netgear switch. Just switched it out to a cat 6 that’s shielded. I have the NAS plugged into the netgear switch with a shielded Cat 8 cable. I am using the 10GB NAS port on the back, which is LAN 1 at 1000Mbps. Also I have a utility in the NAS that is an activity monitor. Let me pull some data off of that and share it w/ you. Thanks!

You don’t need shielded cables. I asked as there has been people who used them and had issues as they don’t always fit correctly in consumer devices.

So you have only a single network cable plugged into the NAS and that is in the 10GB port and that is plugged into what, an unmanaged gigabit switch, managed gigabit switch, managed 10 gigabit switch?

Yes only 1 network cable into the NAS in the 10gb port and that goes into a unmanaged switch I just bought. It is a NETGEAR 8-Port Gigabit Ethernet Unmanaged Switch (GS108). I was having this issue before I bought the switch. I can watch movies just fine with a hard drive plugged into the USB port of the PI with zero issues. I also tested a Western digital media player that’s on the network and gets movies from the NAS and it freezes as well.

Why not test connecting to the nas by the gigabit port since you seem to have no other devices that support 10gb anyway?

1 Like

I thought about that but when I put it on the 1gb port, it’s a completely different IP and my NAS software can’t see it. I would have to redo the install of the NAS I believe. I played a lower quality movie last night w/o any issues but when I play a higher quality one it will freeze up.

Assuming that you use DHCP no your NAS then it is actually your router that you should configure to assign the same IP to the different MAC address of the 1GB port.

As indicated above first run IPERF test. If you can not run it on the Asustor (which would suprize me) you can still run it between the Vero and your PC first.

I would also run a large file transfer test with a PC plugged into where the RPi is and the NAS in addition to the iperf. In windows you can use the performance tab in the task manager to see a visual representation of a file transfer. If you see something other than a relatively smooth line that would indicate an issue.

If it was me I would switch over to the gigabit connection on the NAS even if it took a bit more setup.

I got it switched over to the other network port. but before I did, i ran the same high bit rate movie on my computer and also on my raspberry pi at the same time and it never froze until I stopped the movie on the computer. I played them both for over an hour… it took a couple of minutes for it to freeze after stopping the movie on the PC. Also when it starts to freeze, i will access a movie file on the nas from my PC and it unfreezes and plays normally. So it seems that extra file activity on the NAS makes it play normally but who wants to have to run 2 movies at the same time?

Does it still do that once you switched over to the gigabit port? That sounds to me like an issue with flow control which would probably be a bigger issue trying to output on the 10g port. You could try increasing the cache buffer on your Pi to smooth it out if all else fails.

Yes it still does it on the 1GB port…how do I adjust flow control/cache buffer?

If you have a flow control issue it is most likely with your NAS and nothing you can do about that. The RPi’s and that switch you have connected to it already have working flow control. To adjust your cache you can ssh into your Pi. If you have a current Windows 10 just hit your start button, type “cmd” hit enter and then in the command line that comes up type in “ssh osmc@ip.address” replacing the ip.address with the actual ip address of your pi (settings>system information will show that). The password is “osmc”. Otherwise do this.

Once you are logged into your pi then type “nano .kodi/userdata/advancedsettings.xml” and hit enter. In that text editor copy/paste the following…

<?xml version="1.0" encoding="UTF-8" ?>
<advancedsettings>
  <cache>
    <buffermode>1</buffermode>
    <memorysize>157286400</memorysize>
    <readfactor>4.0</readfactor>
  </cache>
</advancedsettings>

Then press ctrl-x, y, and then enter to save and exit. Type reboot and hit enter to reboot kodi so your settings take effect. This will give you a starting place but you may need to repeat and adjust to find something that works for you. You can read up on this more on the Kodi wiki…

https://kodi.wiki/view/HOW-TO:Modify_the_video_cache

I have windows 7…will it still work?

Follow the link I posted under “do this”. You will need to install putty or a similar program to SSH from Win 7.

ok…I got it done with putty…not hard. It is freezing and buffering still. here is the log file and I also got an error message in Kodi saying: “Source too slow for continuous playback”

Log file: hastebin

It looks like it is having problems reading the file, not just a streaming issue. I would try doing either a NFS system mount, or alternatively try using smb to see if that works better with that device.

Thanks for all the help…do you mean this?

That is correct. Some hardware works much better attached that way vs. the way Kodi networks internally. Once you get a working mount point you can use the file explorer (in Kodi’s settings) to browse there and play a file. If the issue goes away then you can either change your paths and rescan your library, or alternatively you can just put a path sub in your advancedsettings.xml to redirect your current setup as is.

ok I will give it a try but do you think I would be better off buying a Vero 4K+ instead of using a raspberry pi 3 b+? Is my problem with the NAS or is it with the Pi?

Or I have access to several retired desktop PC’s lying around that I could use. If I went with the PC route, what kind of PC setup would you recommend?

Well I can’t really say for sure but if the issue is what I suspect it is Mainly the NAS, but also because of the RPi, but only sortof. If it is a flow control issue then do you blame the device that is not throttling back, or the device that wasn’t designed to operate at full connection speed? The Vero 4k+ has actal gigabit capability so likely would not suffer the same issue. Some random PC depends on what hardware/software and the person who put it all together. For most people it would probably be a matter of just trying it and see what happens, and then change NIC drivers or the NIC itself if things suck.

You already have the NAS and I see no reason to give up when you have options that will likely work. You never tried SMB, right? You have not tried a system mount, right? You only tried the single cache setting, right? You never actually went through and ran systematic speed tests to make sure there is not an issue with your wiring, correct. Don’t take this the wrong way, but it is very common for people who make a point of mentioning what category ethernet cable they’re using to have issues with their cabling. Are you using prefab or did you run and terminate the cables yourself?