Turn a Raspberry Pi Into a Media Center With Kodi
A Raspberry Pi 4 or 5 drives a TV comfortably, decoding H.264, HEVC, and even 4K HDR content through hardware acceleration. Kodi gives you a ten-foot interface for movies, TV shows, music, and streaming add-ons, all controllable from a couch.
What you need
- Raspberry Pi 4 (2 GB+) or Pi 5
- MicroSD card 16 GB+, or a USB 3 SSD for faster library browsing
- Power supply rated for your Pi model
- HDMI cable matching your TV input (micro-HDMI on Pi 4)
- A second computer running Raspberry Pi Imager
- Media files on a USB drive or a NAS share
Step by step
- Install LibreELEC using Raspberry Pi Imager: choose "Other general-purpose OS", then LibreELEC, then your Pi model. LibreELEC is a minimal OS that exists only to run Kodi, so boot times are fast.
- Flash it to your microSD card or USB drive and insert it into the Pi.
- Connect HDMI, Ethernet or preconfigured Wi-Fi, and power. On first boot Kodi walks you through language selection.
- Enable file sharing access: go to Settings, then Services, then SMB, and enable the SMB client if your media lives on a NAS or Windows share.
- Add your media source: from the home screen choose Files, then Add source, then Browse, and pick your USB drive or network share path.
- Point Kodi at your library: set the content type of each source to Movies or TV Shows so Kodi scrapes metadata, artwork, and episode ordering automatically.
- Install a remote app on your phone such as Kore (Android) or Official Kodi Remote (iOS); enable "Allow remote control" under Settings, then Services, then Control.
- Tune playback settings under Player and Videos: enable "Adjust display refresh rate" to match source framerate and eliminate judder on film content.
- Test a few files, including one high-bitrate 1080p or 4K clip, to confirm smooth hardware decoding.
Common mistakes
- Using the wrong HDMI port: only specific ports support 4K60 on some boards; check your model's docs.
- Storing media on a slow microSD card, causing stuttering on large Blu-ray remuxes.
- Installing heavy desktop distros and running Kodi inside them instead of using LibreELEC, wasting RAM and adding lag.
- Forgetting to enable CEC on the TV if you want your existing remote to control Kodi.
Related guides
Your media files need a home: serve them from [[raspberry-pi-network-storage]] on the same or a second Pi. If you want fewer ads in streaming apps' free tiers elsewhere on your network, pair the media center with [[pi-hole-network-ad-blocking]]. The initial flashing process is identical to [[raspberry-pi-headless-setup]].