Pidiylab Logo

Pidiylab Title

Jellyfin on Raspberry Pi 5: Hardware Decode & Network Shares Setup

Published:

Updated:

Author:

Jellyfin on raspberry pi 5

Disclaimer

As an affiliate, we may earn a commission from qualifying purchases. We get commissions for purchases made through links on this website from Amazon and other third parties.

Introduction

Why Set Up Jellyfin on a Raspberry Pi 5?
All right, you’ve got this little beast called the Raspberry Pi 5 sitting on your desk, and you’re wondering if it can handle something more than blinking LEDs. You want a media server—cheap, self-hosted, private, and not Plex with its “Please pay for features that used to be free” energy. That’s where Jellyfin steps in.

Jellyfin is free. Not “freemium.” Not “free but missing all the stuff you need.” No subscriptions. No data harvesting. It runs your media library, handles your video playback, and even transcodes like a champ—if you treat it right.

But here’s the rub: out of the box, the Raspberry Pi 5 doesn’t make hardware video decoding easy. You’ve got to mess with V4L2, know what your codecs are doing, and probably mount SMB or NFS shares to get at your movie hoard. That’s what this guide is for—getting Jellyfin working with hardware decoding and network shares so you’re not streaming “buffering” as your main feature film.

You’ll learn:

  • How to install Jellyfin without breaking the system
  • Where the hardware decode magic happens (and where it doesn’t)
  • How to connect your media from a NAS or another machine using network mounts
  • And how to keep things from frying or crashing

It’s Raspberry Pi and Linux—so yes, some config files will be edited, and a few errors might pop up. But the end result? A powerful little streaming box that doesn’t ask you to log in every time you want to watch a movie.

Key Takeaways

  • The Raspberry Pi 5 is finally powerful enough to run Jellyfin reliably.
  • Hardware decoding using V4L2 M2M is essential for efficient playback, especially with H.265 content.
  • Use network shares like SMB or NFS to expand your storage without overloading the SD card.
  • Prioritize Direct Play for smoother performance and less strain on your Pi.
  • Mount your shares properly with fstab, and secure your system with SSH keys and firewall rules.
  • Organize your media with the right folder structure and naming conventions to avoid metadata issues.
  • Tools like htop, journalctl, and vcgencmd help troubleshoot common performance problems.
  • You don’t need a subscription or a server rack to build a competent media center. Just some config files, patience, and decent cooling.

Raspberry Pi 5 as a Media Server

What Makes the Raspberry Pi 5 Worth Using?
Let’s not sugarcoat it—previous Pi models weren’t exactly known for their media server muscle. The Raspberry Pi 5, though, brings some grown-up specs. It’s got a Broadcom BCM2712 chip with a quad-core ARM Cortex-A76 CPU that actually feels like it wants to work for a living. Add in VideoCore VII graphics and up to 8GB of LPDDR4X RAM, and suddenly we’re not talking about hobbyist tinkering. We’re talking about a viable headless media box.

It’s also got:

  • USB 3.0 ports for fast external storage
  • A PCIe 2.0 lane, in case you want to get wild with NVMe
  • Gigabit Ethernet that doesn’t choke on 4K streams
  • A tiny form factor that doesn’t scream “I’m a server!” to your roommates

So yes, it can run Jellyfin. But it also means you need to treat it like a real machine—cooling, power, and performance included.

Power & Cooling Requirements

Now, don’t get cocky and think you can slap this in a drawer without consequences. The Raspberry Pi 5 gets hot. Not “warm to the touch.” We’re talking “thermal throttle before you can say transcoding.” You’ll want at least:

  • A heatsink and fan combo
  • Preferably an active cooling case
  • A USB-C power supply with at least 5V/5A output

If you’ve got one of those cheap micro-USB cables from a Kindle in 2014—don’t. You’ll get random reboots, corrupted filesystems, and more frustration than a Windows 98 boot disk.

Check your temps regularly using:

vcgencmd measure_temp

If it’s above 70°C during idle or low usage? Yeah, you’ve got a problem. Consider upgrading your cooling or underclocking the CPU if needed.

Power Supply Notes

The Pi 5 draws more current than any Pi before it. You need a good USB-C PD source, preferably the official Raspberry Pi PSU. Don’t even think about powering a USB hard drive off a splitter cable. It’ll brown out faster than your Wi-Fi in a thunderstorm.

Installing Jellyfin

