Kodi Streaming Box on a Raspberry Pi
This is a guide to setting up a Raspberry Pi as a TV streaming box using the Kodi media center. I've compiled instructions from a few different sources, and I'm putting it in one place to help keep track of everything; guard against the linked sites going down; and share what I know with others in one convenient place.
This discussion pairs nicely with Jellyfin running on a home server, as I discuss here.
Guide (Some Natalie's Blog)
- Kodi setup on a Raspberry Pi 4
- Includes how to start Kodi on startup
Setting up Pi
- Install OS; use
sudo raspi-config
to do the following:- Username and password
- Localization settings
- Console auto-login (what you want in order to automagically start Kodi on boot)
- Network setup, if needed
- Enable SSH (optional)
- Update everything:
sudo apt update
sudo apt dist-upgrade
sudo reboot
Installing Kodi
- Install Kodi and desktop manager
sudo apt install kodi lightdm
- "Now have it automatically launch at boot using systemd. Use
sudo
to create a file at/lib/systemd/system/kodi.service
with the following contents:"
[Unit]
Description = Kodi Media Center
After = remote-fs.target network-online.target
Wants = network-online.target
[Service]
User = pi
Group = pi
Type = simple
ExecStart = /usr/bin/kodi-standalone
Restart = on-abort
RestartSec = 5
[Install]
WantedBy = multi-user.target
- "Note you will need to edit the
user
andgroup
to match the username you created. Enable the service to start Kodi automatically at boot:"
sudo systemctl enable kodi.service
- "Then reboot and configure Kodi as you’d like. Here’s the official quick start guide to get going."
Adding Streaming Extensions to Kodi | Hulu (etc.)
- N.B., you can use the “SlyGuy” repo below for other streaming services such as Disney+, Max, etc. — the only ones I haven't been able to get there so far are Netflix (see below) and Apple TV+
- Enable unknown sources
- Settings > System > Add-ons, turn on Unknown Sources option
- Add source
- Settings > File Manager
- Click on Add Source > Click on None
- Type “http://k.slyguy.xyz/“
- Hit Done
- Hulu addon
- Go to the main menu and select “Addons.”
- Click on the “Package Installer” icon (usually looks like an open box) at the top left corner.
- Choose “Install from zip file.”
- Select Sly Guy.
- Now click on slyguy.zip
- Wait for the notification stating, “Sly Guy Repo has been installed.“
- Head back to the home screen and go to
- Now click on Install from Repository > SlyGuy Repository (slyguy.uk) > Video Addons
- Choose Hulu > Install > OK
- Now, click on Hulu > Login
Adding Streaming Extensions to Kodi | Netflix
- Install CastagnaIT repo, Netflix plugin
- Create an authentication key to log in
- Python virtual environment
Subtitles in Kodi
- N.B., I don't have this set up yet — just notes for my records
- First, visit Opensubtitles.org and create an account.
- On Kodi’s main menu, click Add-ons, then Download, then Subtitles
- Install OpenSubtitles.org, then click it again and hit Configure
- Enter your Opensubtitles login details, then click OK
- Return to Kodi’s main menu and click the gear icon
- Select Player. On the left side of the screen, move your cursor over Language, then move over to the right, scroll down, and select Default TV show service
- By default, there are no subtitle addons listed. Click Get more… to see more options
- Select the subtitle addon you want to install. OpenSubtitles.org is the one we recommend for most people, but you should try out multiple addons until you find the one that is best for you. Whichever one you choose will now be set to search for subtitles anytime you are watching a TV show
- Scroll down the Language submenu again and select Default movie service
- Select the same subtitle addon for movies or click Get more… to choose a different one
- Start playing your movie or TV show and click the subtitles icon in the lower-right corner
- Select Download subtitle… (if the Enable subtitle button can be checked, it means that this particular film already has subtitles available. However, it’s still a good idea to install a subtitle addon because this won’t always be the case)
- After searching for a few seconds, you’ll see a list of subtitle sets. Sets with five stars are the most highly rated. Select the subtitle set you want to use
YouTube
- Not yet working!
- Best information seems to be here: https://github.com/anxdpanic/plugin.video.youtube/wiki/Personal-API-Keys