Tag: Playstation Media Server
Network Media Player/Server How To
by BaerConsultLLC on Jan.13, 2010, under How To's, Server Configuration
Ok, so let’s start with the requirements.
First, you’ll need a physical machine or anything running Windows, Mac, or Ubuntu. It can even be a virtual machine! For all intensive purposes, we’ll go with Ubuntu since it’s free and downloadable. Second, you’ll need a Network Interface Card (NIC) for that machine. I recommend going with Intel Gigabit Pro GT/1000 cards. They’re a bit more expensive, but it’s all we use here at BaerConsulting and we’ve yet to have one fail on us. Even if you don’t run a gigabit network, I still recommend Intel Gigabit cards. Third, you’ll need something to play these media files on. At home, I have a D-Link DSM-520, a Buffalo Media Player, an XBox 360, and a Playstation 3. Out of these media players, a Playstation 3 seems to produce the best quality and is most compatible with codec types. Codecs are something that transcodes, recodes, or encodes a media file using it’s respective format, be it MP3, MP4, WMV, AVI, etc. Lastly, you’ll need some sort of network set up with the network media player and the server on that network. This will not work over the internet.
If you haven’t already started downloading Ubuntu, head on over to Ubuntu’s Home Page to download a copy. There are a variety of types and variety of ways to download Ubuntu. If you have a machine that’s a Core 2 Duo, Quad Core, Pentium Dual Core, or anything else that’s been made in the last 3-4 years, it’s probably a 64-bit processor, thus you’ll probably want to go with 64-bit Ubuntu Desktop. There are a lot of debates going on about the true advantage of 64-bit over 32-bit, but that’s a blog for a different day. If you have an older machine, such as a Pentium 4 or an Athlon XP, you’ll want to get the 32-bit version. Why Desktop you ask? Well it’s simple. First, I assume that you’re probably not proficient in Linux, and while some might argue that the best way to learn it is to jump in to server (no GUI, just command prompt), I figure I’ll be kind and give you something familiar. Next you get to search for ways to download this file. HTTP is the norm, but if you’re in to Torrenting and have a client, I suggest using that. It’s less strenuous on the Ubuntu servers and mirrors, plus, you’ll probably get the file faster.
Now you need a program to burn the ISO file. My personal favourite is MagicISO, but Roxio or Nero work just the same. Burn that file to a CD. If you got desktop, you’ll notice it’s a Live CD. This means that you can literally run the operating system off of the disc without it ever erasing files or touching the hard drive at all. It is the strong recommendation of BaerConsulting that you use a spare hard drive or one that contains no data that is valuable. If you don’t know what you’re doing, it’s probably best you don’t do it. Now, with that out of the way, and you being sure that you have a hard drive that you don’t mind wiping, let’s install Ubuntu.
Pop in the CD to your computer and boot it up. Select ‘Try Ubuntu without ant change to your computer’. Once it is booted up, you should be greeted with some peculiar sounds and a Desktop. Double click on ‘Install Ubuntu 9.10′. Select the appropriate language and click Forward. Select your appropriate Time Zone and click Forward. Select the appropriate keyboard layout and click Forward. On this screen you’ll see something similar to that of setting up Windows. This is where you partition your drive. For most users, using the default layout and simply clicking Forward will work best. WARNING: ONCE YOU CLICK FORWARD, ALL DATA ON YOUR DRIVE WILL BE LOST.. Pick you username, username again, type in your password, confirm it, and choose the name of this computer (otherwise known as hostname). Anything that autofills is probably safe. Once you’re sure about your settings, click Forward, then click Install. This can take up to 60 minutes depending on your system, so be patient. When it’s completely installed, go ahead and Restart Now. Take the disc out and close the tray, hit Enter as instructed by the splash screen.
When it boots back up, go ahead and log in based on the credentials you entered during the installation. Click on Applications>Accessories>Terminal. Type “sudo apt-get update”, hit enter, enter your password, hit enter. From here on, please assume that “hit enter” comes after every command. Once that’s completed, type “sudo apt-get upgrade”. When it prompts you, select yes. While it’s downloading updates, go back to Applications>Accessories and right click on Terminal. Click Add To Panel… This will put a shortcut icon on the top bar of your screen. This will give you quicker access to the terminal. It is the definitive administration tool under Linux. While the command is downloading and installing updates, go to System>Preferences>Remote Desktop. Click the “Allow other users to view your desktop” checkbox. Select the checkbox that says “Require the user to enter this password:” and enter a password. This will allow VNC remote access to this machine. This is where the hostname comes in handy, which you should see in the form of “username”@”hostname” in the terminal window at the beginning of the command prompt. Download Real, Tight, or Ultra VNC Viewer. That is quite simple, open it, enter the hostname, and click connect. If you’ve done everything right, you should be prompted for a password. Enter the password and you should now be seeing the Desktop of the Ubuntu machine. You can now put this machine in a remote location, provided the VNC connection worked, and remove the monitor, keyboard, mouse, etc. Just a network cable, a power cable, and of course, the machine itself.
After the update of Ubuntu, you should reboot and run those two commands again, just in case. We’re not dealing with Windows, so you’ll usually get all updates in one shot. Open up the terminal again. Enter “sudo apt-get install ssh”. This will install and SSH server so you can use an application like PUTTY for Windows to use the command line. If you’re proficient in command line, this will be very familiar to you.
Let’s open up terminal again, if it’s not already open. Type “sudo apt-get install mencoder ffmpeg mplayer vlc sun-java6-jre”. Note the spaces in between each application or package, as they’re referred to in Linux. Accept the license terms.
Go to PS3MediaServer.blogspot.com and download the newest Playstation Media Server. Choose to save to the Desktop. Right click and choose to extract here. There should be a new folder on the Desktop. Open up the terminal again and type “cd /home/[username]/Desktop/pm[tab]“. The tab key should autocomplete the folder as necessary. You should now be in the same folder as the files you just downloaded. Type “chmod +x PM[tab]“. Unlike Windows command line, Linux’s command line is case sensitive, so PM is not interpreted the same as pm. Then type “chmod +x linux/ts[tab]“. This makes the necessary files executable, just like a shortcut icon on the desktop of Windows.
With your mouse, go in to the folder that you just extracted to your Desktop. Double click on the PMS.sh file. If prompted, choose run in terminal. This should open up a new window. This is the main configuration console of the Playstation Media Server. This is where you can select the folders to be shared across the network. To add files to this server, you’ll need to set up Samba, which is a blog for another day. By default, the server shares all files and folders, which can be risky, but if you’re network is secure, it should be fine. Now that you have SSH set up, you could use Samba, or you could use WinSCP. For now, Google and download WinSCP. You’ll log in with the same username, password, and hostname that you entered during your initial setup of Ubuntu. Once logged in, you can see the layout of your local machine and the remote machine. Seeing as how Linux/Ubuntu is very secure operating system based mostly on permissions, you’ll want to put the files under /home/[username] on the Ubuntu machine. That will make them available to your media player. Also a note about permission; you’ll notice I used “sudo” quite a bit in the commands above. This stands for “superuserdo”. The superuser is the ultimate in permissions. It allows you to modify the system wherever you need to. Do NOT provide your password or any credentials to that machine to anyone you do not trust.
Why Playstation Media Server you ask? Because it plays mostly anything you like. As you can already guess, it is mostly compatible with the Playstation 3, but I have yet to meet anything that it will play on the Playstation 3 that you cannot play on the XBox 360 for example.
You now have a fully functional media server that can be detected by media players. You can also use this media server as anything else Ubuntu based that you like, such as a network grapher, network monitor, or a NAS. Again, you’ll probably want some extra storage on this machine. We’ll eventually post some instructions on setting up a NAS at a later time, but this should get you streaming your media files in the meantime.