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
This will give you the latest stable package. If you have a Plex Pass you will get an even later preview version.

Changelog

Download the Debian package from https://www.plex.tv/downloads and follow the prompts.

Install the package...

sudo dpkg -i plexmediaserver_VERSION_amd64.deb

Install Plex Media Server On A Raspberry Pi
https://www.htpcguides.com/install-plex-media-server-on-raspberry-pi-2/

https://www.htpcguides.com/properly-mount-usb-storage-raspberry-pi/

Upgrade
Latest Version: 1.7.3.3937-70f781325 - 15 June 2017

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

wget wget https://downloads.plex.tv/plex-media-server/1.7.3.3937-70f781325/plexmediaserver_1.7.3.3937-70f781325_amd64.deb sudo dpkg -i plexmediaserver_1.7.3.3937-70f781325_amd64.deb

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

Trailers and Extras
You can organize your local extras into specific subdirectories inside the main directory named for the movie. Extras will be detected and used if named and stored as follows:

Movie/MovieName (Release Date)/Extra_Directory_Type/Descriptive_name.ext

Where Extra_Directory_Type is one of:


 * Behind The Scenes
 * Deleted Scenes
 * Featurettes
 * Interviews
 * Scenes
 * Shorts
 * Trailers

It is recommended that you provide some sort of descriptive name for the extras filenames...

/Movies /Avatar (2009) Avatar (2009).mkv /Behind The Scenes Performance Capture.mkv /Deleted Scenes Bar Fight.mp4 Lost Sister.mkv /Interviews Sigourney Weaver.mp4 Stephen Lang.mp4 /Scenes Arrival.mp4 /Trailers Teaser Trailer.mp4 Theatrical Trailer #1.mp4 Theatrical Trailer #2.mp4

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 forced (only foreign speaking parts) then you can put them in the same way.

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

It is best in UTF-8 encoding.

$ file "Avatar (2009).eng.srt" Avatar (2009).eng.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,32469,3005,8324/tcp sudo ufw allow from 192.168.0.0/24 to any port 1900,5353,32410,32412,32413,32414/udp

Old method...

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

Backing Up Plex Media Server Data
/var/lib/plexmediaserver/Library/Application Support/Plex Media Server/

https://support.plex.tv/hc/en-us/articles/201539237

Moving To Different Server
https://support.plex.tv/hc/en-us/articles/201370363-Move-an-Install-to-Another-System

Plex Media Player
This is the new GUI front end to replace 'Plex Home Theatre'.

https://www.plex.tv/apps/computer/plex-media-player

https://support.plex.tv/hc/en-us/articles/208050627-Plex-Media-Player-Overview

Download Disk Image
https://plex.tv/downloads --> Get apps and stream to any device --> Plex Media Player for Embedded Platforms

Create SD Card From Disk Image
https://support.plex.tv/hc/en-us/articles/212523657

Getting Started
https://support.plex.tv/hc/en-us/articles/208050647-Getting-Started

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
https://pimylifeup.com/raspberry-pi-plex-server/

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.

https://www.youtube.com/watch?v=dDXZRw9b1pQ

There are 2 versions of this TV app:-

OLD - Samsung Smart Hub (2010-2015 models)
http://plexforsamsung.pbworks.com/w/page/40757181/Home

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

NEW - Smart TVs (LG, 2016 Samsung)
https://forums.plex.tv/categories/plex-for-smart-tvs-non-samsung

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.

See this guide for details.

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.

Introduction
https://github.com/trakt/Plex-Trakt-Scrobbler

Installation
https://github.com/trakt/Plex-Trakt-Scrobbler/wiki/Installation

Why are videos watched by other users being scrobbled to my profile?
https://github.com/trakt/Plex-Trakt-Scrobbler/wiki/FAQ---Scrobbling#2-why-are-videos-watched-by-other-users-being-scrobbled-to-my-profile

Sending Videos To Watch Later And Plex It!
You can email a special address and it will add any video links in the body of the message to your Plex Media Server in the 'Watch Later' section.

You can also drag a special bookmark to your web browser toolbar and click on it when you find a page with a video to watch later.

Go to this page on your Plex Media Server Web App (adjust IP address as necessary):-

http://192.168.0.252:32400/web/index.html#!/playlist/queue/help

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