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

PM4K / PlexMod for Kodi

SOURCES

Code Repository
Issues (post bugs/issues here)
Discussions

Features (vs. official)

  • Maintained.
  • Very stable.
  • AV1 support
  • Compatible with Kodi 18, 19, 20, 21+ support (21/Omega is preferred)
  • Directplay anything (as long as your setup and Kodi supports it)
  • DirectStream support for every codec, not just AVC/MP3
  • Passthrough audio enhancements (e.g. prefer or force AC3/DTS depending on channel config)
  • Correctly identify and display video/audio streams (Atmos, DV, etc.)
  • Support all (+historic) watched marker styles
  • Add (auto-) intro/credits skipping
  • Add auto recap skipping
  • Modernized theme and assets
  • High performance UI
  • Chapters and virtual chapters in player
  • Optional TV binge-mode
  • Slow connection support (hotels for example)
  • Local/LAN server discovery and option to prefer local servers instead of secure connections
  • Real context-aware background images by default (not blurred to oblivion; configurable)
  • Optional solid-color-background instead of images
  • Optional post-play enhancements (via external addon settings)
  • Forced-subtitle selection configurable (non-forced can be enforced)
  • Improved photo playback/slideshow
  • Better resume and pre-play dialog (HDR/DV support, show resume time)
  • Add horizontal pagination for views
  • Show mark unplayed even if video in progress
  • Better/own PlayerProcessInfo (current stream info) implementation
  • Add vertical round robining for dialogs
  • Make background art blur and opacity configurable; display background art per item
  • Own Estuary-based skin, “Plextuary”, to reduce OSD-hiding-times and remove blurry backdrop while player is paused (install from repository)
  • Customizable player UI
  • Support SDH subtitle streams
  • Vastly improved music and photo handling
  • Path mapping support (SMB/NFS/
 instead of HTTP streaming)
  • Automatic plex.direct domain handling (no need for DNS rebind exemption)
  • Selective library hiding per user per server
  • Selective hub hiding
  • Watchlist support

(many older changes have been merged into the official addon; but we’ve departed from the official addon pretty massively)

ko-fi


KNOWN ISSUES

  • Album/Playlist-playback UI somewhat broken (skip-next in player doesn’t work); since Kodi 19; also in official addon; help needed Might be fixed from 0.5.4 onwards.
  • On NVIDIA SHIELD standby Kodi loses its audio passthrough capabilities (SHIELD/Kodi issue). You can circumvent that by using the plugin “Sleepy Watchdog” from the Kodinerds repository to automatically exit Kodi after a timeout. PM4K now has built-in functionality to exit Kodi when the display goes to sleep. Look at the system options tab!
  • Playing audio tracks directly from search results is broken
  • Multi-part media resume is somewhat broken (also see here for watch state issues)

NOTABLE CHANGES

2025

  • Add watchlist support
  • Achieve stability on CoreELEC
  • Massive speedups when rendering huge libraries, collections, playlists

08/2024

  • CoreELEC workarounds
  • Templating engine
  • 16:10, 4:3 support

05/2024:

  • Use new common watched-states instead of unwatched
  • Easy mapping
  • Sections are now movable and hidable

04/2024:

  • Fix DNS rebind issues for Kodi 19 and above
  • Assets updated and player UI theme support
  • Path mapping added (SMB/NFS/local mounts vs. HTTP)
  • Hide all Kodi loading spinners when using 0.7.8 beta and Plextuary

03/2024:

  • Fix any DNS rebind issues, hopefully
  • Drastically improve performance

12/2024:

  • Add Movie reviews
  • Localization fixes for PMS API results (library names, (subtitle-) stream names)
  • Full DirectStream capabilities including not burning in subtitles

Introduction

This is an unofficial partial rewrite and evolution of Plex4Kodi.

The original codebase has been abandoned by the company for years by now.

PM4K aims for a Plex-like user experience but doesn’t necessarily adhere to official guidelines. Its UX is directly based off of user feedback, while retaining the Plex optics.

It is still based off of the original P4K source and critical bugfixes might be PR’d back, depending on the severity.

Installation (recommended)

  • Add https://pm4k.eu/ (or https://pannal.github.io/dontpanickodi/) to your Kodi installation as a source in file manager (Hit Add source in File Manager, click on the selected “<None>” in the list, enter https://pm4k.eu, OK, down, enter a name, hit OK)

  • Go to Settings->Addons, choose “Install from zip file”, choose the file source you added and install the repository

  • Install Plex via Settings->Addons->Install from repository->Don’t Panic->Video add-ons->Plex

  • Optional, recommended: Install Plextuary via Settings->Addons->Install from repository->Don’t Panic->Look and Feel->Skin->Plextuary

