PlexKodiConnect: Kodi Plex Integration Done Right

@iosifak said:
Hey there. Is there a way to use upnp paths to play the files instead of smb? I ask because some 4k HDR files stutter while playing from smb but play fine using upnp paths with Kodi.

Also does NFS work using path replacement? Do you guys know of any good free NFS servers for windows?

I may have same issue as you, when I play 4k HDR movies, with high bit rate (>60mbps) I also get stutter with kodi displaying “Source Too Slow For Continuous Playback” or “Read Rate Too Low For Continuous Playback”.

My set up is NAS → Router → NUC (with pms) → Router → Odroid C2 with LE 8.2 / PKC, 1Gbps LAN
I plan to investigate and do some tests this weekend (iperf, r/w on nas)

I’m using default path with pkc, I’m not sure yet where is the bottleneck…

@iosifak said:
Hey there. Is there a way to use upnp paths to play the files instead of smb? I ask because some 4k HDR files stutter while playing from smb but play fine using upnp paths with Kodi.

Also does NFS work using path replacement? Do you guys know of any good free NFS servers for windows?

I may have same issue as you, when I play 4k HDR movies, with high bit rate (>60mbps) I also get stutter with kodi displaying “Source Too Slow For Continuous Playback” or “Read Rate Too Low For Continuous Playback”.

My set up is NAS → Router → NUC (with pms) → Router → Odroid C2 with LE 8.2 / PKC, 1Gbps LAN
I plan to investigate and do some tests this weekend (iperf, r/w on nas)

I’m using default path with pkc, I’m not sure yet where is the bottleneck…

@Joost.zilla said:
In Plex i have a Sort Title included with all my movies. Unfortunately i haven’t been able to use the Sort Title as sort method in Kodi. I am using PKC of course :slight_smile:
Anyone any idea how to get this to work?

PKC syncs the sort title to Kodi. You can check the Plex sort title by using the Plex web interface, go to the movie you’re interested in, hit the three dots … in the upper right corner, then Show Information, then show XML. The sort title will be stored in the XML element ‘titleSort’.

You cannot “rename” a movie, check http://kodi.wiki/view/movie_sets#Sort_Title (which also applies to all movies, not only sets).

Be aware that using Sort Order will also affect the Title sort order in the main library view. The Sort Title is NOT displayed in any movie list. It is a hidden title used internally by Kodi.

The Sort Title is NOT displayed in any movie list. It is a hidden title used internally by Kodi.
The table there explains a lot

PS: Plex chose my avatar :wink:

@cyriltra said:

@iosifak said:
Hey there. Is there a way to use upnp paths to play the files instead of smb? I ask because some 4k HDR files stutter while playing from smb but play fine using upnp paths with Kodi.

Also does NFS work using path replacement? Do you guys know of any good free NFS servers for windows?

I may have same issue as you, when I play 4k HDR movies, with high bit rate (>60mbps) I also get stutter with kodi displaying “Source Too Slow For Continuous Playback” or “Read Rate Too Low For Continuous Playback”.

My set up is NAS → Router → NUC (with pms) → Router → Odroid C2 with LE 8.2 / PKC, 1Gbps LAN
I plan to investigate and do some tests this weekend (iperf, r/w on nas)

I’m using default path with pkc, I’m not sure yet where is the bottleneck…

There’s a million things that could cause this, but it’s definitely NOT PKC. Check the Kodi forum e.g. LAN streams cache problems! or How I fixed buffering/stuttering issues while playing files from my NAS

There’s a million things that could cause this, but it’s definitely NOT PKC. Check the Kodi forum e.g. LAN streams cache problems! or How I fixed buffering/stuttering issues while playing files from my NAS

Can confirm. This is not PKC. 60mbits 4k movies (HDR / SDR) stutter everywhere. I’ve tested countless ways to play them and the best seems to be upnp through Kodi. Probably need a dedicated box like shield for them to play flawlessly. I’m holding out for some years though till there are more HDR movies out there.

@croneter said:

@cyriltra said:

@iosifak said:
Hey there. Is there a way to use upnp paths to play the files instead of smb? I ask because some 4k HDR files stutter while playing from smb but play fine using upnp paths with Kodi.

Also does NFS work using path replacement? Do you guys know of any good free NFS servers for windows?

I may have same issue as you, when I play 4k HDR movies, with high bit rate (>60mbps) I also get stutter with kodi displaying “Source Too Slow For Continuous Playback” or “Read Rate Too Low For Continuous Playback”.

My set up is NAS → Router → NUC (with pms) → Router → Odroid C2 with LE 8.2 / PKC, 1Gbps LAN
I plan to investigate and do some tests this weekend (iperf, r/w on nas)

I’m using default path with pkc, I’m not sure yet where is the bottleneck…

There’s a million things that could cause this, but it’s definitely NOT PKC. Check the Kodi forum e.g. LAN streams cache problems! or How I fixed buffering/stuttering issues while playing files from my NAS

sorry, i didn’t meant to imply it is PKC’s fault. I just wanted to echo the comment of iosifak

@croneter said:

@Joost.zilla said:
In Plex i have a Sort Title included with all my movies. Unfortunately i haven’t been able to use the Sort Title as sort method in Kodi. I am using PKC of course :slight_smile:
Anyone any idea how to get this to work?

PKC syncs the sort title to Kodi. You can check the Plex sort title by using the Plex web interface, go to the movie you’re interested in, hit the three dots … in the upper right corner, then Show Information, then show XML. The sort title will be stored in the XML element ‘titleSort’.

You cannot “rename” a movie, check http://kodi.wiki/view/movie_sets#Sort_Title (which also applies to all movies, not only sets).

Be aware that using Sort Order will also affect the Title sort order in the main library view. The Sort Title is NOT displayed in any movie list. It is a hidden title used internally by Kodi.

The Sort Title is NOT displayed in any movie list. It is a hidden title used internally by Kodi.
The table there explains a lot

PS: Plex chose my avatar :wink:

Sorry about your avatar. I didn’t want to offend you.

The XML’s are ok. title Sort is perfect. And somehow Kodi shows my movies in Sort title order now. Maybe it happened during the last sync. Anyhow, I am really happy.

Thanks for PKC Croneter :slight_smile:

@Joost.zilla said:

@croneter said:

@Joost.zilla said:
In Plex i have a Sort Title included with all my movies. Unfortunately i haven’t been able to use the Sort Title as sort method in Kodi. I am using PKC of course :slight_smile:
Anyone any idea how to get this to work?

PKC syncs the sort title to Kodi. You can check the Plex sort title by using the Plex web interface, go to the movie you’re interested in, hit the three dots … in the upper right corner, then Show Information, then show XML. The sort title will be stored in the XML element ‘titleSort’.

You cannot “rename” a movie, check http://kodi.wiki/view/movie_sets#Sort_Title (which also applies to all movies, not only sets).

Be aware that using Sort Order will also affect the Title sort order in the main library view. The Sort Title is NOT displayed in any movie list. It is a hidden title used internally by Kodi.

The Sort Title is NOT displayed in any movie list. It is a hidden title used internally by Kodi.
The table there explains a lot

PS: Plex chose my avatar :wink:

Sorry about your avatar. I didn’t want to offend you.

Really no worries mate, just messing with you :lol: . Saw your comment in the Kodi forums and just couldn’t resist! I rather like my avatar - this is exactly how my face looks like when I’m trying to implement a new, undocumented and obscure Plex feature in PKC :wink:

The XML’s are ok. title Sort is perfect. And somehow Kodi shows my movies in Sort title order now. Maybe it happened during the last sync. Anyhow, I am really happy.

Thanks for PKC Croneter :slight_smile:

Anytime. You might need to manually kickstart a sync, if Plex doesn’t think that changing the sort title counts as “change”. Go to the PKC settings, advanced, Repair the local database (force update every item)

@cyriltra said:

@iosifak said:
Hey there. Is there a way to use upnp paths to play the files instead of smb? I ask because some 4k HDR files stutter while playing from smb but play fine using upnp paths with Kodi.

Also does NFS work using path replacement? Do you guys know of any good free NFS servers for windows?

I may have same issue as you, when I play 4k HDR movies, with high bit rate (>60mbps) I also get stutter with kodi displaying “Source Too Slow For Continuous Playback” or “Read Rate Too Low For Continuous Playback”.

My set up is NAS → Router → NUC (with pms) → Router → Odroid C2 with LE 8.2 / PKC, 1Gbps LAN
I plan to investigate and do some tests this weekend (iperf, r/w on nas)

I’m using default path with pkc, I’m not sure yet where is the bottleneck…

My setup uses smb shares from a NAS and I can play 4k HDR without stutter and that’s on a Vero 4k box that “only” has 10/100 ethernet, the rest of my network is gigabit. PKC is on default addon settings without direct paths setup.
NAS → Gigabit Switch → Plex Server → Gigabit Switch → Vero 4k

iperf tests between my Plex server and Vero box average out at about 95 Mbits/sec

What cache settings do you use?

@iosifak said:
What cache settings do you use?

<advancedsettings>
  <cache>
    <buffermode>1</buffermode>
    <memorysize>1073741824</memorysize>
        <readfactor>6</readfactor>
  </cache>
