Plex App and Transcoding

I’m using the official Plex app for Kodi with a Plexpass account.
The issue is quite simple, on the Vero 4K simple streaming of the original file works very well, this means that for every file with a bitrate below the max speed of my connection the playback works.
Whenever I try to use transcoding, however, the audio stream is fine but the video stream is delayed by several seconds and extremely stuttery.
This issue isn’t present when I use any other means of playback (Android, Chromecast, Laptop or browser) and all these devices are in the same network.

How can I debug this?

Have you see this thread over at the Plex forum?

If it’s down to some kind of incompatibility between the Plex add-on and the Vero4K hardware I think you’ll have a hard time finding an answer.

Does it also happen with PlexKodiConnect?

I didn’t, but I tried it and it doesn’t seem to work, to be honest it looks quite random as a solution and the issue manifests also when the file has already been entirely transcoded on the server (Optimize... function)

I’m not using that particular extension, I’m using the official Plex extension, which is the obvious choice.

I’d be happy to provide logs if necessary.

The official Plex add-on seems to have been a drive-by solution based on recent activity.

I’d be interested to know if PKC has issues.

I’ll try to make it work.

However I’m seriously worried about the following:

PKC synchronizes your media from your Plex server to the native Kodi database.
[…]
Use at your own risk! This plugin assumes that you manage all your videos with Plex (and none with Kodi). You might lose data already stored in the Kodi video and music databases as this plugin directly changes them. Don’t worry if you want Plex to manage all your media (like you should ;-)).

Some people argue that PKC is ‘hacky’ because of the way it directly accesses the Kodi database. See here for a more thorough discussion.

Which I seriously don’t want. I have media on SMB shares locally and a remote Plex Server.

Understood. Might be best to ask the Plex guys then.

Sam

I’m having the same issues, on both the 4k and 4k+.

Audio is playing along nice, but image is delayed for over 10 seconds at the beginning of the stream. Once it gets going, it works but with the huge audiodelay. However, PKC looks like it’s working.

Tested the exact same setup on other kodi platforms (windows 10 and android) and there it works flawlessly.

Is there anything you guys can do to help me debug this? Is there anything I can do to help you?

@devster: Did you solve it?

//Erki

It might be fixed in Kodi v18. I know there are some playback improvements there.

A debug log might give some clues.

Sam

I used to use Plex, but have been on Emby for the past couple of years.

To have any idea of what’s happening, we’d need a debug log from the /OSMC / Kodi end and a log for the same time period from the Plex server end.

You’d also need to ensure that both sides have an accurate time, preferably from NTP, which OSMC will already give you.

Perhaps something will stand out.

Awesome, here are the OSMC logs - http://paste.osmc.tv/oboruzusut

As for the Plex server, what logs do you need? Here are a short bit of the plex media server log from around that time: Dropbox - Error (looks like time might be off a couple of seconds)

Please note, I had some other streams going on from the plex server, but the one to look for is the streaming of “Band of Brothers - S1 E1 - Currahee” from 192.168.1.119

Having more than one film streaming at the same time certainly doesn’t help :wink:

However, it seems like you might need to take a look at your Plex configuration, on the server amd/or on the add-on, to allow “Direct Play” since AFAICT there should be no need to transcode the stream:

Sep 09, 2018 17:25:19.232 [11624] DEBUG - MDE: Cannot direct stream audio stream due to profile or setting limitations
Sep 09, 2018 17:25:19.232 [11624] DEBUG - MDE: Band of Brothers - S1 E1 - Currahee: selected media 0 / 50319
Sep 09, 2018 17:25:19.232 [11624] DEBUG - Streaming Resource: Adding session 0xc8e47a0:08239e00-6e52-4bf1-bcba-37def6eb9726 which is using transcoder slot.  Used slots is now 2
Sep 09, 2018 17:25:19.232 [11624] DEBUG - Streaming Resource: Added session 0xc8e47a0:08239e00-6e52-4bf1-bcba-37def6eb9726
Sep 09, 2018 17:25:19.232 [11624] DEBUG - Streaming Resource: Reached Decision id=22 codes=(General=1001,Direct play not available; Conversion OK. Direct Play=3000,App cannot direct play this item. Direct play is disabled. Transcode=1001,Direct play not available; Conversion OK.) media=(id=50319 part=(id=52044 decision=transcode container=mkv protocol=http streams=(Video=(id=142599 decision=transcode bitrate=573 encoder=libx264 width=570 height=320) Audio=(id=142598 decision=transcode bitrate=99 encoder=aac_mf channels=2 rate=48000))))

