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]( 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  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.


Plex Documentation on Loading

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

Fixed nameserver breakage on Linux desktop machine

The network configuration on the home desktop/server is unusual. It had previously been configured to share DNS records with another zone. Moreover, the wireless network is statically configured, because it only ever needs to connect to the home Wireless AP, and I want it to connect on boot, so that other hosts can connect in. Network Manager does not want to connect until someone logs in.

The `/etc/resolv.conf` was not being updated with the Wireless AP as the dns server to handle forwarding. The normal instructions assume you are not running a local DNS server (which is typical). To fix DNS, I had to add a `forwarders` entry in `/etc/bind/named.conf.options`. Not rocket science, but I will probably forget by the next time it needs to be configured.

Configuring a Gateway M-6750 for NDIS Wrapper on Ubuntu 12.10

The hard drive my wife’s laptop died recently, so I took that as an opportunity to switch it from Windows Vista to Linux, specifically Ubuntu 12.10.  The only problem I ran into after doing a default install was that the wireless chipset is not supported out of the box. The Ubuntu documentation for setting up wireless with (and without) ndiswrapper is generally pretty good, but I needed a few bits of extra info to make wifi work.

The main problem is that the Gateway M-6750 uses a Marvell 88W8362E wifi b/g/n chipset and comes with Windows Vista installed.  There is no open source driver, so I had to use ndiswrapper.  I went to Gateway’s web site to look for a Windows driver when I got to the step to download the Windows driver (see “Installing Windows driver“). Gateway posts a Windows Vista driver for the wireless chip, but no Windows XP drivers. Unfortunately, ndsiwrapper cannot yet load Vista drivers. It only loads Windows XP drivers.

After a number of web searches, I found a reference suggesting that the Windows XP Gateway M-153 driver uses a similar chipset to the M-67 chipset.  The M-153 driver is the one I eventually got working.

The trick not included in the Ubuntu community install docs is how to get the driver files out of the downloaded zip file. As described in a forum question, I had to do the following:

$ mkdir Marvell   # Make a directory to hold unzipped driver files
$ cd Marvell
$ unzip ../
$ wine Setup.exe

I did this on another Ubuntu machine with wine already installed, but if should work on the M-6750, assuming all the right packages are installed — see the forum thread for details.  Running Setup.exe in wine will pop up an install wizard for the driver.  Go as far as possible through the install process.  It will not succeed, but it will put the files that you need for ndiswrapper in ${HOME}/.wine/drive_c/Program Files/Marvell/TopDog Driver.

The two necessary driver files are NetMW14x.inf and netmw145.sys. Copy those files to the M-6750 (if you are not already working there). From there, I continued with the install Ubuntu community instructions.

When trying to install the driver with modprobe, modprobe returned an error saying that the ndiswrapper module could not be found (even though the ndiswrapper package was installed). An post indicated that the problem was the 1.57 version of ndiswrapper shipped with Ubuntu 12.10. Compiling and installing 1.58rc1 from source fixed the problem.  Hopefully, ndiswrapper 1.58 will be released soon and Unbuntu 12.10 will be updated soon.

With ndiswrapper 1.58rc1, the remaining instructions worked to get the driver installed.  A March 2010 blog post by Joe Wein describes other problems setting up a Gateway M-6750, but I did not experience them, most likely because of updated drivers and a better install process in Ubuntu 12.10.