Plex

From YobiWiki
Jump to: navigation, search

Contents

Links

Media preparation


Quick ref:

# Movie:
MovieName (release year).ext
/Movies/MovieName (release year)/MovieName (release year).ext
# Movies in Multiple Parts (max 8):
/Movies/MovieName (release year)/MovieName (release year) - [cdX|discX|diskX|dvdX|partX|ptX].ext
# artwork: (jpg, jpeg, png)
MovieName (Release Date).ext
Movie/MovieName (Release Date)/[cover|default|folder|movie|poster].ext
# fanart:
MovieName (Release Date)-fanart.ext
Movies/MovieName (Release Date)/[art|backdrop|background|fanart].ext
# subtitles:
MovieName (Release Date).[Language_Code].ext
Movies/MovieName (Release Date).[Language_Code].ext
Movies/MovieName (Release Date).[Language_Code].forced.ext
# extras:
Movie/MovieName (Release Date)/Descriptive_Name-[behindthescenes|deleted|featurette|interview|scene|short|trailer].ext
Movie/MovieName (Release Date)/[Behind The Scenes|Deleted Scenes|Featurettes|Interviews|Scenes|Shorts|Trailers]/Descriptive_name.ext

There is a possibility to add a .plexignore file to any folder to exclude files or folders, à la .gitignore.

To rename stuff, http://www.filebot.net/ seems handy (while I still prefer my little scripts...).

I had a bunch of fitness DVDs. Firstly I separated them in a "Movies/Personal Media"-typed library and a "TV Shows"-typed library depending on the number of parts and the availability of separate covers but the rendering of "local movies" catalog on the TV wasn't optimal as it was showing extracted thumbnails instead of the DVD covers. So I finally ended up moving everything in a single "TV"-typed library.

E.g.:

Churchill Workouts/
  Season 1/
    Churchill Workouts S01E01.mp4
  poster.jpg

To add custom titles on "episodes", I use the XMBC plugin, see below.

To use it, select it as agent for the library and add an XML file to each episode:

Churchill Workouts/
  Season 01/
    Churchill Workouts S01E01 No Sweat.mp4
    Churchill Workouts S01E01 No Sweat.nfo :
      <episodedetails>
        <title>No Sweat</title>
        <season>01</season>
        <episode>01</episode>
      </episodedetails>
    Churchill Workouts S01E01 Cigars Only.mp4
    Churchill Workouts S01E01 Cigars Only.nfo :
      <episodedetails>
        <title>Cigars Only</title>
        <season>01</season>
        <episode>02</episode>
      </episodedetails>
  poster.jpg

Little helper to run against .mp4 to create .nfo:

serie="Churchill Workouts"
for i in *.mp4; do 
    (echo -e -n "<episodedetails>\n  <title>";
     echo -n "${i}"|sed "s/$serie S..E.. \(.*\)....$/\1/";
     echo -e -n "</title>\n  <season>01</season>\n  <episode>";
     echo -n "${i}"|sed "s/$serie S..E\(..\).*/\1/";
     echo -e "</episode>\n</episodedetails>") \
    >"${i}.nfo";
    mv "${i}.nfo" "${i%.???}.nfo";
done

Plugins

Install WebTools, it helps installing other plugins and contains a few useful plugins itself, e.g. finding mismatches between DB and filesystem (a possible indication of a wrong access control e.g.)

Manual installation:

Interface:

TODO Unsupported AppStore V2: https://forums.plex.tv/discussion/202282


