Plex

Introduction
Plex is a media player system and an associated media server that organizes personal media stored on local devices. It organizes audio (music) and visual (photos and videos) content from personal media libraries and streams it to mobile devices, smart TVs, and multimedia boxes like Roku.

Plex is available for Windows, Android, Linux, OS X, and FreeBSD. Additionally, Integrated Plex Channels provide users with access to a growing number of online content providers, such as YouTube, Vimeo, TED Talks, and CNN, among others. Plex also provides integration for cloud services including Bitcasa, Box, Dropbox, and Google Drive.

Plex's front-end media player, Plex Media Player (formerly Plex Home Theater), allows the user to manage and play music, photos, and videos from a local or remote computer running Plex Media Server. Additionally, the integrated Plex Online service provides the user with a growing list of community-driven plugins for online content including Netflix, Hulu, and CNN video.

Installation
CHECK

Which version do I have already installed?

sudo apt show plexmediaserver Package: plexmediaserver Status: install ok installed Priority: extra Section: video Installed-Size: 215 MB Maintainer: Plex Inc  Version: 1.2.6.2975-9394c87 Homepage: https://plex.tv Download-Size: unknown APT-Manual-Installed: yes APT-Sources: /var/lib/dpkg/status Description: Plex organizes all of your personal media so you can easily access and enjoy it.

DEB

This will give you the latest package. The PPA method below will not.

Current Latest Official Plex DEB Version: 1.2.6.2975-9394c87 (Changelog)

Download the Debian package. If this direct link does not work, you'll have to go to https://www.plex.tv/downloads and follow the prompts.

wget https://downloads.plex.tv/plex-media-server/1.2.6.2975-9394c87/plexmediaserver_1.2.6.2975-9394c87_amd64.deb

Install the package...

sudo dpkg -i plexmediaserver_1.2.6.2975-9394c87_amd64.deb

Er, that's it. Yeah, I know, so difficult.

PPA

This will not always give you the latest version, because it is run by a fan, Romain Albouy, and not official.

Current Latest Unofficial PPA Version: 0.9.16.6.1993-5089475

sudo add-apt-repository 'deb http://ubuntu.azuras.net/ trusty main' sudo apt-get update sudo apt-get install plexmediaserver

https://forums.plex.tv/discussion/186136/ubuntu-repository

Upgrade
Download the latest version, then update. It will automatically stop and start the software...

sudo dpkg -i plexmediaserver_1.1.4.2757-24ffd60_amd64.deb (Reading database ... 463094 files and directories currently installed.) Preparing to unpack plexmediaserver_1.1.4.2757-24ffd60_amd64.deb ... plexmediaserver stop/waiting Unpacking plexmediaserver (1.1.4.2757-24ffd60) over (1.1.3.2700-6f64a8d) ... Setting up plexmediaserver (1.1.4.2757-24ffd60) ... plexmediaserver start/running, process 9951 Processing triggers for desktop-file-utils (0.22-1ubuntu1) ... Processing triggers for mime-support (3.54ubuntu1.1) ... Processing triggers for ureadahead (0.100.0-16) ... ureadahead will be reprofiled on next reboot

Stop Start Status
service plexmediaserver start service plexmediaserver stop service plexmediaserver status

Disable Auto Start
sudo systemctl disable plexmediaserver.service

or...

sudo nano /etc/init/plexmediaserver.conf
 * 1) start on filesystem and net-device-up IFACE!=lo

or...

sudo echo "manual" >/etc/init/plexmediaserver.override

Media Preparation
Make sure you organise your movies and TV shows into separate folders.

e.g.

~/Videos/Movies

and

~/Videos/TV Shows

Then, put your Movies and TV Shows in those folders like below, making sure you include the year...

e.g.

