Transform your streaming experience with GPU transcoding on Jellyfin Server

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
hey everybody today I'm going to show you how to install jellyfin server and create your own home media system this will give you access to all of your media on all devices whether it's through the jellyfin application or through the web browser now there's many ways in which jellyfin can be installed we can either install it as a binary an executable file like you do for most of your applications on say windows or Linux we can also deploy it in a VM or we could take it a step further and deploy it as a container I'll show you those first two steps quickly it's really simple but the majority of this video is going to focus upon using containers to do this and also I'll show you how to mount some of your Nas storage into your jellyfin server container so that you can expand on your storage from a central location I'm also going to touch on transcoding I'll explain what that is and talk about some of the requirements that are needed when considering that so let's get on to the prerequisites what are you going to need well there's kind of two schools of thought in this if you're going to be transcoding I.E that means making your media compatible across all your devices for example you may have some 4K files in HDR and you may only have devices that can play 1080p content in a certain codec and a non-hdr that means you're going to have to transcode that means jellyfin server will in real time change those to a format that your device understands now that isn't free it's resource intensive so we need to think about that if we're going to want a server that can do transcoding so back to those two options the good news is if you've got a dedicated server on consumer gear you likely have a CPU that has an integrated Graphics Processing Unit an integrated GPU now we can take advantage of that to do the transcoding for us the beauty is even a real cheap CPU I'm talking about the ones I've showed in my previous videos a dual core from a few years ago that's going to be able to do multiple 4K trans codes in parallel if you don't have one of those and you're working with say a server CPU it won't have an integrated GPU you're either going to need a discrete GPU I.E and add in a PCI card just like you would buy for a gaming machine or you're going to have to have enough cores available so that it can do the transcoding on the CPU now that gives you a slightly better image quality whether you can tell or not is a different question but it is very intensive you're not going to get the same level of performance I.E you won't get as many simultaneous trans codes and you certainly can't do this on a cheap CPU so some of the options out of the box if you don't want transcoding you'll be happy to know you can use anything really even things like a Raspberry Pi are capable of doing a jellyfin server without the need for any additional Hardware if you're going to do transcoding like I've mentioned any consumer grade Intel or AMD chip you can take advantage of the integrated GPU if you're going to be using server Hardware things like xeons Etc or epic CPUs threadrippers Etc you're going to need a minimum pass Mark now I'll put something on the screen to show that but a pass Mark is effectively a measure of how performant the CPU is now typically the figure you want to be looking at is about a 14k 14 000 pass Mark below that you're going to get stuttering certainly on 4K HDR High bit rate streams so if you're going to be putting this in a virtual machine for example you're going to need to make sure that you give it enough cores to equal that 14k pass mark and if you want to do more than one you're going to have to double that so let's go ahead and we'll jump into the installations so the first installation is using that binary that executable file and just going through the wizard to install on Windows go to the download section on the jellyfin website and make sure you click the server tag not the client then click on the Windows Tab and just download the windows installer once that's downloaded you're just going to get the standard Windows installation GUI you're going to go through those options hit next configure those as you like and you'll be up and running okay so let's move on to Virtual machines now if you don't want transcoding the process is pretty much the same as before assuming you've got a GUI VM if you're using the command line interface the separate commands for that and I'll put them on the screen but they're pretty straightforwards now where it gets interesting is if you want to use Hardware inside your virtual machine so let's assume you have Docker running in a VM that you want to enable transcoding on now there's a few steps that we need to go through first and I'm going to talk about this in the context of using proxmox the first thing you're going to need to do is to check that the i o mmu groups are going to enable this now I'll come on to that in a moment but effectively it's the way that all the devices on your machine are carved up into little segments so that you can specify which one you want to use without the host being able to use it so what this means is proxmox won't have access to that device you do that by disabling the drivers specifically stating that you don't want it to load and then this enables you to pass it through to a virtual machine now it isn't always guaranteed to work but usually it's fine and also compatibility has become better over the years with more recent hardware and also Nvidia have lifted some of the restrictions on their gpus so you used to only be able to do two transcripts I believe it's now four and if the config works then your Docker VM will see that piece of Hardware just as it would a normal GPU and you can assign that to the container and then the container can take full advantage of that Hardware acceleration for transcoding so let's jump into the configs the first changes we're going to need to make are on the proxmox host itself so what we need to do is check what those IO mmu groups are so to do that there's a command that will list all of the PCI devices on your host once you have those IDs you want to block those by specifying them in the mod Probe on the host this is basically telling proxmox not to use these pieces of hardware on top of that we want to disable the drivers as well so that no drivers are loaded for that piece of hardware for example it won't load the Intel igpu it won't load the NVIDIA drivers Etc once you've done that it's pretty straightforward you simply need to go into your virtual machine and go to the hardware section click add exactly like we did in the previous video where we added a new hard drive and you simply want to select a pcie device once you've selected that device you simply need to add it and it should pick that up when you boot the VM there are a couple of nuances things like you may need to specify a ROM I'm not going to go into that but I'll show you the link to the description on the proxbox website so that you can read up more if you're still having issues so let's get on to the installation and look at the docker config file now there are two configs that I'm going to share with you on my GitHub one of those is for Hardware acceleration and one of those is without Hardware acceleration so you can choose if you're going to be transcoding or not now the docker config I'm going to share with you is also rooted through our proxy so that's cool we get all of the benefits of using crowdsec to secure it if we're going to externalize it it also means that we can run it internally with https and we can use internal DNS names like jellyfin.yourdomain if we're going to register that as an internal DNS name on pie hole awesome so looking through the config if you're not going to be doing transcoding it's pretty straightforward it looks just like many of the containers that we've spun up the difference here is you're probably going to want to mount some external storage now how do we do that well if you watched my previous video where we mounted our Nas we're pretty much going to do the same process I'll put something on screen so you can see the command for mounting a file share on your Linux host but if you're still not sure go ahead and check out my true now's video and it will show you how to install true Nas and configure a share across your network to map the folder to a Nas it's exactly the same as any other folder we simply share where we've mounted our NAS drive into the Container so you might have slash media films you would just put that in the slash films directory on your jellyfin host and you can select that then as a folder when you go through the wizard which we'll get on to shortly and that's pretty much it that's all you're going to need to spin this up without transcoding now if you want to get onto transcoding you'll see a few options that are commented this is where it gets interesting so the most important part really is the group add section now you need to find the ID of the user that controls your GPU so what do we mean on proxmox we've disabled it using the GPU within the VM template we've selected the GPU we want to pass through now on your Docker VM you need to run the following command to show what the ID of your GPU is and then you simply need to specify that number in this config once you've done that you'll notice that there's a new section that we haven't covered before devices and it's pretty straightforward right you specify the device on your virtual machine that you want jellyfin to have access to so Linux has all of those available in the slash Dev slash dri folder and so we just want to select the ones that we're using this will differ depending on whether you're using Intel AMD Nvidia Etc but you simply need to choose the folder structure that matches the hardware you're using and that's it those are the only differences really between the two configuration setups so let's go ahead and run that and see what happens one thing to remember if you're getting errors when you spin up this container it might be complaining about the logs folder now that typically means that you didn't create the folders that you're using for the mount before you spun up the container because the container is running as a root is going to create folders that it then cannot write into so go ahead with whatever your default user is create those folders and then spin up the container so the installation process through the web GUI is really simple you just need to navigate to The Domain that you specified in your traffic label or if you're not going to do that route just specify the IP of your Docker VM and the port that you mapped it to the default is 8096. remember this HTTP not https otherwise it's going to complain about a protocol error so go ahead and specify your language create a username and password and this is where you need to specify your first media library so click add a library tell it the type of library that you want to add and then you're going to want to specify the folder you want to use there's also some interesting things in there that you might want to configure such as who you want the media crawler to be I.E which service do you want to go to to get all of the statistics for your media things like the name the title the date Etc so you'll notice on the example here I've got folders that I specified that are mapped to my Nas so those have all of my media inside repeat that process until you've added all of your media select the metadata language you want to use for your media then specify whether you want to use this as remotely accessible in this case we are doing and that's it you then go and log in for the first time and you'll be presented with your default dashboard and in the background it should already be going ahead scanning all of those folders and populating the metadata so you should see the dashboard updating with the tiles for each of your media items and when that's completed you're pretty much good to go you can go in and specify additional configuration steps there's a whole host of customizability you can add users you can only allow them to watch certain films Etc I'm not going to go into too much detail on that but hey you now have a working jellyfin server that's protected by crowdsec is rooted through your pie hole with an internal DNS name and is secured by https through the proxy awesome if you want to validate that your transcoding is working you simply need to play the content from your jellyfin server in a format or resolution that's different to the native media so if you've got a 4K file why don't you play that through your web browser you'll see that transcoding is then taking place if you click on the dashboard on the left hand menu and press the I button on the media itself it should say hardware transcoding and if that's all good excellent you've got yourself a perfectly working jellyfin server it's awesome it's lightweight it's open source what's not to love anyway that's a wrap for this video on the next video I'm going to be showing you how to do backups for your home lab [Music] foreign [Music]
Info
Channel: Jim's Garage
Views: 25,392
Rating: undefined out of 5
Keywords: Jellyfin, proxmox, GPU, transcoding, linux, docker, nvidia, intel, amd, windows, server, plex
Id: VHXefJ7Ne6I
Channel Id: undefined
Length: 13min 59sec (839 seconds)
Published: Mon Jun 12 2023
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.