Many home PC systems have quite a bit of media content. The media may be videos, pictures or audio. Most people would like to have easy access to the media content on the PC without having to be at the PC.
Imagine watching TV and then thinking, “Hey, I could watch that video on the PC, but I would like to watch it here on the TV.” Instead of a video, you may want to listen to a new audio file you recently found, or look at some pictures you recently copied from you camera or phone to your PC. What now?
Well, if you have a Smart TV or a Roku device, you could install Plex Media Server on your Linux system and stream the content to your TV or Roku device. Other devices which can stream from the Plex Media Server are:
- Amazon Fire TV
- Apple TV
- Chromecast devices
- LG NetCast devices
- Opera TV
- PlayStation 3+
- Roku devices
- Samsung Smart TV and Bluray Players
- Sonos devices
- Vizio Smart TV
- Windows 8+ (includes PC and Phone)
- Xbox 360 (Xbox One and up)
These devices can connect to the Plex Media Sever as they are or may require an added app to allow for connection and streaming ability.
NOTE: At some point, you need to create a Plex account for free. Remember the username and password you use since this will be necessary to use later.
Now, let’s get Plex installed on your Linux system. Go to https://www.plex.tv/downloads/#plex-app and select your platform in the bottom box (Computer – Linux). Then choose the “Download” button after the listing of the current Linux Plex version (currently Version 184.108.40.20657-24ffd60, September 12, 2016) which should be updated occasionally. Once the button is selected, another box will appear, as in Figure 01, to select your Linux version. Make the proper selection and then you will be prompted to Save the file or install it. Save the file if you can and place it in a folder you can access in a bit. Once the file has downloaded, then go to the folder and double-click it to start the installation.
Once Plex is installed, you need to change the permissions used by Plex. To do this, open the file /etc/default/plexmediaserver in a text editor with root permissions (sudo nano /etc/default/plexmediaserver). Find the line “PLEX_MEDIA_SERVER=plex” and change the user “plex” to your username. At this point, reboot the PC to allow the permissions to be reset. If you have already started the Plex Media Manager, when you restart, you will have to restart the initial setup as follows after this paragraph.
After all settings are made and the system is rebooted, you can open a newly installed application called “Plex Media Manager” which opens a browser window to http://localhost:32400/web/index.html as shown in Figure 02.
The EULA is listed and you must accept it by clicking on the “AGREE” button at the bottom. Once selected, the screen will disappear and Figure 03 will be shown.
The screen shows a diagram of how Plex works. Click on “GOT IT!” to continue.
Figure 04 shows information about Plex Pass. Plex Pass gives more ability to your Plex Media Server such as storing your media on the Cloud for access from anywhere.
The next item in the setup is the Server Setup. Figure 05 shows how the screen looks. The Server name can be set here as well as a check box to allow your media to be accessed from outside your local network. Once done, scroll down and click “NEXT”.
The next option to setup the Plex Media Server, Figure 06, is to specify the location of the specific media: Movies, Music, TV Shows and Photos. Set each media type individually and specify the location of the files to be added to the Library. Once done, click “Next”.
If the folders are not being added, then the issue is with permissions. Towards the beginning of this article, you should have changed the option for “ PLEX_MEDIA_SERVER” to your user name. Changing the value should allow the file location to work properly, if not, make sure you have permissions to the folders and files you are adding. Another issue with the adding of files to the Library depend on file names being used. After the installation instructions, a list of naming conventions will be listed for Plex. Also, I will cover a quick way to rename files properly.
The next screen, Figure 07, shows you that you can download Plex apps. Select the check box as to whether you want to allow usage data to be sent to Plex.
The Plex Media Server should now be functional.
I connected my Roku 2 device to a TV in the house and downloaded the Plex app for it by doing a search for Plex. Once on Roku, I opened the Plex channel. At the top of the screen is an option to sign into your Plex account. Do this and a screen should appear telling you to go to https://plex.tv/link. A 4-digit code is given to enter into the website. Go to the link and log into your account. You will be asked for the 4-digit code, which when entered will link Roku to your account. Now you should be able to open the Plex Media Server’s Library from Roku and stream the content you have shared. If the video has issues there could be two main problems causing them. The first is that the WiFi does not have enough bandwidth to stream properly. Another is the stream setting on the Plex Media Server. Open Plex Media Manager and select “Settings”. Along the top right side are four choices: Web, Server, Users and Devices. Select Web from the list. On the left side are the choices for General, Debug and Player. Select Player from the list. Under Remote Quality, set it to what is needed. Be aware that the higher quality you set, the more bandwidth is needed. It is possible to set it to Original to allow the full image quality to be streamed.
Now we can get into the Plex Media Server naming conventions for adding files to the Library.
The Movies should be in the format: “movie name (year).ext”. For example, the movie ‘Avatar’ would be “Avatar (2009).mkv” if the file format were MKV. Folders can be nested with a movie in a folder of the same name, no extension though. The folder can contain subtitle files so subtitles can be enabled on your streaming device.
For TV Shows, the format is “show name – sXXeYY.ext”. The XX specifies the season number and YY is for the episode number. A single folder can be used to hold all episodes for a season. If a show is more than one episode, the format would be “show name – sXXeYY-eYY.ext”.
Music content can be organized more by folders. A folder can be named as “Artist – Album Name”. The audio files can be named “Track## – Song Title.ext” and placed into the appropriate folder.
To make file naming easier, there is a program called FileBot which can be found at www.filebot.net. FileBot requires Java version 8. To verify the your Java version, enter the following command in a terminal: “java -version”.
If your current Java version is not 1.8 or higher, then install Java version 8 by performing the following from a terminal:
- sudo add-apt-repository ppa:webupd8team/java
- sudo apt-get update
- sudo apt-get install oracle-java8-installer
To verify the installation, enter the following command in the terminal: “java -version”. The result should be:
java version “1.8.0_101”
Java(TM) SE Runtime Environment (build 1.8.0_101-b13)
Java HotSpot(TM) Client VM (build 25.101-b13, mixed mode)
To use the FileBot program can make a whole separate article, but this should get you started. For now, have fun streaming your media to your devices!
- USB Device RAID 0
- Banshee: Screaming Media