Turn your Raspberry Pi into a working video player by setting up home theatre PC software
Building a video player with a Raspberry Pi is easy and useful. You can hook up your Raspberry Pi to a television and play internet video files, or streams.
Building a media centre, or HTPC (home theatre PC) is one of the most rewarding projects a newcomer can complete.
It’s easy to turn a Raspberry Pi into an HTPC, and you can quickly hook it up to your television.
Using an HTPC, you can play video and music files, and stream video and audio from online services. And unlike proprietary systems, such as Apple TV and Google Chromecast, you can use it to play just about any media format.
You can add streaming services to your HTPC, such as BBC iPlayer and Soma radio stations. These enable you to play media directly from the internet.
There are several pieces of software available for setting up an HTPC. Two options you’ll find on the Raspberry Pi Foundation’s Downloads page are OSMC and LibreELEC. Both are similar and run a media player called Kodi.
In this guide, we’re going to opt for OSMC. It’s a free and open-source media centre built on top of Debian, and is reliable and easy to use.
Setting up OSMC on a Raspberry Pi is a straightforward and rewarding project. Let’s get started.
First, install the OSMC image to an SD card. Download the OSMC disk image for Raspberry Pi Zero or Raspberry Pi 2/3. Flash the image to an SD card using Etcher (etcher.io).
Insert the SD card into your Raspberry Pi. Connect a keyboard and use an HDMI cable to connect a display. Power up and go through the Welcome section. It’s a good idea to keep SSH enabled (the default option).
To test video playback, we’ve downloaded a copyright-free video file of a movie called Return of the Kung Fu Dragon. Download the Ogg Video version and then transfer the file to a USB flash drive.
Connect the flash drive to the Raspberry Pi. In the OSMC interface, select Videos > Files and the flash drive. Here you’ll see the Ogg video file you copied across. Select it, and the video will start playing.
Select Videos > Video Add-ons > Get More. Scroll down the services to find Nasa and select Install. Press ESC to get back to the main screen and select Videos > Nasa. Choose Livestreams and NASA TV to watch the station. For keyboard controls, visit the Kodi wiki.
Open the app store on your phone and search for Official Kodi Remote (Kore on Android). Open the app, and click Add Host then Find Kodi. It should find the Raspberry Pi on your network. Click Save. Now use the app as a remote control.