Plex

From YobiWiki
Revision as of 21:16, 3 March 2017 by <bdi>PhilippeTeuwen</bdi> (talk | contribs) (Created page with " =Links= * Installation ** http://pazpop.fr/installer-un-serveur-plex-media-server-sous-gnulinux-debian/ (fr) ** https://support.plex.tv/hc/en-us/articles/200288586-Installat...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

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>