Installation (old stable only) - HEAVILY OUTDATED

  • Install “PM4K for Kodi” from the official Kodi repository
  • Install Plextuary skin using the above

Develop install:

Kodi Repository GitHub Source

Translation

You can help! Join the translation effort at POEditor (thanks for the free open source license, guys).

Changelog

1.0.0

CoreELEC

  • Fix issues with delayed audio playback via the alternate seek method
  • (Re-) Implemented sophisticated alternate seek method for problematic devices (brought its own quirks)
  • Gradually improved alternate seek to a stable state with community feedback
  • When switching audio track don’t trigger progress events

Watchlist

  • Implement first version of the watchlist feature
  • Auto-remove watched items (movies, shows) from the watchlist (adjustable via setting)
  • Allow adding any media item to the watchlist from any media view
  • (blindly) remove item from watchlist if manually marked watched via Home or Library context menus
  • Allow visiting and playing back items on any available server with the item available, without having to manually switch servers
  • Allow selection between multiple versions, if the case, instead of only one/the first per server (ordered by bitrate)

Subtitles

  • Add support for subtitle Auto-Sync (based on audio analysis, PlexServer-side)
  • Allow live-toggling of subtitle Auto-Sync in the player (overrides global setting temporarily, or per-TV-show setting)
  • Fix embedded subtitle selection when path mapping enabled
  • Add subtitle language denylist (disable subtitles for native languages)
  • Live-download subtitles via Plex (or Kodi, or both; pre-play and during playback)
  • Parse, use and store Plex account subtitle preferences

Episodes

  • Fix episode progress handling
  • Try using PlexServer settings for episode completion handling
  • Improve background music handling
  • Fix play from beginning not working for context menu of episode list items

Libraries

  • Massive potential speedup (5-10x) for huge libraries
  • Adhere to the library collections setting of Plex
  • Use library title in title header instead of library type
  • listview-16x9: Reimplement item type filter
  • General fixes

Collections

  • Fix collections repeating themselves after CHUNKSIZE hit (240 by default); Improve performance tenfold for big collections; Implement chunking in Collection.all()

Playlist

  • Fix playlist subsequent chunking (was broken) (thanks @BrendanMyers88)
  • Select the currently relevant item once it’s been created properly
  • Massively improve resource usage on big video playlists when returning from playback by only refreshing affected items
  • Correctly show and scale video progress

UI

  • Mark any item as played/unplayed on Home (even in-progress ones), Libraries
  • Allow removing individual items from Continue Watching/On Deck (same as in official clients)
  • Implement fast server and user switch in Home (via long-press/context menu)
  • Visual changes to adhere more to the 2024 style (player, dropdowns, dialogs)
  • Add the ability to hide episode and movie spoilers defined by multiple user settings (titles, blur images, summaries, ratings)
  • Add the ability to always resume in progress media (also directly from home if wanted); can be overriden using long-press/context menu
  • Settings: Allow navigation using MOVE_RIGHT/LEFT; fixes
  • Unify dropdown behaviour: always allow round-robin on any dropdown; default close behaviour is pressing left or BACK/PREVIOUS_MENU
  • Core/Poster dimensions: Use 268x402 (0.66 ratio) for poster base resolution instead of 268x397 (0.675 ratio); unifies vertical scaling for posters and collection art
  • Unify bound Home key (should now work everywhere)
  • Home/Core: Don’t retain background image when switching home users
  • Home/Hubs: Use season thumbnail for episodes if possible (adjustable via setting)
  • Home: Add context menu option to start playback from beginning for in progress items when resume in progress items on home is enabled
  • Home: Make moving sections more resilient (esp. when moving fast/holding left/right)
  • Home: Add “Minimize” and “Exit” options to user menu (touch based devices can’t easily hit the exit menu by using BACK)
  • Episodes: Use season art as background if available
  • Episodes: Show correct cast per episode, not from parent show
  • Movies/Shows/Episodes: Add Directors (up to two) to the beginning of the cast list; support searching for director’s movies (currently not possible with shows/episodes)
  • Episodes/Shows/Movies: Make “go to section” action actually visit the section instead of the home hub
  • Remove most obsolete dividers in sub views
  • Movies/Episodes: Properly vertically align audio/video/subtitle labels within textures
  • Movies: Show duration for extras
  • Postplay: Scroll titles (instead of cutting them off + ellipsis); scroll multiline summaries
  • Item/AudioSettings: Don’t trim secondary title, scroll it

