PM4K / PlexMod for Kodi (18, 19, 20, 21, 22+)

@panni
If it helps any, the relevant bits from Composite,

Getting the subtitles:
github:com/anxdpanic/plugin.video.composite_for_plex/blob/master/resources/lib/composite_addon/addon/playback.py#L469

Setting the subtitles:
github:com/anxdpanic/plugin.video.composite_for_plex/blob/master/resources/lib/composite_addon/addon/player.py#L198
github:com/anxdpanic/plugin.video.composite_for_plex/blob/master/resources/lib/composite_addon/addon/player.py#L361

@anxdpanic interesting, I’ll compare to how we’re setting the subs in P4K.

Just put it on an RPi 3b for testing. I use Roku now but having Plex on an open platform is so important.
Edit: I actually have something. My server is remote but upload isn’t an issue. I always set Remote Quality to Original. Plex for Kodi is aware that screen resolution is ā€œ1920x1080@60.00hz,ā€ per the ā€œAboutā€ section. I have some movies with both 4k HEVC and 1080 H264 versions. Plex for Kodi is choosing the HEVC source by default. I have to use ā€œPlay Versionā€ to select the H264.
As an example, my 4k capable Roku with a 1080p TV now chooses the highest bitrate 1080p version by default. Even though ā€œOriginalā€ quality is selected, it’s taking into account the display.

This is much more polished than I expected, I haven’t used Plex on Kodi in years.

I was on your regular Kodi 18 branch so I loaded up the develop branch to see if it behaves the same way. It is also choosing the HEVC 4k copies of movies even though the display is 1080p. I have a script that kills HEVC transcodes and leaves a message for the user. That message works in Roku but the stream just ends in the Kodi Add-on with no message displayed.

@panni is there a line of code in any of the .py files that I could change to reduce the amount of delay between episodes?

I found that this is something you can do with some other device players so figured it should be possible here too? I know this is something you wouldn’t necessarily recommend people to do, but it’d be great if you could show how.

Cheers!

You mean how long the postplay is shown until the next episode is started? I should be able to make that configurable.

Yes that’s right. That would be perfect if you made it configurable, I know many have been asking for that in the main app for quite some time, so having it in the Kodi app would be fantastic.

As well as being able to configure the length in seconds (also hopefully 0 seconds so it just goes to the next episode), it would also be great if you could also set it to be in ā€˜minus’ seconds too, so for example set it to be -20 seconds so it goes to the next episode without having to watch all way through the end credits etc. Not sure if that bit is possible, but it’d be awesome if it was.=

Well then, if you’re adding options I sure would like to have a toggle to not make it skip postplay for very short episodes. :smiley: (I’m not a fan of autoplay in general)

Oh? Do we have an auto skip for post play with short episodes in place? I wasn’t particularly aware of that.

Yea it’s a thing, I’m not sure how short the episode has to be to qualify, but it’s less than 5 mins I believe.

@sensei321 couldn’t you just completely disable auto play in settings? Unless of course you need it sometimes but not others.

I’ll take a look :slight_smile:

1 Like

I have. It doesn’t apply to short episodes. They just skip postplay altogether and instantly start the next episode. I prefer to choose whether I want to start the next episode or not during postplay.

Thanks, Panni. :slight_smile:

I’m having trouble fixing embedded subs; care to try the current work-in-progress? Seems to work better than before.
Kodi 19: GitHub - pannal/plex-for-kodi at embedded_subs_fix19
Kodi 18: GitHub - pannal/plex-for-kodi at embedded_subs_fix

2 Likes

This works. The subtitles started with the video this time. Thank you for fixing it, Panni. :smiley:

@panni It seems a lot better in general now, but I found one set of subs that the addon really didn’t like. With the addon the first few lines doesn’t show up properly and a few times it even crashed Kodi do desktop. It seems to plays ā€œfineā€ in Kodi by itself (my HTPC wasn’t really fast enough to keep 100% up with the effects, I think), and similarly in the Plex Media Player, so It think it’s something with the addon that crashes?

https://drive.google.com/file/d/1fC2u8kk68l8RaYt9nJhbj8vqS8lR_DnL/view?usp=sharing I’ll leave it here for some days if you want to test with it. It had some silly karaoke effects :stuck_out_tongue:

Weird. I can play the video file just fine, direct play HEVC, Plex for Kodi (my develop_kodi18 branch). Can you maybe post a log for when the crash happens?

Ah, I’m using the 19 alpha atm. I bit late here now, but I can upload some logs tomorrow.

Forcing postplay for short videos as well as being able to configure the postplay timeout have been added as an advanced setting to develop_kodi18 and develop_kodi19; pull request is open.

Setting the timeout to zero or below is possible, but will still show the postplay screen for now. I might improve this later. will directly skip to the next video. A negative value doesn’t do anything for now.

Here’s a debug log of playback of the file. https://paste.kodi.tv/udufibedev.kodi