Which Operating System Should You Use?
You’ve got options, but not all of them are great. If you’re new to Linux or just want something that works without a three-hour detour into forums, stick with either:

  • Raspberry Pi OS 64-bit (formerly Raspbian)
  • Ubuntu Server 22.04 LTS (ARM64 build)
  • Or if you’re a masochist for minimalism: DietPi

The 64-bit part matters. Jellyfin uses FFmpeg, and that little chunk of software gets touchy about memory. Some transcode pipelines won’t even work unless you’re on a 64-bit system. So, if you’re still rocking 32-bit because someone on Reddit said it “feels lighter,” stop it.

How to Install Jellyfin on Raspberry Pi 5

Now the fun begins. SSH into your Pi or just open a terminal. Start by updating the packages:

sudo apt update && sudo apt upgrade -y

Then add the Jellyfin repo:

wget -O - https://repo.jellyfin.org/jellyfin_team.gpg.key | sudo gpg --dearmor -o /usr/share/keyrings/jellyfin.gpg
echo "deb [signed-by=/usr/share/keyrings/jellyfin.gpg] https://repo.jellyfin.org/debian bookworm main" | sudo tee /etc/apt/sources.list.d/jellyfin.list

Then install:

sudo apt update
sudo apt install jellyfin -y

Enable the service so it boots with your Pi:

sudo systemctl enable jellyfin
sudo systemctl start jellyfin

You’ll access Jellyfin on your browser at:

http://<your-raspberry-pi-ip>:8096

Initial Web UI Setup

The first time you access the Jellyfin Web UI, it’ll ask you to:

  • Set an admin user
  • Point to your media directories
  • Choose metadata sources
  • Set language and library types

This is where network shares (which we’ll cover later) come into play. If you’ve got nothing mounted yet, just skip library setup for now and come back.

Enabling Hardware Video Decode

Why Does Hardware Decoding Matter?
If you’ve ever tried to stream a 1080p or 4K file and watched your Pi wheeze like an asthmatic squirrel, that’s because it’s trying to decode video with the CPU. Not ideal. Hardware video decoding offloads that work to the GPU, freeing up CPU cycles and making sure your movie doesn’t turn into a slideshow.

The Raspberry Pi 5 uses V4L2 M2M (Memory-to-Memory) to enable GPU-based decoding. It’s not as plug-and-play as Intel’s Quick Sync or NVIDIA’s NVENC, but it works—if you know where to kick it.


Check for Kernel Support

First, make sure your system supports hardware decoding:

ls /dev/video*

You should see something like /dev/video10, /dev/video11, etc. If not, either you’re not on a 64-bit kernel, or your Pi is doing its best impersonation of a paperweight.

Check the loaded drivers:

dmesg | grep v4l2

Or:

v4l2-ctl --list-formats

This tells you what codecs are supported. On Pi 5, expect hardware decoding for:

  • H.265 / HEVC
  • VP8 / VP9
  • (And to some extent) MPEG2, H.264 (but limited, more on that below)

Editing the Jellyfin FFmpeg Config

You’ll need to make Jellyfin play nice with V4L2. In the Web UI:

  • Go to DashboardPlayback
  • Enable hardware acceleration
  • Choose Video Acceleration API: V4L2
  • Leave decoding thread count at 0 for auto

Also, make sure your ffmpeg build supports V4L2. Test it:

ffmpeg -hwaccels

Should return:

v4l2m2m

If not, update your Jellyfin and system packages—or build FFmpeg from source, which is a whole thing.


What About H.264?

Here’s the letdown: the Raspberry Pi 5 dropped dedicated H.264 decode hardware. So while it can kind of handle it in software, don’t expect miracles. For best results:

  • Use HEVC (H.265) for all your media
  • Avoid transcoding H.264 files unless you like buffering
  • Enable direct play on all clients when possible

Test Your Setup

Try this command to see hardware decoding in action:

ffmpeg -hwaccel v4l2m2m -i big-buck-bunny.mp4 -f null -

If your CPU usage stays low, and it doesn’t throw errors, congrats—you’re using your GPU the way nature intended.Mounting Network Shares for Media Access

Why Use Network Shares?
Let’s be honest—SD cards aren’t going to cut it when your library has 3,000 episodes of anime you’ll never finish. You want your media stored on something beefier: a NAS, another PC, or even an external drive shared over the network.

