Freezing on high bandwidth 4k content

So I attempted to do path subs just to see if I could figure it out but I don’t think it worked properly. Here’s what it looks like in terminal:

osmc@osmc:~$ nano ~/.kodi/userdata/advancedsettings.xml
GNU nano 2.7.4 File: /home/osmc/.kodi/userdata/advancedsettings.xml

<advancedsettings>
 <pathsubstitution>
  <substitute>
    <from>smb://192.168.1.110/Movies/</from>
    <to>/mnt/Server_Movies/</to>
  </substitute>
 </pathsubstitution>
</advancedsettings>

You have to select the xml and press the </> in the editor. I fixed your post.

Did you reboot after editing the file?

Did you use the file manager in settings to make sure that your mount was not only accessible but able to play a file?

If you did both of those I would reboot twice, try to play a movie, and then upload a new log. Assuming the only thing you changed in your fstab was adding in SMBv3 that looks correct to me.

Yep, I rebooted after editing the file. If I look in file manager, all I see is the 192.168.1.110 folder. Shouldn’t I see the mount called “Server_Movies”?

The file manager only has whatever shortcuts that are setup. If you are missing the “add source” entry then you can turn it on via settings>media>general>files>show add source buttons>

You can then add a source for root, or the /mnt folder, or whatever tickles your fancy to get to it. The file manager is independent of your library and its sources so this will have no impact elsewhere.

Got it. I was under the impression that changing the path subs would also correct the path in file manager but it sounds like that’s not the case.

Okay, I was able to add “Server_Movies” and play a file off it, but I’m still getting the same issue with stuttering during playback.

Here’s an updated log: http://paste.osmc.tv/unenabiyow

So was that played from the library or file manager? When you said “I don’t think it worked properly” was this because it was still stuttering or not playing?

That was played from the file manager. My response about it not working properly was incorrectly assuming that my entire library was going to get updated automatically and point to the new system mounts but it sounds like that’s more of a manual process to add them through file manager.

Gotcha. Nothing in Kodi will look any different when your doing the path sub method. The way I verify it is to look at a log and search for “OnPlayBackStarted” and then look at the file path that gets logged. In your case it should show it opening /mnt... instead of smb://...

Does the stutter now only happen on files with Atmos soundtracks?

I just tried a non-Atmos movie and had similar issues with stuttering. It seems like it’s the most prevalent when I skip a few minutes ahead in the movie. Here’s a new log: http://paste.osmc.tv/ayebuxovuj

If you just play it without skipping do you get smooth playback? If you skip ahead in the movie is there just a temporary stutter or does it continue?

I’ll have to try it out when I have more time to watch a movie for longer than 10 minutes. Will report back. In the meantime, what exactly do I need to do to update my library to make sure the paths are going to the correct place now that I manually added the Server_Movies folder through “add source”?

I’m confused on the details of what your asking here. Adding the system mount in file manager was just a quick way to ensure that the mount was working. It doesn’t have anything to do with your library, or the sources for it that are setup in Videos>files. The path substitution you put in your advancedsettings.xml should make it so your current sources and library automatically use the system path. You change nothing in Kodi, and nothing in Kodi looks any different than it did before as it all happens in the background. If you play a file from your library it should now act the exact same way as it does when you play it from the file manager, which hopefully should be an improvement over how it was acting before.

If you for some reason wanted to go the other route and dump your library and start over I explained one method for doing this above. As you already have the path subs setup I don’t know why you would want to go through the extra effort as there is nothing to be gained by doing so.

Thanks - that makes sense. I was under the impression that since you said that I needed to manually add the Server_Movies folder through file manager that I needed to do something additionally for my library to use those mounts but it sounds like doing the path subs likely solved that issue. I’ll try playing a movie through my library instead of file manager and run the logger to make sure it’s grabbing it from the new mount.

1 Like

The one downside I see to path subs is that it is confusing to some that your library is pointing to one place and being redirected in the background without the UI showing you anything different. I tried to take care to point this out in the howto I wrote as that was the issue I found some people had with following Kodi’s wiki. If you have any suggestions on how I could further clarify that in my guide to make it easier to understand i’d been interested in hearing it.