Videoplayer

  • Modernize the usage of the Plex Media Decision Engine
  • Use bitrate instead of resolution when asking the Plex Server for a decision (better transcode behaviour, especially with HEVC)
  • Any transcode quality selection is now bitrate based, as the resolution can (and should) vary
  • Add the ability to not spoil anything during playback
  • Add fast resume/pause behaviour (use OK/ENTER to quickly resume when paused or pause when playing, instead of showing the OSD)
  • When showing stream info, pressing RIGHT will show playerprocessinfo, pressing LEFT will show playerdebug
  • Don’t skip to next episode after final credits marker was skipped if binge mode or skip postplay for TV isn’t active
  • Never show postplay for movie extras, regardless of any postplay setting
  • Allow for immediate skipping of a counting down marker (before you had to wait 1 second for that to work) (needs the respective AddonSetting enabled as well)
  • PlayerVideoCurrentPlaylist: Scroll titles if they’re too long; allow vertical round-robining at the top boundary; allow closing the playlist by pressing LEFT
  • Use uuid4() as session ID; keep session ID when switching streams; report session ID when sending timeline requests
  • Remove artificial percentage-based virtual chapters (intro/outro are still generated if necessary)
  • When stopping playback after idle, don’t start playback of next episode/playlist item
  • Fix rare occasion where immediately going to next item in playlist/season would keep the “skip prev” button disabled, when the playlist/season was started at episode 1
  • Ensure correct audio track was set after a handler was reused (skip to next video was pressed in player)
  • SeekDialog/CurrentPlaylist: Mark previous episodes/items as watched in current playlist during a multi-item playback session
  • SeekDialog/CurrentPlaylist: Show progress indicators for items in playlist; “live” snapshot of current video progress when opened as well

Core:

  • Add Autoupdater (for beta releases)
  • VideoPlayer/Timeline event improvements
  • Ship certificate bundle and allow manual certificates
  • Improve background resolution by allowing a manual scale value
  • Fix Collections
  • Fix Playlists
  • Improve VideoPlaylists
  • Fix Postplay issues
  • Fix MusicPlayer
  • Migrate to InfoTags for Kodi >= 20, removes deprecation warning for setInfo
  • Fix HTTPConnection was never async. Unify Asynchronicity between HTTPConnection and HTTPSConnection via AsyncConnectionMixin
  • Add requests cache for Plex data (can also be persisted), to speed up re-visiting resource-heavy views
  • Fix core networking issues
  • Basic support for external players. Does not support seeking or resuming inside external players but tries to keep the playback and resume states (for resuming an item with an external player you’ll have to seek there yourself); only supports path mapping if the external player can access the same path PM4K sees
  • Core/Transcode/Audio: Allow audio transcode targets ‘mp3’, ‘ac3’, ‘aac’, ‘opus’, ‘vorbis’, ‘eac3’, ‘flac’, ‘alac’ (new: eac3, vorbis, flac, alac)
  • Improve audio stream type detection
  • Improve correct audio stream selection during certain events fixing Kodi quirks
  • Add setting to loop theme music (default: on)
  • Harden VideoPlayer
  • Implement cleaner shutdown functionality
  • Support custom theme.mp3 theme music for TV shows and movies (additional extensions: ‘ac3’, ‘aac’, ‘opus’, ‘vorbis’, ‘eac3’, ‘flac’, ‘alac’)
  • Watchlist/Core/ThemeMusic: While traversing items of multiple types (movies and shows), properly stop or start theme music if necessary
  • Support Plex markers as watched indicators
  • Check plex.direct dns rebind issues more thoroughly and don’t completely rely on the protection flags from the Plex server registry (often false); can lead to a slightly longer bootup time
  • Fix plex.direct host mapping not being triggered in certain situations (local docker IP mapped to VM for example)
  • Don’t consider a resolved plex.direct domain with IP 0.0.0.0 as “successfully resolved”
  • Force plex.direct connectivity check if the current connection has hostname issues (should fix certain setups with manual connections/LAN connections without allowing insecure local connections, falling back to plex.direct)
  • Home/Movies/Shows/Episodes/Libraries: Implement generic watched toggle; toggle watched via keyboard mapping “w” (buttonCode: 61527)
  • Home: Don’t fail hard when no currently selected server is available
  • Home: After selecting an unavailable server from the dropdown, shutdown wasn’t possible
  • Write templates to user directory instead of plugin directory when env var INSTALLATION_DIR_AVOID_WRITE is set (useful when plugin directory isn’t writable)
  • AddonSettings: Use 850ms as new default for the Alternate seek fix (was: 500ms)
  • Bring back screensaver.
  • Optionally allow direct play for resolutions above 4K