That’s where network shares come in. You’ll be mounting them using either SMB (Samba) or NFS, depending on what your host system supports. The end goal: Jellyfin sees your media folders like they’re local.


Mounting SMB (Samba) Shares

If your media is sitting on a Windows machine or a NAS using SMB, here’s how to get that hooked up.

Install required packages:

sudo apt install cifs-utils -y

Then create a credentials file:

sudo nano /etc/smb-credentials

Add:

username=yourusername
password=yourpassword

Secure it:

sudo chmod 600 /etc/smb-credentials

Now create a mount point:

sudo mkdir -p /mnt/media

Then edit your fstab:

sudo nano /etc/fstab

Add this line:

//192.168.1.50/Media /mnt/media cifs credentials=/etc/smb-credentials,iocharset=utf8,uid=1000,gid=1000,vers=3.0,nofail 0 0

Replace the IP and share name as needed. Reboot or mount manually:

sudo mount -a

If you get a “mount error(13): Permission denied,” check the share’s access rules and confirm your user actually has read permissions.


Mounting NFS Shares

NFS is often faster than SMB, especially on Linux-to-Linux setups.

Install NFS support:

sudo apt install nfs-common -y

Then edit /etc/fstab like this:

192.168.1.10:/volume1/Media /mnt/media nfs defaults,nofail 0 0

Create the mount point:

sudo mkdir -p /mnt/media
sudo mount -a

Check it with:

df -h

If it shows up and doesn’t error out, you’re golden.


File Permissions Gotchas

Jellyfin runs as its own user (usually jellyfin), so if your mounted drive says “Permission denied” when trying to scan files, it’s probably because of user access. Either:

  • Mount it using your main user and make sure media has chmod 755 or chmod 775
  • Add the jellyfin user to your group: sudo usermod -aG yourgroup jellyfin

Or just give read access to all (chmod -R a+r /mnt/media) if you don’t care about user boundaries.

Optimizing Playback Performance

Should You Transcode or Direct Play?
Let me guess—your Jellyfin streams stutter or sound like a broken kazoo. Nine times out of ten, the Pi is choking on transcoding. That’s when it takes a video file and tries to convert it on the fly to match the client’s preferences. It’s useful, but brutal on system resources.

The better approach? Let Jellyfin direct play files. That means no conversion. No transcoding. Just send the media as-is to the device—like handing someone a burger instead of cooking it from scratch.


Tips for Better Direct Play:

  • Stick to formats most clients love: MP4 (H.264 video, AAC audio) or MKV (H.265, AAC or AC3)
  • Match subtitle formats to the device (SRT works everywhere)
  • Avoid TrueHD and DTS-HD unless you’re sending to something fancy like a home theater setup
  • Make sure file bitrates don’t exceed your network’s capabilities (looking at you, Wi-Fi)

How to Avoid Transcoding Traps

Go to Jellyfin’s dashboard and navigate to Playback > Transcoding:

  • Limit transcoding to H.265 only, if you’ve got decent hardware decoding
  • Set bitrate limits that make sense for your network (e.g., 10 Mbps for Wi-Fi)
  • Turn off “burn in subtitles” unless you really need them—forces transcoding
  • Choose “prefer embedded subs” so Jellyfin doesn’t reprocess the entire video

Match Formats to Client Devices

Some devices, like Fire Stick and Chromecast, can decode most formats on their own. Others, like old smart TVs, choke on anything not ending in .mp4. Test each device’s playback using the Media Info in Jellyfin. If it says “Direct Play,” you’re doing it right.


Subtitle Settings That Don’t Ruin Streams

Subtitle rendering forces transcoding unless:

  • You use external SRT files
  • You disable forced subtitles unless absolutely necessary
  • You match the subtitle encoding (UTF-8 is safest)

Burned-in subs are Jellyfin’s way of saying, “Hope your Pi likes working overtime.”


Audio Compatibility

The Pi won’t transcode DTS to stereo unless FFmpeg is built with libfdk_aac. And guess what? Most repo versions aren’t. Your options:

  • Use AAC audio in your files
  • Enable audio passthrough if your client supports decoding
  • Or pre-convert audio using ffmpeg

Troubleshooting & Monitoring

Why Is Jellyfin Acting Weird?
If your video looks like it came from a potato camera or your Pi sounds like it’s dying, don’t panic. The Pi is sturdy, but it’s also picky. Most of the time, problems come down to bad mounts, wrong codecs, or thermal throttling.