Hehe, I know :slight_smile:, but what can you do when others in the family are active…

Thank you for your time. Just to be clear, I did force the transcode in the add-on just to show when I get the issues. When I turn off the transcode everything works perfect, but I believe even a transcoded stream should work.

I take it we can close this issue.

I don’t agree with that. The issue is about transcoding streams not working from the official Plex add-on with vero hardware. Regardless if forced or not. The original poster had exactly the same issue, normal streams works just fine, but transcoded streams does not.

Just curious, what is the reason/benefit of using Plex in a home network to stream to clients that have their own Kodi box (e.g. a Vero 4K, Pi) ? My NAS can stream to multiple clients simultaneously without breaking a sweat, as it just runs as a file server. The Kodi boxes take care of any heavy lifting required in terms of converting audio to PCM, down/up-scaling video. Just struggling to understand what Plex is for in that sort of environment. If there are network bandwith issues, would be it be better in the long run to address the network itself?

The original post was about transcoding problems with the official Plex for Kodi add-on. You say you are using PKC, which is Plex Kodi Connect, a totally different add-on. Which is better, Kodi Plex Connect, or Plex for Kodi - Desktop Players - Plex Forum

While transcoding might not work too well, it’s also not usually going to be required on a V4K with files held on a local network.

Perhaps someone with more knowledge of Plex / Kodi will be able to help you.

@dillthedog
I think there might have been a slight misunderstanding. I am using the Plex for Kodi add-on. Me trying with PKC was just to answer Sams question to OP (from back in April). Agree with V4K working on lan and not needing transcode.

However, I had a couple of friends buying the Vero on my recommendation since it was working so well on my lan. However, when sharing my library with them the issue in this thread occurred because they needed transcode due to network speeds.

If we can’t get the V4K to perform well with transcoded plex streams it probably is a deal breaker for us and getting the mobile plex app and a chromecast would be a better deal. It would be a real shame on such a nice product if this was the case. I still hope @sam_nazarko have some magic up his sleeve or that kodi v. 18 can save this. Anyways, thanks for the help and I will continue to see if PKC can be a workaround for us.

@ac16161
Even locally, the centralized administration of the library is a huge bonus. This also gives the ability to continue watching on another device. Plex also allow me to use less capable devices in other parts of the house, like chromecasts or even smart-tvs.And the fact that I can share the library with family and friends externally with one click is just icing on the cake!

Agree, but you can do that by installing an SQL database on the server. I run MariaDB 10, my Kodi devices all refer to that and the watch/resume status is tracked seamlessly across devices. Appreciate that Plex in theory covers playback from off-site, but that’s a use case that doesn’t interest me as I’m not keen on server-side transcoding, but each to their own. Sounds like it’s working for you, I just would not use Plex within the home for any client with its own Vero but get that it has some off-site features that could be helpful.

This is starting to go a bit off topic, so I’ll end with this. I still hope for some magic from @sam_nazarko or kodi 18 :slightly_smiling_face:

I know and I have played around with that as well. However, the added benefits and ease of use with Plex got me on that road. Besides, Plex allows for direct stream, i.e decoding on client side. Server side decoding only occurs when needed, so for me it’s a win win. I have one vero4k as my primary streaming device (where all decoding happening on it) and then uses chromecasts to cover the rest of the house.

I understand that plex for kodi add-on is missing a key part of the kodi experience. But if using PlexKodiConnect instead, it basically is your SQL database solution, but with the added Plex features. It modifies the DB directly and you can still use all your regular Kodi addons and skins but with Plex backend. It automatically used client-side decoding if possible, but falls back to server-side when needed.

However, streaming videos with high bit-rate to off-site eats away on your internet connection pretty fast. This is where plex transcoded streams on a vero would be very useful for me.