. |-- Movies |  |-- Act of Valor (2012).mp4 |  |-- Annie (1981).mp4 |  |-- Battle Los Angeles (2011).mp4 |  |-- Eye in the Sky (2016).mp4 |  |-- Frozen (2013).mp4 |  |-- Green Zone (2010).mp4 |  |-- Love Actually (2003).mkv |  |-- Men In Black 3 (2012).mp4 |  |-- Sucker Punch (2011).mp4 |  |-- Term Life (2016).mp4 |  |-- The Cat in the Hat (2003).mp4 |  |-- The DaVinci Code (2007).mp4 |  `-- Transformers Age of Extinction (2014).mp4 `-- TV Shows |-- Adventure Time |  |-- Adventure Time S08E01.mkv |  |-- Adventure Time S08E02.mkv |  |-- Adventure Time S08E03.mkv |  |-- Adventure Time S08E04.mkv |  |-- Adventure Time S08E05.mkv |  |-- Adventure Time S08E06.mkv |  |-- Adventure Time S08E07.mkv |  |-- Adventure Time S08E08.mkv |  |-- Adventure Time S08E09.mkv |  `-- Adventure Time S08E10.mkv |-- Archer (2009) |  |-- Archer (2009) S07E01.mkv |  |-- Archer (2009) S07E02.mkv |  |-- Archer (2009) S07E03.mkv |  |-- Archer (2009) S07E04.mkv |  |-- Archer (2009) S07E05.mkv |  |-- Archer (2009) S07E06.mkv |  |-- Archer (2009) S07E07.mkv |  |-- Archer (2009) S07E08.mkv |  |-- Archer (2009) S07E09.mkv |  `-- Archer (2009) S07E10.mkv `-- The Last Ship |-- The Last Ship S03E01.mkv |-- The Last Ship S03E02.mkv `-- The Last Ship S03E03.mkv

Subtitles
Add the external subtitle file using the same name as the movie, including the ISO Country code.

/Movies Avatar (2009).mkv Avatar (2009).eng.srt

If you have extra subtitles like SDH then you can put them in the same way.

/Movies Avatar (2009).mkv Avatar (2009).eng.srt Avatar (2009).eng(SDH).srt

It is best in UTF-8 encoding.

$ file "Avatar (2009).eng(SDH).srt" Avatar (2009).eng(SDH).srt: UTF-8 Unicode (with BOM) text, with CRLF line terminators

https://support.plex.tv/hc/en-us/articles/200471133-Adding-local-Subtitles-to-your-media

https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes

Allow Firewall Ports
To allow from anywhere (when using Friends Sharing)...

sudo ufw allow 32400,32469,3005,8324/tcp sudo ufw allow 1900,5353,32410,32412,32413,32414/udp

To allow from only your local network...

sudo ufw allow from 192.168.0.0/24 to any port 32400 proto tcp sudo ufw allow from 192.168.0.0/24 to any port 3005 proto tcp sudo ufw allow from 192.168.0.0/24 to any port 1900 proto udp sudo ufw allow from 192.168.0.0/24 to any port 5353 proto udp sudo ufw allow from 192.168.0.0/24 to any port 8324 proto tcp sudo ufw allow from 192.168.0.0/24 to any port 32410,32412,32413,32414 proto udp sudo ufw allow from 192.168.0.0/24 to any port 32469 proto tcp

https://support.plex.tv/hc/en-us/articles/201543147-What-network-ports-do-I-need-to-allow-through-my-firewall-

Server Configuration
Log in to the web interface...

http://ip.address.of.server:32400/web

Add folders to the Library...

Hover mouse over Libraries > click + > Select Library Type > Name > Next > Browse > Add Library

Filters
Filters let you narrow your list of Movies or TV Shows based on various criteria, such as year or genre or actor.

Related Items
When using the mobile app and you are on the details page for a Movie or TV Show, scroll down and click the Related button.

Collections
Collections let you gather related movies together. Plex Apps let you choose a Collection for quick access. For example, you might add all the James Bond movies together in a "James Bond" collection.

To Add Items To A Collection
From Library List View


 * 1) Open the Library to create the collection
 * 2) Click the tickbox in the left action bar
 * 3) Click the poster for each item to be added to the Collection
 * 4) Select Add to Collection... under ... in the left actionbar menu
 * 5) Choose an existing Collection or type the name for a new one
 * 6) Click Save

From Item Details View


 * 1) Open the Edit details screen for the item
 * 2) Click the Collections box
 * 3) If the Collection already exists, choose it from the list
 * 4) If not, type the name
 * 5) Click Save

To Use Your Collections

 * 1) Start the mobile App
 * 2) Click on Movies
 * 3) Click the Filter menu (3 horizontal lines next to Cast Screen)
 * 4) Click Collection
 * 5) Tick your Collection
 * 6) Click Close