Let’s break it down.


Use These Tools to Keep Tabs on Performance

  • htop — shows CPU usage in real time
  • iotop — tracks disk I/O, tells you if Jellyfin is constantly scanning
  • journalctl -u jellyfin — reads Jellyfin logs
  • dmesg — kernel messages (USB, hardware errors)
  • vcgencmd measure_temp — check your CPU temp
  • free -h and df -h — monitor memory and disk usage

If CPU is pegged at 100% while streaming, you’re transcoding. If memory’s gone and the disk is thrashing, Jellyfin is probably trying to scan too many files too fast.


Common Issues and How to Fix Them

1. Network Shares Not Mounting at Boot
Use the nofail and x-systemd.automount options in /etc/fstab:

//192.168.1.50/Media /mnt/media cifs credentials=/etc/smb-credentials,iocharset=utf8,uid=1000,gid=1000,vers=3.0,nofail,x-systemd.automount 0 0

2. “Playback Error” in Jellyfin UI
Check:

  • Codec mismatch
  • Subtitle type
  • Permissions on mounted share
  • Log file at /var/log/jellyfin/jellyfin.log

3. Library Not Updating
Jellyfin can’t see the files. Make sure:

  • Mount is live
  • jellyfin user can read the folder
  • The media directory is scanned (use the “Scan Library” button manually to confirm)

4. Device Disconnects or Stalls Mid-Stream
Could be:

  • Weak Wi-Fi (use Ethernet if you can)
  • High bitrate file overwhelming the network
  • Pi overheating and throttling

Tips to Keep Things Running Smooth

  • Reboot your Pi occasionally
  • Back up your Jellyfin config folder (/var/lib/jellyfin/)
  • Don’t scan huge libraries all at once
  • Schedule cron jobs at night
  • Check the logs once a week—catch errors early

Secure and Remote Access

Why Secure Your Setup?
Look, I get it—“it’s just my movie server.” But the minute you expose a port to the internet, you’re basically handing out flyers that say, “Hack me, I’m lazy.” Securing your Raspberry Pi 5 and Jellyfin setup is non-negotiable if you ever plan on streaming away from home.


Use SSH Like an Adult

Step one: disable password logins for SSH. If you haven’t already, set up SSH key authentication:

ssh-keygen -t ed25519
ssh-copy-id user@your-pi-ip

Then edit /etc/ssh/sshd_config:

PasswordAuthentication no
PermitRootLogin no

Restart the SSH service:

sudo systemctl restart ssh

Now only your key works. No more weak passwords or brute force drama.


Remote Access with ZeroTier or Tailscale

You’ve got two painless options to securely access Jellyfin without exposing ports:

  1. ZeroTier – Creates a virtual LAN
  2. Tailscale – Based on WireGuard, private networking made dead simple

Install Tailscale:

curl -fsSL https://tailscale.com/install.sh | sh
sudo tailscale up

Boom. You can now access your Pi from anywhere as if it’s on your home network.


Firewall Basics

Use UFW to block unwanted connections:

sudo apt install ufw
sudo ufw allow 22/tcp
sudo ufw allow 8096/tcp
sudo ufw enable

If you’re using HTTPS (with a reverse proxy), open port 443:

sudo ufw allow 443/tcp

Reverse Proxy and HTTPS (Optional)

Want SSL with your Jellyfin URL? Set up a reverse proxy with NGINX or Caddy. With Let’s Encrypt, you can even get free HTTPS.

Just remember: reverse proxies require a domain name and proper config. If that sounds like homework, Tailscale is your friend.


Change the Default Jellyfin Port (Optional)

Security through obscurity isn’t real security—but changing the port might keep noisy bots out:

Edit:

sudo nano /etc/jellyfin/system.xml

Find and change the <Port> value.

Media Library Management

Organizing Your Library So It Doesn’t Break Things
Jellyfin loves order. If your files are named like “my_dumb_movie_FINAL3.mkv” or thrown in a single folder, you’re gonna have a bad time. Proper structure avoids metadata confusion, wrong cover art, and that awkward moment when Jellyfin thinks Shrek 2 is a documentary.


Best Folder Structure

Set it up like this:

/mnt/media/
├── Movies/
│   └── The Matrix (1999)/The Matrix (1999).mkv
├── TV Shows/
│   └── Breaking Bad/Season 01/Breaking Bad - S01E01.mkv
├── Music/
│   └── Artist/Album/Track.mp3