I spotted a type I made yesterday (that I have now fixed) where I accidently typed “If you play a file from your library it should not act the exact same way as it does when you play it from the file manager” and that should have been “should NOW act” which obviously means the exact opposite :man_facepalming:

So I just played a movie directly through my library with the logger on and noticed that it seems to have still accessed it through the SMB mount (unless I can ignore what the logger tells me now that I’ve done the path subs?)

Here’s a link: http://paste.osmc.tv/jajuparupe

No those are the paths it is pulling from the database. You read a bit more and you will see the path change when it goes to actually read the file…

2020-05-07 19:39:18.506 T:4067274752  NOTICE: VideoPlayer::OpenFile: smb://192.168.1.110/Movies/Frozen (2013)/Frozen.2013.UHD.BluRay.2160p.TrueHD.Atmos.7.1.HEVC.REMUX-FraMeSToR.mkv
2020-05-07 19:39:18.507 T:4067274752   DEBUG: OnPlayBackStarted: CApplication::OnPlayBackStarted
2020-05-07 19:39:18.507 T:3671122656   DEBUG: Thread VideoPlayer start, auto delete: false
2020-05-07 19:39:18.518 T:4067274752   DEBUG: CVideoGUIInfo::InitCurrentItem(smb://192.168.1.110/Movies/Frozen (2013)/Frozen.2013.UHD.BluRay.2160p.TrueHD.Atmos.7.1.HEVC.REMUX-FraMeSToR.mkv)
2020-05-07 19:39:18.521 T:3671122656  NOTICE: Creating InputStream
2020-05-07 19:39:18.541 T:3836732128   DEBUG: Loading settings for smb://192.168.1.110/Movies/Frozen (2013)/Frozen.2013.UHD.BluRay.2160p.TrueHD.Atmos.7.1.HEVC.REMUX-FraMeSToR.mkv
2020-05-07 19:39:18.550 T:4067274752   DEBUG: CPlayerGUIInfo::InitCurrentItem(smb://192.168.1.110/Movies/Frozen (2013)/Frozen.2013.UHD.BluRay.2160p.TrueHD.Atmos.7.1.HEVC.REMUX-FraMeSToR.mkv)
2020-05-07 19:39:18.576 T:3671122656   DEBUG: CFileCache::Open - opening </mnt/Server_Movies/Frozen (2013)/Frozen.2013.UHD.BluRay.2160p.TrueHD.Atmos.7.1.HEVC.REMUX-FraMeSToR.mkv> using cache

It does appear that your playing files that are past your connection speed. I’m seeing quite a bit of this…

2020-05-07 19:40:05.681 T:3671122656   DEBUG: Readrate 6000000 is too low with 8632937 required
2020-05-07 19:40:06.298 T:3671122656   DEBUG: Readrate 5987000 is too low with 8632937 required
2020-05-07 19:40:06.507 T:3671122656   DEBUG: Readrate 5985000 is too low with 8632937 required

You might be able to squeeze by ther with the network connection if you were able to get a solid 100mb/s but even then, there is not much margin. A USB gigabit adapter would probably get you fast enough to overcome this.

Ah, thanks for the explanation. I just saw the first bit of info past the “OnPlayBackStarted” text and assumed that it had come from the SMB servers. I actually have the old Vero 4k (not the Vero 4k+ with gigabit), so I’m not sure if the gigabit ethernet adapter would actually improve things?

I posted my iperf results above and thought that since I was getting an average of 83-90 Mbps that I would be okay since the movie I was attempting to watch was at 56.8 Mbps (per MediaInfo) but it sounds like that’s not the case.

You have that backwards. It would only help with the old Vero 4k. I have one of these and it does improve the connection speed by about double. Just don’t expect full gigabit as the USB 2.0 doesn’t have that much bandwidth.

https://www.amazon.com/AmazonBasics-1000-Gigabit-Ethernet-Adapter/dp/B00M77HMU0/

As for the iperf that is raw speed. There is overhead that shaves that down a bit. Also that figure from MediaInfo would be average bitrate.