For French movies, I installed an Allocine agent (https://github.com/FredjeB/Allocine-Metadata-agent) but in the long run, the default Plex/IMDB/TheTVDB are doing well their job.

Manual installation (was before WebTools):

wget -O /tmp/allocine.zip https://github.com/FredjeB/Allocine-Metadata-agent/archive/master.zip
mkdir -p /var/lib/plexmediaserver/Library/Application Support/Plex Media Server/Plug-ins/Allocine.bundle/Contents/
cd /var/lib/plexmediaserver/Library/Application Support/Plex Media Server/Plug-ins/Allocine.bundle/Contents/
unzip /tmp/allocine.zip
mv Allocine-Metadata-agent-master/* .
rmdir Allocine-Metadata-agent-master
chown -R plex.plex ..

To transcode or not to transcode

I had difficulties playing back some contents on my TV. The TV was definitively capable of playing those movies but Plex insisted on transcoding them, which my Readynas CPUs didn't appreciate.

It's a LG 55E6V and apparently its Plex client is matched by the server to the "HTML TV App" profile. So the trick is to modify that profile. Based on several forum threads such as https://forums.plex.tv/discussion/221577/plex-for-lg-tv-webos-3-0/p2 here is my current /usr/lib/plexmediaserver/Resources/Profiles/HTML TV App.xml

<?xml version="1.0" encoding="utf-8"?>
<Client name="HTML TV App">
  <!--
   Author: Plex Inc.
   History:
    0.9.12.0:  First release. Included HLS and DASH MusicProfile with videoCodec.
    0.9.12.2:  HTTP protocol support added for VideoProfile and MusicProfile with videoCodec.
  -->
  <TranscodeTargets>
    <VideoProfile protocol="hls" container="mpegts" videoCodec="h264,mpeg2video" audioCodec="aac,ac3" context="streaming">
      <Setting name="BreakNonKeyframes" value="true" />
    </VideoProfile>
    <VideoProfile protocol="hls" container="mkv" videoCodec="h265,h264,mpeg2video" audioCodec="aac,ac3,mp3,pcm" context="streaming" />
    <VideoProfile protocol="dash" container="mp4" videoCodec="h264" audioCodec="aac" context="streaming" />
    <VideoProfile protocol="http" container="mkv" codec="h264,mpeg2video" audioCodec="truehd,aac,ac3,mp3,pcm" context="streaming" />
 
    <MusicProfile protocol="hls" container="mpegts" videoCodec="h264" audioCodec="aac" context="streaming" />
    <MusicProfile protocol="dash" container="mp4" videoCodec="h264" audioCodec="aac" context="streaming" />
    <MusicProfile protocol="http" container="mkv" videoCodec="h264" audioCodec="aac" context="streaming" />
 
    <PhotoProfile container="jpeg" />
  </TranscodeTargets>
  <DirectPlayProfiles>
    <VideoProfile container="mpeg" codec="mpeg2video,mpeg4" audioCodec="ac3,mp3" />
    <VideoProfile container="mkv" codec="h265,h264,mpeg2video" audioCodec="truehd,aac,ac3,mp3,pcm" />
    <VideoProfile container="mpegts" codec="h264" audioCodec="ac3,aac,mp3" />
    <VideoProfile container="mp4" codec="h265,h264" audioCodec="truehd,aac,ac3,mp3,pcm" />
    <VideoProfile container="mov" codec="h264" audioCodec="aac,pcm" />
    <VideoProfile container="avi" codec="mpeg4" audioCodec="pcm" />
    <VideoProfile container="flv" codec="h264" audioCodec="aac" />
    <MusicProfile container="mp3" codec="mp3" />
    <MusicProfile container="mp4" codec="aac" />
    <PhotoProfile container="jpeg" />
  </DirectPlayProfiles>
  <CodecProfiles>
    <VideoCodec name="*">
      <Limitations>
        <UpperBound name="video.width" value="3840" isRequired="true" />
        <UpperBound name="video.height" value="2160" isRequired="true" />
        <UpperBound name="video.bitDepth" value="10" />
      </Limitations>
    </VideoCodec>
  </CodecProfiles>
</Client>

For the videos not natively supported by the client, Plex will transcode them on-the-fly. It's possible to "optimize" them to transcode them offline ahead but still it's quite slow on my NAS.

In case of transcoding troubles, compare the Plex behavior with playing the same content through XPlay, ChromecastUltra (from Plex web client on Chrome), DLNA (via Plex media server) and DLNA (via native NAS support) before deciding to transcode the movie yourself.

As last resort solution, I'm using Handbrake to transcode those ones by myself. The default MPEG-4 Regular/Normal profile is doing well (H264, framerate same as source). I unselect ipod-friendly m4v in favor of mp4.

Plex can't handle .iso or VIDEO_TB file structure but Handbrake can handle them fine (still, always check the result!).


XPlay

Alternative Plex client for LG WebOS, much closer to the web interface so more to the point IMHO (lists of covers, no dashboard).
It tries to direct play as much as possible (see settings) and tell when it would be transcoded (usually just changing audio and/or subtitles can avoid transcoding).
Costs 6.95 GBP to unlock after the first four days of demo.

Local

It may be useful to install another server on e.g. a laptop, but not to be active permanently: (to be done at each update)

# service plexmediaserver stop
# systemctl disable plexmediaserver.service
...
# service plexmediaserver start

Debian

/etc/apt/sources.list.d/plexmediaserver.list : fix it to

 https://downloads.plex.tv/repo/deb ./public main

Then

 wget -q https://downloads.plex.tv/plex-keys/PlexSign.key -O - | apt-key add -
 apt-get install apt-transport-https
 apt-get update
 apt-get install plexmediaserver
Personal tools
Namespaces

Variants
Actions
Navigation
Tools