Plex space usage

One item to consider when setting up a Plex server for the first time is space allocation.  Plex servers can use up a lot of disk space and not necessarily where you expect, so it’s better to be educated than blind sided.

The vast majority of space you can expect to use on your server is going to be for movie storage.  The location where you store your movies is completely up to you and is configurable when you first set up your libraries.  In my case, I created a path called /home/media on the server which contains directories for movies, tv shows, music, etc.  Each of those directories results in its own Library.

The less expected space is under your /var partition, which can be a problem if you allocated a small amount of space for / or /var and put the majority of your disk space under /home.  (As an aside, consider using LVM or ZFS for your disks in order to be able to reallocate space on the fly.  I’ll have to write up more about this in the future).

The space in /var will be found in /var/lib/plexmediaserver/Library/Plex Media Server on Ubuntu.  I suspect other Linux distributions will be the same, although there could be some variance if you’re using something like FreeNAS or installing Plex via a container.

This space contains a lot of really useful things, for example your installed plugins, logs, the metadata for your server, and transcoded media files.  The last one is where the bulk of your space will go to.  On my server this space in /var takes about 20GB (compared to 2TB in /home/media).  Plex does however support preemptively optimizing video files for playback.  This feature is useful on slower hardware that may not be able to transcode on the fly, but the resulting media files will also be stored in /var.

Plex Media Formats

What are media formats?

By media format, I mean a few different things which tie together in order to contain your movie and the rest of its support media.

Container Format

The container is essentially the file format.  Containers can hold multiple video, audio, picture or subtitle tracks in a single file.  For example your container may contain multiple video tracks for a movie (one per chapter), English audio, Spanish audio, Dolby 5.1 audio in various languages as well as subtitles or closed captioning.

The most common container formats I’ve used with Plex are MPEG-4 Part 14 (better known as MP4) and Matroska Multimedia Container, also known as MKV.  You may also see AVI, MPEG-2, Ogg or Flash.  You can find quite a few container formats on Wikipedia.

Video Codec

Within the container file you’ll file one or more video streams encoded in one or more video codecs.  Your container can contain a number of different video streams in different codecs, and video streams of a given codec may be contained in different container formats as needed.

Some common video codecs are the H.26X codecs from the Motion Pictures Experts Group (MPEG).  These include H.262, H.263, H.264 and H.265 among others.  The MPEG group puts out very good video codec standards, but tends to require licensing fees for devices which use them.

Google has published their own set of video codecs including VP6, VP7,VP8 and VP9.  Or really, the codecs were created and published as proprietary codecs by a company called On2 which has since been purchased and opened by Google.

Theora is another open video codec which was initially based upon the VP3 codec from On2.  It was created by the Foundation, the creators of the Ogg container format.

Audio Codec

Your container files will also contain one or more audio tracks.  These could be multiple sequential audio files, or they could be the audio for the same section of video available in multiple languages.

These could be lossless codecs like ALAC and FLAC, or a lossy codec like MP3AAC, or Vorbis.

What is right for you?

At the end of the day what is right for you depends on a number of things including available disk space, available bandwidth, hardware playback support and server processing power.

Disk Space

Lossless compression formats will provide you with the best quality, but at the expense of size.  If you’re willing to discard some of the information in the video stream in order to decrease the amount of actual data stored, then you will be able to fit more movies in the same amount of space.

Available Bandwidth

Larger files also take more bandwidth to transfer.  If you’re attempting to serve the files over a low bandwidth connection, then heavier compression may work better for you.  Note that this typically will mean your local LAN bandwidth rather than your internet connection, unless you’re serving video to people outside of your home.

Hardware Playback Support

Video decompression can take a lot of CPU cycles to perform.  This is not a big problem for modern desktop hardware, but it could be an issue for embedded devices like phones, tablets or set top boxes like the Roku/TiVo/etc.

One of the way hardware manufacturers help make their devices more usable for video streaming is to include specialized decoding hardware in order to offload the decompression from the CPU itself.  This hardware will only have support for specific container or codecs, so you may find it useful to create your video files in a manner that your hardware specifically supports.

Server Processing Power

In order to improve support for various clients, Plex servers also support transcoding.  Transcoding is the process of decoding the video streams on the fly, and then re-encoding them in a format that the client can more easily play.  This provides you with better client compatibility but at the expense of CPU processing time on the server side.

Depending on your server hardware, you may find that transcoding is sufficient to support your needs.  If your hardware is low end however, like some of the available Network Attached Storage (NAS) hardware with built in plex servers, then you may not be able to keep up with the clients.  Also, if you share your plex server with friends, then multiple video streams transcoding at once may be too much for even beefier hardware.

What I usually do

My hardware is a bit beefier and modern, so I tend to stick with the default recommended settings for Handbrake.  I direct stream to my clients when possible, and allow the server to transcode as needed.  So far it has worked for me.

Set Top Box Features