You want each movie in its own folder, TV episodes with season folders, and music by artist and album.


Naming Rules That Actually Work

Jellyfin matches names to metadata providers (like TMDB or TVDB). Stick to these formats:

  • Movies: Movie Title (Year).mkv
  • TV: Show Name - S01E01.mkv or Show Name - 1x01.mkv
  • Avoid colons, slashes, or weird symbols

If you’re dealing with anime or non-standard stuff, use .nfo files to manually define metadata.


Manually Adding Metadata (When Auto-Scraping Fails)

Some content will never scrape right. Home videos? Obscure indie releases? Yeah, you’re on your own.

Use .nfo files. For movies:

<movie>
  <title>My Homemade Masterpiece</title>
  <year>2023</year>
</movie>

Put that next to the video file. Jellyfin will use it during scans.

You can also drop in:

  • poster.jpg for cover art
  • fanart.jpg for the background
  • theme.mp3 for the menu audio (if you’re fancy)

Keeping It Clean

  • Run library scans manually if your NAS isn’t always connected
  • Avoid scanning on boot if the Pi is underpowered
  • Use excluded folders to keep system files or unfinished downloads out of your media list
  • Disable real-time monitoring if you notice slowdowns

Back Up Your Jellyfin Setup

Let’s not pretend you’ll remember every tweak. Back up the configs:

sudo tar -cvzf jellyfin-backup.tar.gz /var/lib/jellyfin /etc/jellyfin

Store it on a separate drive, or push to your NAS.

To restore:

sudo systemctl stop jellyfin
tar -xvzf jellyfin-backup.tar.gz -C /
sudo systemctl start jellyfin

Final Thoughts

Why You Should Actually Be Proud of This Setup
You’ve built something useful—a self-hosted media server that doesn’t beg for logins, doesn’t spy on your viewing habits, and runs on a Raspberry Pi 5, which is basically a pocket-sized computer with a god complex.

Here’s what you’ve done:

  • Installed Jellyfin on a modern single-board computer
  • Enabled hardware decoding using V4L2 for smoother playback
  • Mounted SMB/NFS shares so your media is accessible
  • Configured transcoding and direct play for performance
  • Secured the whole thing with SSH keys, optional VPN access, and firewall rules
  • Optimized metadata and file structure so your library looks good and works fast
  • Monitored and debugged issues using command-line tools like a seasoned Linux gremlin

This isn’t just a tinker project. It’s a practical, everyday tool that saves you from bad UI decisions, paid subscription models, and media companies who think your data is their business model.

Keep it updated. Keep your media tidy. And once in a while, brag a little—because you just turned a $60 board into something smarter than half the streaming boxes on the market

FAQ

Q: Does Jellyfin support 4K playback on Raspberry Pi 5?
Yes, but only with HEVC (H.265) content and hardware decoding properly configured. Avoid transcoding 4K unless you enjoy buffering.

Q: Can I use a USB drive instead of a network share?
Absolutely. Just make sure it’s formatted correctly (ext4 or exFAT), mounted at boot, and has proper permissions.

Q: Why is my stream buffering even with hardware decoding?
Could be a bad Wi-Fi signal, high bitrate file, or client device not supporting the format. Test with Ethernet and Direct Play first.

Q: What’s the easiest way to access my Jellyfin server remotely?
Use Tailscale. It avoids open ports and gives you LAN-like access from anywhere without messing with your router.

Q: Can I run other services on the Pi alongside Jellyfin?
Yes, but be mindful of RAM and CPU usage. Lightweight services like Pi-hole or Samba are fine. Don’t turn it into a Docker zoo.

Q: Is there a difference between NFS and SMB for streaming?
Yes. NFS is generally faster and better on Linux, while SMB is more compatible with Windows-based shares.

References

  • “Hardware Acceleration | Jellyfin” — official documentation on Jellyfin’s acceleration support Jellyfin
  • “Jellyfin is designed to directly read media from the filesystem” — storage guidance in Jellyfin docs Jellyfin
  • Forum post: “The RPi 5 removes the H.264 hardware encoder and decoder” — real‑world constraint discussion Jellyfin Forum
  • “Raspberry Pi for hosting – Jellyfin Forum” — community experience with Pi limitations Jellyfin Forum

Was this helpful?

Yes
No
Thanks for your feedback!

About the author

Latest Posts

Pi DIY Lab