Thanks - https://support.plex.tv/hc/en-us/articles/201273953-Collections

To Delete Or Edit Collections

 * 1) Click on 'New Filter', then 'Collections', and select the Collection you want to rename/remove.
 * 2) Click the 'Select' button to enable multi-select mode (clearing the checkbox enables this. Not intuitive.).
 * 3) Select all the movies in the Collection. Click each movie, or click first, then shift-click last.
 * 4) Click the 'Edit' button.
 * 5) On the 'Tags' page, delete the existing name in the Collection field by clicking the little 'x' next to it (this eliminates the collection).
 * 6) If you are renaming the Collection, enter the new name in the Collection field and press Enter.
 * 7) Click 'Save.'

Thanks - https://forums.plex.tv/discussion/56490/edit-or-delete-a-collection/p2

Updating Media Details Manually
Using the Web interface, you can change the details for any media item, such as a movie poster.

When viewing a Library:


 * Find the media item (movie, TV series or episode, music album, etc.) in which you're interested
 * Hover over the item poster
 * Click the Edit button icon button (pencil)

Refreshing An Item

Sometimes, just refreshing the details for an item, will be enough to change the poster.


 * Find the media item (movie, TV series or episode, music album, etc.) in which you're interested
 * Hover over the item poster
 * Click the 3 dots (menu)
 * Click Refresh

Thanks - https://support.plex.tv/hc/en-us/articles/201272763-Edit-Details

Fix Incorrect Match
Sometimes Plex will get things wrong. Somehow, it managed to think "Robin Hood (2010)" was "Madagascar 3". Yeah, I know right.

To fix a stray item...


 * 1) Open the details/preplay screen for the item in Plex Web App
 * 2) Click the ... in the left actionbar to expose additional actions
 * 3) Choose Fix Incorrect Match
 * 4) Choose the correct Movie
 * 5) Click Save

Fix Missing Files - The Plex Dance

 * 1) Move all files for the show out of 'sight' of plex
 * 2) Update Library (not 'Force Update', and not 'Refresh all')
 * 3) Empty Trash
 * 4) Clean Bundles (Libraries ... Clean Bundles) More info
 * 5) Double check naming schema and move files back
 * 6) Update Library (not 'Force Update', and not 'Refresh all')

Thanks - https://forums.plex.tv/discussion/comment/908454/#Comment_908454

Emptying Library Trash
If you delete or move an item in your Library server, then Plex will mark it as in the "Trash" for a while and show an icon on top of the poster. When viewing the details for such an item, there will also be an "Unavailable" indicator.

After a while, the missing item will automatically be removed from the "Trash" and disappear from the Library.

However, you can choose to either "Empty Library Trash" manually or whenever it performs a Library Scan.

Manually

 * 1) Open Plex Web App
 * 2) Select your Plex Media Server in the left sidebar on the Dashboard
 * 3) Use the Global Library Actions dropdown and select Empty Trash...
 * 4) Confirm the action

On Library Scan

 * 1) Open Plex Web App
 * 2) Go to Settings > Server > Library
 * 3) Enable the Empty trash automatically after every scan option
 * 4) Save Changes

Thanks - https://support.plex.tv/hc/en-us/articles/200289326-Emptying-Library-Trash

Transmission FileBot Script
This is a variation on the script used for Kodi, but because it's Plex it does not require artwork or subtitle downloading.

/usr/bin/filebot -script "/home/user/Bin/amc.groovy" --output "/home/user/Plex" --log-file "/home/user/.filebot/logs/amc.log" --action copy --conflict override -non-strict --def "seriesFormat=TV/{n}/{n} {s00e00}" "movieFormat=Movies/{n} ({y})" clean=y "ut_dir=$TR_TORRENT_DIR/$TR_TORRENT_NAME" "ut_kind=multi" "ut_title=$TR_TORRENT_NAME"

System Requirements
Plex Media Server Requirements

Building Ultimate Plex Server

Processor
Minimum: Dual Core 2Ghz Recommended: Quad Core 3Ghz Ideal: Six Core 3.5Ghz


 * 1 Core = 1 x Transcoding Streaming Video
 * 2 Core = 2 x Transcoding Streaming Video
 * 3 Core = 3 x Transcoding Streaming Video
 * 4 Core = 4 x Transcoding Streaming Video