</advancedsettings>

I am using PKC with Alpha versions of Kodi Leia it’s working great so far!
The only thing that’s a bit strange is a warning that constantly (about 50 times per second) comes up in the Kodi log:

15:48:26.100 T:3765433232 WARNING: CAddonSettings[plugin.video.plexkodiconnect]: failed to parse visible condition "eq(-1,true)" of old setting definition for "skipContextMenu" 15:48:26.115 T:3765433232 WARNING: CAddonSettings[plugin.video.plexkodiconnect]: cannot reference separator setting in old setting condition "eq(-1,true)" for "skipContextMenu" 15:48:26.115 T:3765433232 WARNING: CAddonSettings[plugin.video.plexkodiconnect]: failed to parse visible condition "eq(-1,true)" of old setting definition for "skipContextMenu" 15:48:26.130 T:3765433232 WARNING: CAddonSettings[plugin.video.plexkodiconnect]: cannot reference separator setting in old setting condition "eq(-1,true)" for "skipContextMenu" 15:48:26.130 T:3765433232 WARNING: CAddonSettings[plugin.video.plexkodiconnect]: failed to parse visible condition "eq(-1,true)" of old setting definition for "skipContextMenu" 15:48:26.144 T:3765433232 WARNING: CAddonSettings[plugin.video.plexkodiconnect]: cannot reference separator setting in old setting condition "eq(-1,true)" for "skipContextMenu" 15:48:26.144 T:3765433232 WARNING: CAddonSettings[plugin.video.plexkodiconnect]: failed to parse visible condition "eq(-1,true)" of old setting definition for "skipContextMenu" 15:48:26.159 T:3765433232 WARNING: CAddonSettings[plugin.video.plexkodiconnect]: cannot reference separator setting in old setting condition "eq(-1,true)" for "skipContextMenu" 15:48:26.159 T:3765433232 WARNING: CAddonSettings[plugin.video.plexkodiconnect]: failed to parse visible condition "eq(-1,true)" of old setting definition for "skipContextMenu" 15:48:26.173 T:3765433232 WARNING: CAddonSettings[plugin.video.plexkodiconnect]: cannot reference separator setting in old setting condition "eq(-1,true)" for "skipContextMenu" 15:48:26.174 T:3765433232 WARNING: CAddonSettings[plugin.video.plexkodiconnect]: failed to parse visible condition "eq(-1,true)" of old setting definition for "skipContextMenu"

and so on…

Don’t get me wrong. I am not complaining since PKC is working flawless, but the constant warning messages don’t make it easier to go through the log file.

Is there any chance to get rid of the warning message?

Hi croneter,

First thanks for this great add-on. I have the same situation as ritomas with WARNINGS on the log and I can live with it but, with alpha of Kodi, I also have a crash of the library sync every time I start Kodi. Here is the part of the log. Seems to be linked with ascii symbols…

15:52:53.439 T:18446744072803359024 ERROR: PLEX.librarysync: LibrarySync thread crashed. Error message: ‘ascii’ codec can’t decode byte 0xc3 in position 1: ordinal not in range(128)
15:52:53.447 T:18446744072803359024 ERROR: PLEX.librarysync: Traceback:
Traceback (most recent call last):
File “/storage/emulated/0/Android/data/org.xbmc.kodi/files/.kodi/addons/plugin.video.plexkodiconnect/resources/lib/librarysync.py”, line 1503, in run
self.run_internal()
File “/storage/emulated/0/Android/data/org.xbmc.kodi/files/.kodi/addons/plugin.video.plexkodiconnect/resources/lib/librarysync.py”, line 1613, in run_internal
deletePlaylists()
File “/storage/emulated/0/Android/data/org.xbmc.kodi/files/.kodi/addons/plugin.video.plexkodiconnect/resources/lib/utils.py”, line 920, in deletePlaylists
for root, _, files in walk(path):
File “/home/jenkins/workspace/Android-ARM/tools/depends/xbmc-depends/arm-linux-androideabi-21-debug/lib/python2.7/os.py”, line 286, in walk
File “/home/jenkins/workspace/Android-ARM/tools/depends/xbmc-depends/arm-linux-androideabi-21-debug/lib/python2.7/posixpath.py”, line 71, in join
UnicodeDecodeError: ‘ascii’ codec can’t decode byte 0xc3 in position 1: ordinal not in range(128)

@cjnicholl said:
1073741824

I can’t reach 1gb. My android TV has 2gb ram and 512 reserved. I can only do 640mb before it stops playing files. With 640mb the 32mbit/s bitrated 4k HDR files play fine but the 64mbit/s ones don’t.