Over the years, I’ve used a number of different set top boxes for viewing media.  So far I’ve yet to find the perfect option.  Mainly because in addition to our home Plex server, we also use a number of additional online streaming services for watching shows, and the support of those services varies quite a bit from device to device.

Some of the functionality I care about is a Plex client (obviously), Netflix, Amazon video streaming, Hulu and the ability to cast video from my computer in some manner (Google Cast or Airplay).  The ability to watch live or pre-recorded TV is also a plus.

Device Plex Netflix Amazon Hulu Google Cast Airplay Live TV DVR
TiVo Yes Yes Yes Yes No No Yes Yes
Roku  Yes Yes  Yes Yes No No No  No
Chromecast  Yes (1)  Yes (1)  No Yes (1) Yes No  No  No
Android TV Yes  Yes  No (2)  Yes  Yes No (3)  Yes (4)  No
Roku  Yes  Yes  Yes  Yes  No  No  No  No
Amazon Fire TV/Stick  Yes  Yes  Yes  Yes  No (3)  No (3)  No  No
  1. Indirectly supported through Google Cast.
  2. Supported on a small subset of Android TV devices, like Sony TVs with Android TV built in.
  3. Possibly supported unofficially through third party apps.
  4. Supported via independent HD Homerun device if available.

One item worth noting about the DVR functionality of these platforms.  There is current a beta version of the Plex server software which implements a DVR using network enabled TV Tuners like the HD Homerun.  Once it makes its way into the stable releases, some amount of DVR functionality will be available on all Plex client platforms.

My Movie Collection Odessey

Since I was a kid, I’ve always been a bit of a gaming and media junkie, often spending time on the computer, video game systems or watching movies.

In my adulthood I slowly started to accumulate a movie collection.  The bigger it got, the more of a pain it was to select and choose a movie that I wanted to watch.  Solutions were attempted and eventually discarded.  DVD cases in a rack made way for DVD books with just the discs in them.  That went away when I got my first 200 DVD changer.

The DVD changer was an interesting solution since it supported up to 200 movies (less than I had at the time) and could automatically scan the DVD to determine what they were.  Unfortunately this functionality worked by checking the disc to see the embedded name.  Some DVDs came up with name embedded.  Others were named, but the names were difficult or even impossible to decipher.

To deal with missing names, you were able to plug in a keyboard to the changer and manually enter names into it.  This had a few flaws:

  • You needed to know the name of the movie before you could add it, which doesn’t make bulk adding of discs easy.
  • Discs with embedded names did not allow you to override them.  So you may have ugly names like LORD_OF_THE_RINGS or you could have less obvious names like LOTRROFTK.
  • You’re not supposed to move the DVD player with discs in it.

The last problem resulted in the changer being discarded after we moved.  I just couldn’t go through the effort to re-enter in all the disc information a second time.  It lingered a few months with discs just being added as needed, but for the most part it was just using up space.

From there I started looking into ripping DVDs (converting them to MPEG4 files) in order to play them on computers.  I had one of the early iPods with a small color screen.  If I copied a movie to it via my computer, I could watch on a tiny screen.  My goal was to hook some sort of computer up to the TV in order to be able to play them.  This was before I had an HDTV, so the quality of the image when a computer was attached was… poor.

Next came the Apple TV in 2007, which allowed me to effectively stream the movie from my Mac using iTunes.  We were making progress, but weren’t there yet.  Next came the Logitech Revue, which was one of the first Google TV devices.  There were apps for the Google TV which allowed simplistic streaming from a home server using UPnP/DLNA.  It worked reasonably well, but the UI consisted of just folders and files, must like a file browser.

Finally I discovered Plex.  Plex is a free home media server which may be installed on Linux, Mac or Windows.  It does automatic discovery of your media files and uses online databases to determine what the movie likely is.  From there, it is able to populate a local database of all the movie titles, genres, actors, posters and more.  You can browse and view your collection within a web browser on a computer, play the movies on any compatible UPnP/DLNA client (with the normal DLNA style browser), or get access to full metadata and more by using a dedicated Plex client.  Plex clients are available for your home computer, Android, iPhone, Roku, TiVo, Playstation, Xbox, and more are coming all the time.  Your Plex server can also be accessed remotely over the Internet and you can choose to share one or more of your libraries with other Plex users if you desire.

While the program itself is free, there is a pay service called Plex Pass.  Having a Plex Pass gives you access to new features earlier than free users, and gives you access to some advanced features.  These advanced features include the ability to sync movies onto your mobile devices and access to new clients before they’re generally available, which is useful when you get the latest gaming console.

New features are available all the time, including one currently Beta only feature allowing for DVR functionality if you have a network enabled TV tuner.

These days I have 600 movies on my Plex server, episodes of 35 TV shows, and quite a lot of music (yeah, it does music too).  It’s definitely worth checking out if you want to have access to your movie library remotely.