So, probably a quad core processor to allow streaming to 4 different devices simultaneously.

RAM
Minimum: 2GB Recommended: 4GB Ideal: 8GB

Example Transcoding Test Video
YouTube: Planet Earth - Birds Scene

Plex Home Theatre
A GUI front-end to access the Plex Media Server.

https://github.com/RasPlex/OpenPHT/releases

https://forums.plex.tv/discussion/222972/release-openpht-1-6-2

Keyboard Shortcuts
https://15254b2dcaab7f5478ab-24461f391e20b7336331d5789078af53.ssl.cf1.rackcdn.com/plex.vanillacommunity.com/ipb/monthly_04_2015/Plex%20Shortcuts.pdf

HOWTO: QUIT

H, LEFT ARROW , QUIT , ENTER

Raspberry Pi
http://www.rasplex.com

https://github.com/RasPlex/RasPlex

Debian Ubuntu Linux
https://github.com/RasPlex/OpenPHT/releases

wget https://github.com/RasPlex/OpenPHT/releases/download/v1.6.2.123-e23a7eef/openpht_1.6.2.123-e23a7eef-xenial_amd64.deb sudo dpkg -i openpht_1.6.2.123-e23a7eef-xenial_amd64.deb sudo apt-get -f install

Microsoft Windows
https://github.com/RasPlex/OpenPHT/releases

Apple OSX
https://github.com/RasPlex/OpenPHT/releases

Android
Overview

There are 4 options, which give you different features.


 * 1) Free + Anonymous = £0.00
 * 2) Free + Account = £0.00
 * 3) App Only + Account = £3.30 one-off payment *
 * 4) Plex Pass + Account = £4.00 per month payment

Creating a Plex Account is free, and it's just a way to link all your content together, recommend things, and link with other Plex users. You don't have to create an account, but it will help for the App only purchase.

Details


 * 1) Install Plex for Android > Start > SKIP > Free Trial > SKIP. With this, you can use the app to connect to a server, browse and then cast to a device.
 * 2) Create an account, install the app, then SKIP as above, but SIGN IN. With this, you can use the app to connect to a server, browse and then cast to a device. It also remembers your Plex Media Servers.
 * 3) Create an account, install the app, ACTIVATE the in-app purchase for £3.30, then SIGN IN. With this, you can use the app to connect to a server, browse, cast to a device and play media on the phone or tablet you are using. *
 * 4) Create an account, install the app, buy the PLEX PASS, then SIGN IN. With this, you can use the app to connect to a server, browse, cast to a device, play media on the phone or tablet you are using, and have members of the same family use their own logins in the house.

* I have chosen this option.

APK

https://www.apk4fun.com/apps/com.plexapp.android/

Changelog

http://forums.plex.tv/discussion/60585/plex-for-android/

Samsung
Yeah, they've already thought of that. Just go to the Samsung App Store on your TV and install the Plex App, then go to https://plex.tv/pin, log in, and enter the code from the Samsung Plex App on the web site.

http://plexforsamsung.pbworks.com/w/page/40757181/Home

https://forums.plex.tv/categories/samsung-smart-hub

Roku
Yes, of course. Just install the Plex channel on your Roku and launch it, then go to https://plex.tv/pin, log in, and enter the code from the Roku Plex channel on the website.

Thanks to Roku Blog.

NowTV
Depending on your devices firmware version you may be able to sideload a special version of Plex.

Last.fm
Scrobbling to Last.fm is activated not from within the Plex programme but via your Plex account, go to the following page (signing in if necessary):

https://plex.tv/users/edit

Scroll to the bottom of the page to the Social Media section and link your accounts.

Trakt
https://github.com/trakt/Plex-Trakt-Scrobbler/wiki/Installation%20-%20Linux%20(Shell)

PlexPy
https://github.com/drzoidberg33/plexpy

https://github.com/drzoidberg33/plexpy/wiki/Install-as-a-daemon

sudo ufw allow from 192.168.0.0/24 to any port 8181 proto tcp

PlexWatch
https://github.com/ljunkie/plexWatch

Documentation Manual
Step-By-Step Guide

Getting Started

Support
https://www.plex.tv/support

Forums
https://forums.plex.tv/discussions/mine

API
https://github.com/mjs7231/python-plexapi

Status
https://status.plex.tv