OSMC with Kodi 19.1 Playback of large video files stuck

Hi community :slight_smile:

I installed a second system with OSMC and Kodi 19.1 on a secondary SD card. On my second SD card I still have the old OSMC running with Kodi 18.6. I am using a RPi 3b.

I experienced some problems with playback of large video files in Kodi 19.1 that I dont have on the Kodi 18.6.
I have some movie files that are between 30GB and 40GB. They are located on a NAS file server. They play just perfectly on OSMC with Kodi 18.6 or on my notebook and PC, no cache problem, no stuttering, just smooth playback. Same files on Kodi 19.1 on same RPi start with a information popup telling: read rate too slow for continuous playback.
After a couple of seconds video playback starts to stutter until it totally freezes. After a minute or so playback continues, just to stutter and freeze again. All other and of course smaller files, like up until 20GB or so play without problem.

During stutter/freeze I can see log entries like the following:
2021-09-05 22:35:30.791 T:588 INFO : CVideoPlayerAudio::Process - stream stalled
2021-09-05 22:35:57.268 T:587 WARNING : OutputPicture - timeout waiting for buffer

The RPi just has 100MBit, I know. But at least this problem doesnt exist with Kodi 18.6 on the old OSMC. Maybe a driver/setting problem?

To work around this, I tried playing around with the following settings (and also different values) in the advancedsettings.xml file:


All the settings dont have an effect on my problem :confused:
Debug log while playback of smb://jodonas/storage/moviearc/Filme/movie.mkv: https://paste.osmc.tv/opumomenev.django

Try posting some MediaInfo output of the type of file that you are trying to play


Two options you could try two different possible fixes:
sudo apt-get install samba-common-bin


Under Settings → Services → SMB Client, there is a new setting: “Fix issues MTU issues with SMBv2 NAS devices”.

Hi fzinken,

I will give it a try. Is there a difference in OSMC/Kodi 18.6 to 19.1 in SMB usage? is old Kodi using SMBv1 and new Kodi SMBv2 or so?

No the old onje should also already use SMB 1/2/3 depending what your NAS serves.
Is your NAS configured with SMB3? Which NAS are you using?

There was a change on the usage of nmb but I don’t think it impacts you. Try the ttwo suggestions and let us know how it goes.

I will do that when I get home tonight and check if it helps :slight_smile:
It is a Synology DS916+ which is offering SMB1 and SMB2, both active. Dont know which version Kodi 18.x and 19.x will try as default if both are active.

Than I suggest to first try the MTU Mitigation.

But the DS916+ should support SMB3 suggest to enable that.

I’m getting very similiar behaviour on Rpi4, which I’ve posted here:

but in my case remote NAS is mounted as NFS, which on my Rpi2 Kodi 18 works perfect.
I tried to play the same files on Rpi4 localy and via smb mount (the same NAS) and they played fine, so I’m guessing there may be something on network… but Ethernet is plugged via 1Gbps and WiFi works about 100Mbps - that should be more than enough.

What I did not mention in my previous post is kernel error in dmesg which happens at the moment when video freezes:

[nie wrz 5 20:55:59 2021] bcm2835_mmal_vchiq: timed out waiting for sync completion
[nie wrz 5 20:56:14 2021] bcm2835_mmal_vchiq: received invalid message context 5!

logs from kodi with debug states:

ERROR : ffmpeg[0x8052340X]: [h264_v4l2m2m] === poll unexpected TIMEOUT: events=0x147, cap buffers=18

more here: hastebin

Maybe this is somehow correlated to this thread…

Thanks, and best regards.

You are using kernel mounts instead of Kodi internal access totally different topic.

Ok I installed that samba-common-bin, but did nothing further, just a reboot. ok? Didnt change anything.
The second one, this settings under SMB client doesnt exist. UI is set to expert mode, also changed the skin to see if setting pops up (running OSMC with kodi 19.1, compiled 2021-07-15).

Ok, I need to check if that is a limited setting.

How about the DS916+, did you check if you can enable SMB3?

What Pi do you have?

As I have written above it is a RPi3b.

Fzinken, is it correct to just install that samba package or do I need to configure anything further?
NAS supports SMB1, SMB2, SMB2 with large MTU, SMB3.
So I can also start a try witH SMB3 and with limiting to SMB1, just to see if there are differences.

Ok, was an overlook on my side. The MTU fix is only applicable on the 64Bit platforms.

I suggest to try SMB3 and see if that helps. Maybe the issue is something totally different. Things you could test:

  1. Test network on the Pi3 with IPerf3
  2. Try to play the file locally from USB

Maybe something changed in the network, we suggest to check your network with iperf3. Please read this howto

Enabled SMB3 on the NAS and set min version to SMB3 plus reboot. Same behaviour. Set min and max version to SMB1 plus reboot and still no change :frowning:

Not sure how2ipfer with the bas as the server as I cant install packages on it I think.

Ok I seemed to have found the issue <3
There is a port flapping on my switch, it tries to negotiate to gbit but fails and falls back to 100 mbit, but produces errors.
I restarted the switch and also changed the port. Auto negotiating now finishes without errors and port is back on gbit. Lagging is gone :slight_smile:
Not sure why ut doesnt affect the old version the same like the current one, but problem is fixed :slight_smile: