< All posts

March 18, 2020, 9:41 p.m.

Jellyfin Media Server on Raspberry Pi 3B+

I always stream downloaded youtube/niconico/bilibili videos with Samba/NFS with VLC and MiniDLNA, but this is getting old. I want to try something new, like a Media Server. I have tried Plex Media server some time ago but I did not manage to make it work with my Raspberry Pi. Now, I just searched for a free software alternative to Plex and initially I found Emby, but found out that it is closed source so I switched to Jellyfin. Jellyfin is a self hosted media server like Plex that you can install on almost all platforms including Debian GNU+Linux, the client can be installed also to almost any platforms.

Raspbian is a Debian derivative so, we can use the Debian package for our Raspberry Pi (In my case I use 3B+ and with Raspbian 10 armhf architecture). You can view the instructions on how to install it from the jellyfin website.

$ sudo apt install jellyfin -dy
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following additional packages will be installed:
  at jellyfin-ffmpeg
The following NEW packages will be installed:
  at jellyfin jellyfin-ffmpeg
0 upgraded, 3 newly installed, 0 to remove and 0 not upgraded.
Need to get 73.2 MB/87.5 MB of archives.
After this operation, 220 MB of additional disk space will be used.

Fetched 16.0 MB in 13min 14s (20.2 kB/s)                                       
Download complete and in download only mode
$ sudo apt install jellyfin -y 
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following additional packages will be installed:
  at jellyfin-ffmpeg
The following NEW packages will be installed:
  at jellyfin jellyfin-ffmpeg
0 upgraded, 3 newly installed, 0 to remove and 0 not upgraded.
Need to get 0 B/87.5 MB of archives.
After this operation, 220 MB of additional disk space will be used.

Unpacking jellyfin (10.5.0-1) ...
Setting up at (3.1.23-1) ...
Created symlink /etc/systemd/system/multi-user.target.wants/atd.service → /lib/systemd/system/atd.service.
Setting up jellyfin-ffmpeg (4.2.1-5-buster) ...
Setting up jellyfin (10.5.0-1) ...
Created symlink /etc/systemd/system/multi-user.target.wants/jellyfin.service → /lib/systemd/system/jellyfin.service.
Processing triggers for systemd (241-7~deb10u3) ...
Processing triggers for man-db (2.8.5-2) ...
Processing triggers for libc-bin (2.28-10) ...

Visit your Pi’s IP address then port 8096 to configure it:
Example: http://10.XX.X.X:8096

The configuration is pretty much simple, just read the steps and understand.
When adding a folder to the media library, you need to make sure that you select a read only permission for other users. The most easiest way to allow anyone from reading your media file is to execute:

$ chmod 744 ./files_folders_location

or just use your preferred method.

After completing the installation and adding media libraries, I have noticed that the Pi 3B+ struggles with transcoding videos (example, when you select custom resolution on your Jellyfin client or when X265 codec file). The CPU and RAM usage are heavy when transcoding videos, so to prevent it from happening I just turned off transcoding for my user and any conversion of file. This will also force direct play to the client, so no transcoding required but will refuse to play unsupported file (mostly in my case X265 codecs).
Maybe I should get a Pi 4, but I don’t have any money to buy it. I also installed it on my HP Thin Client T610 to compare the performance with Pi 3B+, stay tuned.

Here is a video tutorial on how to install and configure Jellyfin:
https://invidio.us/watch?v=8mnrS9k0wns

UPDATE: I tried to switch on hardware acceleration as stated in this tutorial:
https://jellyfin.org/docs/general/administration/hardware-acceleration.html#raspberry-pi-3-and-4

My Pi stills struggles to play HEVC files but at least it is playable. But the RAM is insufficient.
I am now using Jellyfin on my HP Thin Client T610 with 4GB of RAM.