Translations

  • Update translations for Spanish (100%), French (75%), Chinese (90%), Hungarian (100%), Italian (63%)

Addons:

  • Provide the Plextuary skin with optimizations for CoreELEC and CoreELEC CPM
  • Plextuary: Allow customization of Exit menu
  • Add “McFontFace” Kodi font management plugin
  • Add “PM4K Log Uploader” plugin

Older changes

31 Likes

The participation is low! Please participate!

Download P4K Kodi19 Testing branch: Kodi19 Branch Snapshot
Download P4K Kodi19 with all the awesomeness

2 Likes

Where should error reports go with your custom additions? Into the same GH project?

Sure, that’d be fine, at least for the unmerged changes. I’ve enabled the issue tracker there.

1 Like

Hi, some general feedback on the version with the additional updates etc. I’m using Kodi 18.4 on a Sony Bravia TV.

  • Cannot view photos in photo libraries - I just get the generic background image. Videos in photo libraries actually playback ok
  • When viewing a video it is not possible to use the timeline to skip backwards or forwards - video stutters but returns back to the original position

I think these are easily reproducible but if it would help to open a github issue let me know.

EDIT by the way its great to see some work on Plex for Kodi, much appreciated! Kodi works best for 4K on my tv and can always be relied on

1 Like

These are actually not easy to reproduce as the behaviour doesn’t appear neither on Windows nor OSMC. A Github issue would help, as well as logs.

1 Like

Stumbled across this, looks like great work. Plex is the only add on I use. I was trying to get it installed on Kodi with Apple TV but so far no such luck. Couldn’t figure out how to get the zip file over to install it.

I think this works only with Desktop players and not with hardware platforms like ATV and Roku, etc.

1 Like

That’s a shame. I was looking for a solution I thought I had found it.

I don’t think that’s true. You might not be able to install the preview version, yes.

But you can install the official release version, because it is available in the official add-on repository. It can be installed right from inside Kodi.

2 Likes

Trying “awesomeness” version.

Kodi is version 18.5 on LibreElec 19.2.0
Hardware Asus Chromebox with external USB dac for audio

So far have tried running a large random music mix.
tried a movie trailer followed by a movie play
 all good.

Seems so much faster than the default addon version. Not as clunky,

If I bounce out of it and back to Kodi main, I can’t get back to the addon, does not start. I suspect this may be due to my having KodiPlexConnect enabled?

anyway, let me know what specifically you’d like tested if anything.

Nice to see someone working on this stuff.

Wishlist: more music stuff ie. plexamp integration, random shuffle radios

thx -bruce.

I can install the usual plex add on but not this due to the method.

I’ll need to figure out how to get it in a repository for kodi to take it from there.

I test it on a nvidia shield with latest kodi 19 nightly, glad to have this addon updated, very nice job. No crash, art is back, god job. Now, If only you could implement the audio theme like the native plex for android tv does, it would be perfect.

Can I ask how you got the add on installed on shield? Do you save to device first?

Yeah, I saved the zip to a network share mounted on the shield. Then in kodi, addon, install from zip.

I still can’t get this to work on my Apple TV. Can’t get the file to install. Is it on a repo or can anyone put it on one? I tried but got stuck with it all.

I tried out this plugin again, and it seems to work mostly fine with the exception that for the first 20-ish seconds of any video there is no subtitles. Anyone else noticed something like that?
Using Kodi 18.5 and this version of the addon https://github.com/pannal/plex-for-kodi/archive/develop_kodi1819.zip

3 Likes

@sensei321 I do not experience that behaviour using an MP4 with (external) SRT subtitles on Kodi 18.5. Using a movie which has subtitles pretty much from the start.

Thanks @panni for your fork, it seems to have improved slow artwork loading. Shame Plex does not update the official kodi plugin anymore.

1 Like

Hi, Ik had al diverse plex addons geprobeert, maar allerlei install fouten, zowel install vanuit .zip of repository. maar deze werkt op mijn net geinstalleerde nieuwste Matrix Kodi fantastisch.

Interesting. I think the files I used were mkv with internal subs. I’ll check some more.