After a lot more tests I found out that upnp fills up the buffer at twice the speed of smb on my TV. PKC http works a lot slower than both. Need to do NFS tests but didn’t manage yet :frowning:

@ritomas said:
I am using PKC with Alpha versions of Kodi Leia it’s working great so far!
The only thing that’s a bit strange is a warning that constantly (about 50 times per second) comes up in the Kodi log:

`15:48:26.100 T:3765433232 WARNING: CAddonSettings[plugin.video.plexkodiconnect]: failed to parse visible condition “eq(-1,true)” of old setting definition for “skipContextMenu”
and so on…

Don’t get me wrong. I am not complaining since PKC is working flawless, but the constant warning messages don’t make it easier to go through the log file.

Is there any chance to get rid of the warning message?

Seems like there is an old PKC setting Kodi doesn’t like. Try to completely reset PKC: go to the PKC Settings, Advanced, Reset the Kodi database (in red), hit Yes, Yes, and Yes to reset PKC completely. Thanks for reporting back whether it worked or not :wink:

@yukes33 said:
Hi croneter,

First thanks for this great add-on. I have the same situation as ritomas with WARNINGS on the log and I can live with it but, with alpha of Kodi, I also have a crash of the library sync every time I start Kodi. Here is the part of the log. Seems to be linked with ascii symbols…

15:52:53.439 T:18446744072803359024 ERROR: PLEX.librarysync: LibrarySync thread crashed. Error message: ‘ascii’ codec can’t decode byte 0xc3 in position 1: ordinal not in range(128)
15:52:53.447 T:18446744072803359024 ERROR: PLEX.librarysync: Traceback:
Traceback (most recent call last):
File “/storage/emulated/0/Android/data/org.xbmc.kodi/files/.kodi/addons/plugin.video.plexkodiconnect/resources/lib/librarysync.py”, line 1503, in run
self.run_internal()
File “/storage/emulated/0/Android/data/org.xbmc.kodi/files/.kodi/addons/plugin.video.plexkodiconnect/resources/lib/librarysync.py”, line 1613, in run_internal
deletePlaylists()
File “/storage/emulated/0/Android/data/org.xbmc.kodi/files/.kodi/addons/plugin.video.plexkodiconnect/resources/lib/utils.py”, line 920, in deletePlaylists
for root, _, files in walk(path):
File “/home/jenkins/workspace/Android-ARM/tools/depends/xbmc-depends/arm-linux-androideabi-21-debug/lib/python2.7/os.py”, line 286, in walk
File “/home/jenkins/workspace/Android-ARM/tools/depends/xbmc-depends/arm-linux-androideabi-21-debug/lib/python2.7/posixpath.py”, line 71, in join
UnicodeDecodeError: ‘ascii’ codec can’t decode byte 0xc3 in position 1: ordinal not in range(128)

I probably need to replace that very unreliable Python function walk(path) :disappointed: . Opened a new Github issue.
In the meantime, you could rename your Kodi user to something containing only ASCII symbols, e.g. John instead of Björn

@iosifak said:
Need to do NFS tests but didn’t manage yet :frowning:

After testing NFS and finding similarly slow to SMB I finally went the webdav route which is exactly the same speed as upnp in my setup and PKC supports it.

@iosifak said:

@iosifak said:
Need to do NFS tests but didn’t manage yet :frowning:

After testing NFS and finding similarly slow to SMB I finally went the webdav route which is exactly the same speed as upnp in my setup and PKC supports it.

It’s interesting how the different protocols affect it. I wonder how much the CPU/RAM, OS and the NAS mounting on the Plex server affect things?
I need to find some really high bitrate HVEC stuff to stress test my system.

@cjnicholl said:
I need to find some really high bitrate HVEC stuff to stress test my system.

here you go: http://jell.yfish.us/

@iosifak said:

@cjnicholl said:
I need to find some really high bitrate HVEC stuff to stress test my system.

here you go: http://jell.yfish.us/

I managed to test my system with the jellyfish files and came up with some interesting results. I tried with the 10bit 60, 90, 120 @ 140Mbps.
As expected the 60Mbps file played fine via Plex & PKC on my Vero 4k but the rest of the files stuttered (90Mbps in places, 120 & 140Mbps unwatchable).
The odd thing was that all of the files stuttered very badly playing directly from my NAS using SMB in Kodi. I’ve never been able to get NFS working properly due to the limitations QNAP NAS have managing users and UIDs.
I’ve come to the solution that my NAS just isn’t up to scratch moving forward with 4k UHD material and I’m going to rethink my setup with USB 3.0 external drives mounted directly on my i7 Plex server.