After having flipped through several Linux and Raspberry Pi magazines, it became apparent to me that there is no shortage of things to do with a Pi. While certain projects approach what some might consider gimmicky (a portable briefcase retro gaming kit), others have recognizable utility that will only become more apparent with time, like a home theater PC (HTPC) or an ownCloud server. And since I have been learning Linux operating systems and Python, a project involving this credit card sized computer is almost a natural consequence. What to do? Why? Most importantly, how? I’ll cover these points:
- What: HTPC
- Why: My Roku doesn’t play nice with Plex and Emby
- How: Kodi’s Linux distro, OSMC
- Future Additions
I want to stream movies, T.V., and music on my family room television. I have a NAS4Free server which stores all my bulky media files, but I need something that can receive the media and translate it to my T.V. screen. I gave the Raspberry Pi a shot and installed a free operating system called OSMC. The specialized media operating system looks great and was a cinch to setup.
The NOOBS bootloader that came with the Raspberry Pi kit I purchased made this part simple. Otherwise, you’ll need to use a software like Win32 Disk Imager to create bootable media on your SD card.
- Put in the SD card, the USB WiFi receiver or Ethernet cable, the HDMI cable, a keyboard, and finally, the mini-USB power supply.
- Turn on your T.V., switch input to HDMI.
- Select the OSMC distribution from the NOOBS bootloader screen (the one designated for the Pi 2)
- Go to System –> file manager –> add location OR browse network locations. For instance, I created a NFS share on my NAS4Free server, so I manually entered the location as: “nfs://192.168.1.xxx/path/to/your/media”. Viola, all my files are accessible anywhere in my network from my Pi.
- You don’t want to be standing in front of your T.V. with a keyboard picking out movies, so grab your T.V.’s remote and use the directional buttons for a rudimentary interface. Also, you can install the “Kore” app on your phone which will allow it to function as a remote that works seamlessly with the OSMC media center over your home’s WiFi. You’ll just need to add a few network details like IP address and port number.
The Raspberry Pi 2 does an excellent job of playing media over your network out of the box. Some guides will nudge you towards purchasing a license for some video and audio codecs, but so far in my experience it hasn’t been absolutely necessary (depending on your media formats). The codec licenses themselves only cost a few dollars, though. With the latest version of OSMC, the Raspberry Pi 2 boots quickly and loads large libraries of media on the local network even faster. Video files play smoothly while the Pi stays cool – it also has the potential to be overclocked through OSMC system settings. I’m impressed, and excited to try out other things with my new gadget.
As it stands, the Pi needs to be unplugged and plugged back in to initiate the boot process. I can power down the Pi with a remote, but not the other way around. I’ve read that some use a USB connection between their T.V. and Pi such that a signal is sent to the Pi when their T.V. powers on. Others have manually rigged a power/reset switch into the GPIO area of the Pi, which is certainly more work.
Some media files don’t sound so great. I have a feeling this could be due to the quality of the files themselves, my T.V.’s speakers, or the lack of proprietary audio codecs. Or a combination of these things – I’ll need to do further testing to find out.
Some movie metadata is not being retrieved. I may have interrupted a scan of the library/directory, or the filename formatting isn’t consistent. This is a common issue, so I wrote a Python script to take care of this. Later on I discovered there is already a command line tool called Filebot that does this and much much more.
I would like to see how OSMC works with DLNA/UPnP protocols – apparently Kodi is not picky about this part (hooray). NFS share was the easiest solution and is what I am using currently. The Raspberry Pi 2 did an acceptable job of running the software, although at times the UI would lag behind when scrolling large lists – a problem I have not yet encountered since experimenting with RasPlex.
Other than that. . . An automated playlist/DJ system that learns what I like and plays movies, T.V. shows or music based on my current mood? Well, maybe later.