Plex Server Setup Notes

We have a collection of DVDs and music CDs that we would like to be able to watch and listen to, but storing them takes space.  Rather than keep the discs around where they are cluttering the room, I am working on loading them into a Plex Media Server.  That way, we can watch the DVDs through the Chromecast attached to our TV and the music, either through the Chromecast on the TV or the Chromecast Audio in the kitchen.

Basic Plan

The Plex_Server holds all the media and streams it do devices or Chromecast.  Chromecast is connected to the projector.  Projector is connected to the stereo for audio.

Media Controller can be the Plex client app running on a cell phone.  We might want to get a dedicated tablet to run the client as a controller so that the boys or guests can control the video without having to use one or our phones or to grant Plex access specifically to them.  Configuration and control also happen through a web app running on the server.

For now, the Plex server will be in the room with us, but I plan to eventually move it somewhere else.  As long as both the Chromcast and the Plex Server have good connections,  they need not be in the same room.  That is, the server can be noisy and
have fans with no need to worry about fan noise disrupting movie watching.

How to Configure

The server will be running headless and unattended, so I am not installing a GUI on it.  Here is what I have done so far starting with a base Ubuntu 16.04 server (no GUI):

  1. Install Plex Server on the server.  I used the [Plex PPA](https://launchpad.net/~plexapp/+archive/ubuntu/plexht) to install the `plexmediaserver` package.
  2. Copy some content to the server in an obvious place.  I had the MP-3 files I previously ripped and loaded onto my MP-3 player to start with.  More on converting content later.
  3. Configure the Plex server through the web interface, http://host:32400/manage/index.html, where host is the hostname or IP address of the Plex Server.
    1. Look for the “Library” configuration item and add a library.
    2. Assign the folder with content to the library.  Plex likes to have is particular about how files are named and where they go.  Every movie that does not follow the naming convention seems to get labeled as Madagascar 3 (at least for me).
    3. See that the content appears in the web browser.
  4. Run the Plex client on a phone/tablet.  See that content is present.
  5. Install MakeMKV using the online instructions for MakeMKV.
  6. Install Handbrake using the online instructions for Handbrake. (Basically, use the Handbrake PPA.)

How to Load DVD Content

Plex can play back content, but does not load it from external media.  We have about 100 DVDs when you count all the “complete collections” of X Files, Monty Python, Firefly, etc.

This method seems to work manually, and needs to be automated to make loading all those DVDs easier.  Also, consider running handbrake on a different computer than Plex Media Server to improve performance (not bogging down the server, and a machine with a
GPU and/or more cores might go faster).  Ideally, a batch queuing system could schedule transcoding jobs as processors come available.

I am not sure if transcoding is worthwhile at this point.  At the highest quality preset, I still see a lot of compression artifacts playing back SD DVDs on an HD monitor.  The highest quality H.264 video is about half the size of the original, and takes over 5 hours to transcode.

Here is my basic manual procedure

0. Make sure the directory exists somewhere and Plex Media Server points to it,
assuming you are processing a movie.  For TV shows, do the same, but put them in the TV directory instead of the Movie directory.  I don’t know where exercise videos go. They are probably more like TV than Movies.

  1. Insert DVD into Plex Server
  2. Make a directory for the content called “Movie Title (Year)“, where Movie Title is the title of the movie and Year is the year in which it is released.  If unsure look for the movie on imdb.com.  That is what Plex will look for to find artwork for the movie.
  3. Load the DVD into Movie Title (Year) with makemkvcon mkv disc:0 all "Movie Title (Year)".
  4. Transcode files in Movie Title (Year) withHandBrakeCLI -Z "Super HQ 1080p30 Surround" -O -i title00.mkv -o Movies/"Movie Title (Year)".mp4
    There might be more than one “title”, especially for TV shows. In that case, repeat running Handbrake for each title.

    The above preset is for high quality, but is very slow.

I still have not worked out the best way to store the DVD “extras” (interviews, clips, cut scenes, etc.) The Plex documentation gives a naming convention for all the extra content, but MakeMKV just dumps the content into files called title00.mkv, title01.mkv, etc. That is, no title or description is readily apparent for each .mkv file.

Resources

Plex Documentation on Loading
Content

MakeMKV Documentation

Handbrake Documentation

Next ToDos

  • Watch movies and make sure quality is OK, usability is OK, etc.
  • Buy Plex Pass (assuming Laura likes it)
  • Are exercise videos more like TV Shows or Movies?
  • Automate DVD ripping. One script to run MakeMKV, assign a sensible name,
    and transcode into the movies directory. Use nice.
  • Figure out CD ripping (manual)
  • Automate CD ripping

Maybe Later

  • Batch queuing for transcoding (cross servers)
  • Containerize ripping/transcoding and/or Plex Media Server for better
    CPU limiting (anything like HTB qdisc available?)
  • Insert disk and server automatically determines kind (CD, DVD Movie, DVD
    TV), rips, transcodes, and deposits the result in the right library.
  • Photos
  • SMB share for media (to allow easier uploading of content)
  • OpenID authentication for friends

Leave a comment