-
Notifications
You must be signed in to change notification settings - Fork 15
Advanced: Plex
WARNING: This section may involve editing the Plex database. If done incorrectly, this can corrupt your Plex install. I take no responsibility for you breaking Plex.
Webtools is an unofficial plugin store for Plex. Follow the install instructions from here. The Plug-ins
directory can be found in runtime_conf/plex/Library/Application Support/Plex Media Server/Plug-ins
.
After installing, you will need to restart Plex with docker-compose -f plex-compose.yml restart plex
.
While plugins are now no longer officially supported, they mostly do still work.
Custom Transcode Targets (For the Chromecast Ultra specifically, but should work for other profiles)
It may be useful in some cases to have custom transcode targets when optimising files for playback. When a transcode is done live (eg. when you choose to playback a movie that the Chromecast doesn't support) then Plex will communicate with the device to figure out what it supports. However, when 'optimising' your collection in advance, it has no default option to choose what device you'd like to transcode for.
It is possible to edit the database to tell Plex to optimise for a specific profile - but the profiles included in Plex is only for the first generation Chromecast, which is not the same as the Chromecast Ultra. For this reason, we will be adding a custom profile as well.
My Chromecast Ultra profile can be found here.
Drop custom profile .xml files into runtime_conf/plex/Profiles
. Note that this is a mount directly to /usr/lib/plexmediaserver/Resources/Profiles/
. This means that any modifications to existing files here will not persist. Only newly added files will persist.
This section will assist in changing the "Optimise" dropdown into optimising for the profile you just added.
- Shut down the Plex server with
docker-compose -f plex-compose.yml stop plex
. - Grab a copy of your database from
runtime_conf/plex/Library/Application Support/Plex Media Server/Plug-in Support/Databases/com.plexapp.plugins.library.db
. I very much advise backing it up at this point. - Open it in a sqlite db editor, I used DB Browser for SQLite. (We can't use the
edit-dbs.yml
container for this one because it doesn't support an extension that Plex uses, and I was too lazy to build my own container) - If you wish to remove the existing conversion options (eg. 'Optimised for Mobile', 'Optimised for TV' etc.), open the 'Execute SQL' tab and enter the following:
CREATE TRIGGER delete_conversion_options AFTER INSERT ON tags BEGIN DELETE FROM tags WHERE tag IN ('Optimized for Mobile', 'Optimized for TV', 'Original Quality'); END
DELETE FROM tags WHERE tag IN ('Optimized for Mobile', 'Optimized for TV', 'Original Quality');
To add your own conversion options, first fill out the following:
sr%3AdeviceProfile=Chromecast%20Ultra&sr%3AmediaSettings=advancedSubtitles%3Dburn%26autoAdjustQuality%3D0%26directPlay%3D1%26directStream%3D1%26directStreamAudio%3D1%26subtitles%3Dauto
Where 'deviceProfile' is the <Client name="">
in your custom profile. You can edit this string to your liking, though I have no documentation for it. You can URL Decode it to make it easier to read, but note that if you URL Encode it, it will no longer work as the encoder will encode the =
, which will break it.
Finally, insert it into the database:
INSERT INTO tags (tag, tag_type, extra_data) VALUES('Chromecast Ultra', 42, 'sr%3AdeviceProfile=Chromecast%20Ultra&sr%3AmediaSettings=advancedSubtitles%3Dburn%26autoAdjustQuality%3D0%26directPlay%3D1%26directStream%3D1%26directStreamAudio%3D1%26subtitles%3Dauto');
- You can now put the database back where it belongs,
docker-compose -f plex-compose.yml up -d plex
, and assuming you did everything correctly, you'll now be able to optimise for a specific profile: