Tuesday, August 27, 2013

Peppermint Linux with Plex Media Server



These instructions are for using Peppermint Linux as a dedicated media server running Plex.  Plex is 100% free media server software for Linux, Windows and iOS.  Use a spare PC or pick up a used one. These instructions worked for me, but might not be perfect for everyone. It is assumed you have general PC hardware and Linux experience.

Hardware for 480p:

480p or less - According to Plex:

A Ubuntu, debian, Fedora, CentOS or SuSE PC with an Intel Core 2 Duo processor 1.6 GHz or better with 512MB of RAM.

You can get Plex to run great on Peppermint with lower hardware requirements. I have tested Plex on Peppermint extensively and they both marry up very well to lower the requirements.

480p or less - According to My Tests

I have ran Plex successfully with 480p videos (Not 720p or 1080p). Remove sound card and any other devices or cards not used for hard drives. You don't need a high-end video card, just one to configure Peppermint and Plex. Remove the DVD/CD Player, install Peppermint via USB pin drive – This will free up an IDE device, so you can use another hard drive for movies. Another option is to remove the DVD/CD Player after you have install Peppermint.

P4 3.06ghz (Socket 478) – 2.8ghz worked well too.
2GB of RAM
2 – HD's 20gb to 40gb each, 7200rpms.
NIC (Ethernet 100mbs or faster)

Media Storage Only Drives
Large IDE hard drives or USB 2.0 External Hard drives or both.

NOTE: If you plan on using this configuration, it is best use 2 hard drives dedicated for the OS. This is NOT REQUIRED, but just gives a little extra performance. One hardware is partitioned for Peppermint OS – root and home or however you like your drive partitioned. The other hard drive is used for a swap file. You can use 2 – 40GB or smaller, these HD's don't need to be large, but they need to be 7200rpms or faster. Your swap file should be 1024 or 2048. Your second hard drive might have wasted space, but don't use the extra space for movie storage. If you have a smaller drive, like a 20GB or 10GB that is 7200rpm, use it for the swap drive. OPTIONAL - You can create another 2GB partition on the swap drive for the Plex's temp trans-coding file folder, this will be used by Plex for trans-coding, but I haven't really tested this for performance. Might be worth it to test.

Hardware for 480p/720p/1080p:

According to Plex:
A Ubuntu, debian, Fedora, CentOS or SuSE PC with an Intel Core 2 Duo processor 2.4 GHz or better.
Again, using Peppermint and Plex, you can lower the hardware requirements for HD movies.

720p or higher - According to My Tests

I have ran Plex successfully with 720p movies using the same idea as the 480p system. Remove sound card and any other devices or cards not used for hard drives. You don't need a high-end video card, just one to configure Peppermint and Plex with.

Dual Core 2.8ghz (Socket 775) or higher
2GB of RAM
1 SATA Drive or IDE for Peppermint.
NIC (Ethernet 100mbs or faster)

Note: 3.4ghz dual cores are cheap, under $10 sometimes on Amazon or eBay - cheap to get a little more horsepower.
Media Storage Only Drives
Large SATA, IDE hard drives or USB 2.0 External Hard drives or both.

NOTE: There are several dual core systems that have IDE and SATA capabilities. Use IDE or SATA or both together. If you have a system that has both, it is fine to leave the DVD/CDsud Player in, since you have plenty of ways to hook up more hard drives.

Peppermint Linux Installation:

Install Peppermint by booting to the CD or a USB Drive.  I am not going to get into the installation of Peppermint, other than when you go through the the installation; you are asked what username you want to use, use 'plex' as the username and set it to automatically login.  Using plex as the username, will avoid dealing with permission issues later when setting Plex up with your movie/TV shows/music/etc. directories.  - Of course, this is optional.
Let Peppermint Linux get all the updates and everything it needs.  Once Peppermint is done, it is time to prepare it for Plex.

Prepare for installation of Plex:
  1. Open a terminal window
  2. sudo nano /etc/apt/sources.list
  3. deb http://plex.r.worldssl.net/PlexMediaServer/ubuntu-repo lucid main
  4. ctrl+x (To save)
  5. cd ~/
  6. wget http://plexapp.com/plex_pub_key.pub
  7. sudo apt-key add plex_pub_key.pub
  8. rm plex_pub_key.pub
Install Plex:
  1. sudo apt-get update
  2. sudo apt-get install plexmediaserver
  3. Answer Y when it asked you to continue.
    Installation will start.
Open Plex

Click Menu button - > Sound & Video -> Plex Media Manager
Plex will open in Chrome or your default browser. Chrome and    Firefox are supported browsers with Plex.

Plex Starts in browser and you will see Plex license agreement.

Click Agree - You will see Get Started Please Wait a moment while plex starts...” - Could take several minutes...  Note: If it takes over 15 minutes, reboot... I had it hang a few times. 

Welcome to the Plex Media Server.  This is wizard.  It will walk you through setup, which is easy, click Start Button.  If you don't want to do this, you can completely skip through the wizard and setup your media server however you want.

Wizard has icons and helps you setup these:
TV Shows
Home Movies

Channels (Channels are internet channels you can setup.  I never have set them up, but I have seen others set them up.  Kind of like a build in Roku.)

After you are done with the wizard, you will be taken to main screen. Here you can go into video or music file directories, see what people in your house has been watch resently (On Deck) and a few other things.  This will be the screen you first see when opening Plex Media Manager.

Under my library you can see all your video/music directories you setup.  I.E. If I click Movies, you will get the Movies screen, where you can scan for newly added movie files you just added, change META data, etc...  
NOTE: If you find you need to delete a movie, delete it with your file manager or command line.  Then have Plex scan your movie directory, it will remove it from your list.  The refresh icon located on the top right, to the left of More button. Also, if you add a movie, use file manager or command line, let Plex scan and find the movie.   

In the directory of movies, I just throw the files in it.  Plex figures it out, fetches all movie metadata, you don't have to do anything; this could take several minutes.  

With TV Shows, I am actually using a directory structure.  I.E. I will use Dexter from Showtime as an example.  Root Directory is Dexter, sub-directories are Season 1, Season 2, Season 3, etc...  each season 1 contains all video files of season 1.  Plex will figure this out and display it on your Roku or other devices organized accordingly.  

Configure / Tweak Plex is easy.  In upper right, click on the wrench/screwdriver link.  This will open the configuration/settings.  This where you can setup trans-coding, DLNA, and other settings. 

With the older Pentium 4, playing 480p, it is good to set the transcoder default throttle to 180 or higher, you might need to play with that setting.  The transcoder temp directory is where Plex will write the transcoded file during the buffer period and during play time.  I just started using it, I haven't tested it for performance.  This is the directory you could setup on a parition on your swap drive for the older Pentium 4. 

If you find the temp directory works better, let me know.

Once Plex is done scanning, finding metadata, use a device to access your videos or music.  

Roku works wonderful - Find Plex client in the channel store
On Roku, it will look exactly like you have your own Netflix, listing all your movies, shows, etc... 

Plex also has an Android app for $4.99 or download a free DLNA app for Android and watch your movies that way on your phone or tablet. 

If your player device is DLNA compliant, it will see Plex Media Server as longer as you haven't turned off the service on your Plex Media Manager settings.  

Plex also supports iOS and several other devices.

Plex and Peppermint Linux have great support.  

You can find more help in Plex forums or search through their documentation at http://www.plexapp.com/ 

Peppermint Linux website can be found here: http://peppermintos.com/

Like Peppermint Linux and Plex on Facebook and follow on them Twitter.  They are doing excellent work and need your support to keep this wonderful lightweight distro and media server going.