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

I’m fairly certain that @panni has said a few times that PM4K merely passes on the video to Kodi for playback. Reading your GitHub entry, it suggests you’re running Kodi on your TV. What happens if you play these files directly in Kodi? If you get the same, it’s a Kodi problem.

Can confirm that it annoyingly happens in Kodi too, my mistake… guess that’s never getting fixed based on how much of a nightmare it is to get them to accept a bug report

How exactly, using which hub and which action? Also, do you have PM4K caching enabled?

I tried making a quick video for you. OF COURSE, now I can’t get it to fail.

Typically when I stop watching something I hit back from playing, and power down from that screen. I have it set to relaunch PM4K on wake, so it always starts from the home screen, fresh. I just play from the Continue Watching at the top of home. Yes cache is on.

Are these with h265 mp4 files by any chance? If so remux them to mkv it will fix the issue, there is bad metadata in the mp4s

They’re already MKV files, but it turns out it was a reporting issue in Kodi itself - had to apply a change to my advancedsettings.xml file but seems to be working now!

Could you please link to the solution you found? thank you

Do you mean the postplay screen? The one where you see the next up episode and the previous one? Or the episode screen, where you see all episodes?

Directly, without going to the episode’s screen first?

Absolutely! It’s https://forum.kodi.tv/showthread.php?tid=382355.
The fix in question was adding this to your advancedsettings.xml after updating to the Kodi 22 Alpha:

<advancedsettings version="1.0">
  <video>
    <bypasscodecprofile>true</bypasscodecprofile>
 </video>
</advancedsettings>

This is kind of a pain to do, so for those who aren’t too familiar with Kodi (like myself), the best way of doing this is going into Kodi’s file manager, mounting /sdcard as a directory, copying Profile/advancedsettings.xml to /sdcard, pulling that file down from /sdcard using adblink, modifying it on your PC, pushing it back to /sdcard, then once again copying it back to your Profile folder inside Kodi’s file manager.

I’m subscribed to email notifications so if anyone has the same issue and needs help beyond this, ping me and I’ll get back to you!

1 Like

That can also be done via SMB (SHIELD), or LocalSend (if you’re on Android).

Also: Your fix seems to only apply to Piers (Kodi 22 alpha)

Ah, good points!

I’ve updated my comment now to indicate that it’s for the Kodi 22 Alpha; that part slipped my mind.

I never hit the post play screen. The episode screen. Playback has nothing to do with it, it’s other devices the mismatch shows on, like plex web, tablet etc.

How are you testing this right now? Do you speed-skip through an episode to see if the progress gets saved?

0.8.0-beta12.4: script.plexmod.zip (3.0 MB)

Changelog:

  • Player: Make sure we select the right audio track more adamantly on certain start situations

There were situations when the first/default audio track wasn’t the selected one, that the wrong audio track was used in Kodi but the correct one was shown in PM4K’s menus. This seems to have been a timing issue and should be fixed now.

7 Likes

I imported a second version of a TV episode (in 4k) to check how the UI handled it and also to check resolution switching, but I clicked Play too fast to notice the version icon and it crashed the Fire stick - I had to power cycle to recover. It did throw up an error box with the Plex logo top right, but was then unresponsive. I’m guessing this was because I had cache media items/libraries enabled, and this confused things. When I restarted and checked the UI, the new 4K version was the first/selected item in the list and it played fine. I didn’t have debug logging enabled, and have also deleted the log file since, sorry.

Yeah that’s probably due to caching. We currently can’t react to changes on the PMS side of things, so we don’t necessarily know about the new version.

When PM4K crashes, it throws away the cache on the next start.

So yeah, caching is still a bit young, which is also why it isn’t enabled by default.

1 Like

fair enough, I’ve since disabled caching.
cheers

That’s what I tried when I tried making a short vid to show you yes. If that’s somehow different than playing naturally, that would explain why I can’t get it to do it. When I actually notice it, it’s from playing regularly.

Can you get me the logs nevertheless? I might still see tracebacks from when it happened

sorry, as mentioned, I subsequently deleted the logs (to get a smaller log I could view in Kodi file manager).

just checked and there’s no kodi.old.log either, although I don’t remember deleting that.

will just rename in future.