Introduction to a Raspberry Pi Media Server
Kodi is a very adaptable and powerful media server software package. With it you can stream Live TV from multiple sources, connect it to your current TV/Cable provider to allow cohesive control of all your media devices, stream and download TV and Movies, Play Music, Display Photos, Browse the internet and even install apps that create a computer out of your TV. You can read more about KODI here on the official KODI website. A Raspberry Pi Media Server is a great way to get Kodi going in your home!
What is not covered in this tutorial
Raspberry Pi has many versions and older versions require optimization. That is not covered in this tutorial. For this tutorial we are using later versions of the Raspberry Pi, a high speed SD card and expedited versions of installing the system.
Other installation methods, such as NOOBS, other flavors of Linux are not covered. The tutorial by itself will not cover issues that arise from third party WiFi adapters or installing your Raspberry Pi into a case. Each Adapter, Case and Accessory is different and it would be impossible to cover it all.
With that being said, if you have a issue, then please leave a comment and i will do my best to answer.
Before we get started with the tutorial there are some basic items you will need to complete this tutorial.
- Raspberry Pi - The model is not important, but later models are faster and the performance will be much better.
- SD Card - Either Full or Micro SD depending on the model of Raspberry Pi you have.
- Micro USB Power Cable - 2.4 Amp is the most suited, less and you will have issued with connected USB devices such as Hard Drives and Remotes.
- Keyboard - For initial setup of the various software
- HDMI Cable - To connect to a monitor or TV
- Ethernet Cable/WiFi Adapter - To establish a network connection with the Raspberry Pi.
Extra Items for later or to make your Raspberry Pi more awesome,
- USB Remote Control - To control your Raspberry Pi like a Media Hub destined for TV. You could alternatively use the Official KODI remote for iOS here.
- External Storage - Networked or USB, to store all the media goodness
- Case - To keep your Raspberry Pi nice a tidy and safe from inquisitive kids and animals from pulling it apart like a toy.
You will need to download software for this tutorial, which will include KODI and some form of Linux to power the system. Links will be provided through out the tutorial.
Some helpful notes on Raspberry Pi Models and SD Cards
The Raspberry Pi has many versions and later versions provide very stable performance with little to know requirement for optimization. Earlier models will require optimization to ensure stable usage.
SD Cards, Not all are created equal and i suggest getting a fast reliable brand of SD Card such as a SanDisk with a high class such as 6 or higher, 10 being better. But basically something that has a high speed from a good brand such as Samsung, SanDisk or Kingston. Cheaper and sometimes pre-bundled SD Cards can be of lower quality and the SD Card along with the Raspberry Pi is the biggest performance element of the entire setup.
Lets get started!
Firstly you should connect everything up. Plugging in the SD Card, HDMI Cable, Network Cable if you are using that method and the power cable.
The first main step is installing a operating system to power Kodi. There are many to choose from.
OpenELEC, LibreELEC and XBian plus a few other projects. They all use Kodi which was also formally known as XMBC (just in case you come across that term around the web) as the front end system, but the back end is powered by one of the above in most cases.
Being honest, the choice above matters very little, most of the above are stripped down to run a media center. They are the bare bones and minimal components to power systems such as Kodi, allowing for the best performance.
With that being said, there are some small benefits to each, which entirely depends on what you want to do with the system later.
LibreELEC and OpenELEC are very similar, only major difference is that the LibreELEC development at current is more rapid and stable. This is due to the larger team of developers and active community contributing to its growth. Both of these systems are basically stripped down Linux distributions that are the "core" basics to run Kodi. Everything else not required to run Kodi is removed, making it the fastest and most lightweight of the systems to install.
XBian is a more fully featured lightweight Linux distribution, which offers more features that Linux comes with, if you should ever want to expand upon the system later beyond the Media Center/Entertainment Center.
Other systems, such as Raspbian which is a full Linux system designed for Raspberry Pi boards is much heavier and more suited to less performance usage projects like Media Centers and more for programming, mini computer usage. Lots of fun can be had with the Raspberry Pi and the thousands of projects on the web will demonstrate as such.
Install the OS (LibreELEC)
If you have a SD Card with LibreELEC and Kodi preinstalled, or any other combination then skip this step until "Booting LibreELEC and Starting Kodi" which follows this section of the tutorial.
For the purpose of this tutorial and reasons stated above, i will be using LibreELEC for the base system installation. Its generally regarded as the fastest and also has a few options to install.
The most recommended way, as described also by the LibreELEC team is to use the USB/SD App Creator to make a dedicated Kodi install. Its very quick and super easy to use.
You can find the App here for Windows, Mac and Linux.
Installation Step by Step:
- Download the App from the link above.
- Pop in the SD card to your computer of choice
- Run the App (Windows users may need to run this with Admin rights, because Windows)
- Select the version that corresponds to your Raspberry Pi
- Click on "Download" and then it will ask for a place to download the image file too.
- Select the SD card and then press on "Write" and then "Yes" on the popup confirmation to begin.
- Once that has been done, safely remove the SD Card using the method described by your system.
- Insert the SD Card into your Raspberry Pi and power it up.
Booting LibreELEC and Starting Kodi
Once you have started the Raspberry Pi, you should be confronted with the LibreELEC Setup Wizard. Select "Next" and then you can choose to rename your Raspberry Pi host name, which is basically the name the rest of the network will see your Raspberry Pi as. This will make it easy to identify later on the network should you need to administer your network.
Following that screen, you will be asked to connect to a network. Select your network and input all the relevant details. This will differ slightly if you use Ethernet or WiFi. If you have Ethernet it will be possible to select next and continue with the setup. WiFi will require input of password on the selected WiFi network.
Final questions will be regarding various options such as remote access and sharing, select options based on your preference and click on "next". The options Remote Access and Sharing is not needed for usage of Kodi to function properly, its more for advanced users who wish to use more functions of the system. These options can be altered later in the system anyway, so you do not need to freak out about the choice now.
If you wish to alter these settings later, you can do so by selecting the LibreELEC Configuration add on.
Once that is done, your ready to start Kodi.
Setting up Kodi and Configuring your system
Now that you have Kodi up and running, there is 101 things and 101 more you can do with it. While i will not cover everything. I will explain the basics:
- Adding Media Sources
- Downloading and Adding Codecs (To play other media file formats)
- Addons (to enhance Kodi)
There are many other possibilities with Kodi, including Live TV, Games, Music and a host of features that really turn Kodi into a beast. Other tutorials to follow upon request.
Raspberry Pi foundation has some hard coded codecs that require a license to play MPEG-2 and VC1 video files. Without it, those files wont play.
In all honesty the MPEG-2 codec is all most people will need. the cost is also very cheap.
You can find the link to buy the codec here, once you have done that you can follow the steps below to install and activate them.
- Buy the Codecs
- Wait for the Licence Keys
- Head over to the official LibreELEC website to follow their guide on installing them.
- Restart your Raspberry Pi
Adding Media Files
There are many ways to add media files such as Movies, TV Shows and Music. NAS (Network Attached Storage), USB External Disk Drives, USB Sticks and a few other ways.
The process for adding is essentially the same for most, Kodi requires to know where the location "is", what is on it and what to do with it.
The steps are as follows:
- Select "videos" tab in the home screen and then select “Files”.
- It will open a new screen and then you press on “Add Videos” then “Browse” in the section called "add video source".
- Find the folder where your media files are located. Network attached storage will require a small but simple setup using relevant network protocols like SMB shares. USB Attached drives will show up on local.
- You will be given a option to rename, you can change the name if you wish and then press OK.
- The next step is important, Media Types. Kodi will "scrape" (browse the internet or services to pull data) to match your files with posters, images, plots, episode titles and actors etc. You will be given the option to choose between TV Shows, Movies and Music.
- If you are prompted with a change content confirmation, then select yes.
Now you should be able to see the content added on the previous screen. Under the relevant section such as TV Shows, Movies or Music.
If you add new files to that location, you will need to refresh the system to reflect the new files. This also can be setup to check every time the system restarts or at intervals.
If you want Kodi to check for new files when your system starts up then go to Settings > Library settings > Databases and check “Update library on startup”. You can hide the update notification also by checking the option to hide it, if you do not wish to see the updates confirming at the top of your TV.
You should have a functioning system. Of course this is not the end of your Kodi journey and there are many upgrades, changes you can make and optimizations.
Please follow one of the tutorials listed below for information on specific items related to Kodi.
If you have issues, please leave comments below and i will answer them as best as i can.
Kodi - Home of Kodi Media System
Raspberry Pi - Raspberry Pi Foundations Website
LibreELEC - LibreELEC website, containing info and downloads