4K Video becomes jerky before freezing

Howdy,

I’ve got a problem where a 4K film I’m trying to play after few mins becomes jerky and finally freezes. I thought it might be the issue with 4k Atmos however using the AC3 5.1 Audio stream also has the same problem, and it happens whether I select passthrough or not. I’ve checked iperf3 and I’m getting a fairly steady gigabit performance over the network. I’ve not had any other issues with 4K content, with a mixture of different audio types. Any suggestions?

My debug log:
https://paste.osmc.tv/dadipekiki

Media info:
https://paste.osmc.tv/vereledavu

Do you have a USB device you can try to play it from directly?

Those are not full logs. Please supply full logs so we can see things like gui settings.

https://osmc.tv/wiki/general/how-to-submit-a-useful-support-request

My bad, although I might have gone over board now! Here are all the logs available:

http://paste.osmc.tv/vuxayuyupe

I’ve just tried USB and surprisingly it seems to be ok. Now I’m confused, Usb is significantly slower then gigabit Ethernet. As I said iperf3 didn’t show any issues, a consistent 900+Mbit rate. Do the new logs help shed any light?

Did you checked iperf3 in both directions?
Did you test it against the same device that has your media files?

I’ve just checked again in both directions. I have a HP microserver which hosts the media and it was the iperf server.

Vero receiving varied between 879-930Mbit, Server receiving varied from 747-885Mbit. The second seems a little low but all of them are well above what USB is, so doesn’t really explain why the USB works and network has the issue?

Yeah second value is definitely strange, but yes the values are above USB. Maybe want to test longer to see any issues.
Other than that while the Kodi SMB implementation with that speeds should be fine you might could try if fstab/autofs mounts solve your issue.

Thanks, I ran an 8min test in both directions and it averaged 887 and 844Mbit. I’ve many other higher bitrate 4K movies that I watch with no issues. It seems to be specific to this one movie. I downloaded a different version of it to see if it was a bad encoding but that also has the same issues.

Do my logs show anything?

2020-05-23 08:06:51.730 T:3517969120   DEBUG: Readrate 4264000 is too low with 5534276 required
2020-05-23 08:09:56.084 T:3209237216  NOTICE: CVideoPlayerAudio::Process - stream stalled pts:294.795 clock:294.796

Is there a chance that this HP microserver is overloaded … maybe with other things?

It is not the rip. I played that same file from your first log last night and it didn’t display any issues. I would try a system mount as they seem to work the best with the Vero.

The server isn’t overloaded, all it does other then serve osmc is sickchill for downloading. I don’t understand why all other 4K movies play fine, even higher bitrate ones but this specific title struggles.

Than I suggest to try the kernel mount (e.g. Mounting network shares with autofs (alternative to fstab)) just once to see if that solves the problem for that file.

I’m happy to try either autofs or even fstab, but I use a MySQL dB for my library as I have a number of OSMC rpi’s on different TVs around the house.

How can I use autofs/fstab without ruining the library dB?

Well first I just suggest to use it to test for this movie (You don’t need the library to test just play from Files). If it fix the problem then we can look from there. One option would be to use path substitution.

I’ve mounted my SMB 3 via fstab and I experience the same issue with one of my 4k movies.
The strange part is that it basically happens right away. When I start playing it’s not playing but buffering until the buffer reaches 190MB and then it plays until the buffer reaches 0 and then it starts buffering again until the buffer reaches 190MB…
What I totally not understand is what’s going on, since it doesn’t have a higher bit rate than other movies. My network is fine and there would not be an issue to actually fill the buffer while it is playing, but it just doesn’t. I understand that this could happen, if there was a bottleneck. There isn’t.

I was thinking about opening an issue myself, but found this one, so I will follow it for a while.

This would only apply to you and not the OP, but try adding this to your advancedsettings.xml…

<cache>
<buffermode>4</buffermode>
</cache>
1 Like

Autofs did the trick, mounted it all ok and the movie now plays with no jerking or freezing. One issue I noticed was trying to jump by chapters quickly it would crash OSMC with the sad face. All other 4K movies seem to play fine, and don’t have the issue regarding jumping chapters. I still don’t fully understand why this one file is having issues given it isn’t the highest bitrate movie I have.

My concern now is whether I want to change all the mounts just for one troublesome movie. As I said I use a MySQL dB mainly for multiple Rpi but also a Windows PC. I appreciate that path substitution is an option, but am I right that it won’t work for any updates/scraping? So when I scrape a new file will it be a smb or mnt? The PC obviously won’t be able to read Mnt should I update the whole dB.

No, as long as you leave your sources exactly as they are now there will be no impact to your current setup, including scraping. All the path sub does is redirect when it goes to read a file. The scraping is determined by your sources, not where it is actually finding the files. I cover this in the howto fzinken linked to above.

Well I agree it is odd (maybe some index or frame issues). The question could also be somewhere in the buffering.

With further investigation it seems that quite a few of the 4K movies using autofs have issues with jumping chapters, causing OSMC to crash. Could this be an autofs issue? Is it worth trying fstab?

Also regarding path substitution, I use the watchdog add on to automatically add files to the library. Will path substitution mean that the watchdog will be searching the new mnt addresses and so add them to the MySQL dB incorrectly?