Jellyfin is the volunteer-built media solution that puts you in control of your media. Stream to any device from your own server, with no strings attached. Your media, your server, your way.
In the previous article "Ditch those streaming services" I mentioned Jellyfin. This program is similar to what you may be used to with services such as Netflix and Hulu except that you host the videos yourself rather than them being on the cloud somewhere. If you are familiar with Plex, Jellyfin is very similar except it's open-source and completely free. I've been using it for a few years and have had zero issues. In this article I will go through the steps on how to install Jellyfin and get all of your media added.
First let's make sure everything is up to date.
sudo apt update & sudo apt full-upgrade
Next we will need to install a few packages to make sure that we can access the repository. The reason for this is that the package manager doesn't normally allow us to access repositories that are HTTPS.
sudo apt install apt-transport-https lsb-release
Now we will import the key, which keeps everything secure and ensures that only signed packages are installed.
curl https://repo.jellyfin.org/debian/jellyfin_team.gpg.key | gpg --dearmor | sudo tee /usr/share/keyrings/jellyfin-archive-keyring.gpg >/dev/null
This will add the repository to our Pi.
echo "deb [signed-by=/usr/share/keyrings/jellyfin-archive-keyring.gpg arch=$( dpkg --print-architecture )] https://repo.jellyfin.org/debian $( lsb_release -c -s ) main" | sudo tee /etc/apt/sources.list.d/jellyfin.list
Finally, we will update the package list.
sudo apt update
This command will install the package we previously added to our list.
sudo apt install jellyfin
The installation will automatically create a user named "jellyfin" and a service for it to run. The user it creates is used to access your files and run the service.
Now we just need to access it. If you don't already know the IP address to your server use the following command.
Now open up your favorite browser and access http://Your.Server.IP:8096. Replace "Your.Server.IP" with that the hostname command provided you. It should look something like this: http://192.168.1.10:8096.
You will be greeted with a very simple setup wizard. Follow the steps to set up your language, username/password and adding of your media. Once this is done you will just need to login with the username and password that you set up and you are good to go.
If you added a large amount of media files it may take a while for everything to appear in your library.
Hardware acceleration (HA) isn't great on the Pi, but it can be enabled to improve performance a bit.
First we need to add the user that the installation created to the video group.
sudo usermod -aG video jellyfin
Since HA can use a lot of memory we will need to adjust the amount of memory that is available to the GPU. Once this file is opened you need to find the line starting with gpu_mem=. If this line doesn't exist we will add it.
sudo nano /boot/config.txt
Find & edit or add the following line to the config.txt file. This is assuming you are using a Pi 4. For a Pi 3 you will want to set the amount a little lower. (ex: gpu_mem=256)
Once you have added the line, make sure to save the file and exit back into the command line.
Since we editted an important file we will need to reboot the Pi for it to take effect.
The rest of the steps will be done in the web interface that we accessed earlier.
- Login to your Jellyfin web interface.
- Access the Admin dashboard in your settings.
- Click "Playback".
- Access the dropdown menu under Hardware Acceleration.
- Select Video4Linux2(V4L2) from the dropdown.
- Scroll down and click the Save button.
That's it! Now you can access the web interface from any browser on your network or the Jellyfin app installed on your smart devices and enjoy all of your favorite Movies and TV Shows.
Be sure to check out Samba on the Pi for sharing your drives across your network.