Tutorial TvHeadEnd on Truenas Scale with NVENC support and gpuunlock for multiple transcodes
first of all we need the latest truenas Scale installed with a nvidia pascal gpu or better, in this case im using TrueNAS-SCALE-22.12.1, first we have to setup the truenas scale and use the docker apps on a system pool, recomend use an ssd pool for the apps.
step 1:
we need to setup the nvidia patch script, Link Below.
step2:
copy the nvidia patch to the truenas scale directory.
step 3:
then navigate to the truenas scale dashboard, go to system settings in the advanced tab, then create a new init/shutdown Script and add a new script,
in description put a name in my case nvidiapatch, in type select Script, in script we put the directory with the patch, example /mnt/Data/nvidia-patch-master/patch.sh, when use postinit mark enable and 10sec of timeout. now we need to reboot our truenas to apply the patch. be sure that your gpu is not isolated.
step 4:
after reboot lets start to install the tvheadend with nvenc support
lets add a new docker app.
- put a name to your docker container
- in image repository use "gee1/tvheadend" with the latest tag
- then add 4 Container Environment Variables, TZ=Etc/UTC, RUNTIME=nvidia, NVIDIA_DRIVER_CAPABILITIES= all, NVIDIA_VISIBLE_DEVICES=all
- in network add a new interface and add a static ip and the route to 0.0.0.0/0 with your gateway
- then add a Volume for the /config directory to store our settings.
- then save the container, Dont allocate any nvidia GPU in the dashboard
Now we have installed our docker container with tvheadend with nvenc support, now we have to navigate to navigate to settings and make the tvheadend wizard and install our playlist or dv cards and map our services
transcoding:
- go to settings and navigate to restream and go to codec profiles, we need to add the h264 and h265 using nvenc that now is available in the profiles
- now go to the restreaming profiles, select the advanced settings and add the profiles for the new codec profiles, in my case y select the webtv-h264-aac-matroska profile use the expert settings and select it as the default profile.
- then in the video codec profile change it to h264 nvenc profile or use the h265 nvenc profile if you want to use less bandwith with lossless quality.
Lets test it.
first step we need to go to setting and go to the user profiles go to passwords and select the user that you create in the wizard and edit it and enable persistent mode and save, then edit again the user and copy the persistent authentication code and paste it on a txt, in settings general go and use expert mode navigate to authentication type and select plain & digest and save it.
now open vlc media player and open a url and enter http://"staticip of tvheadend":9981/playlist/auth/channels?auth="persistent authentication code" and now test the powerful nvidia transcoding.
Enjoy and happy hacking.
step 1:
we need to setup the nvidia patch script, Link Below.
step2:
copy the nvidia patch to the truenas scale directory.
step 3:
then navigate to the truenas scale dashboard, go to system settings in the advanced tab, then create a new init/shutdown Script and add a new script,
in description put a name in my case nvidiapatch, in type select Script, in script we put the directory with the patch, example /mnt/Data/nvidia-patch-master/patch.sh, when use postinit mark enable and 10sec of timeout. now we need to reboot our truenas to apply the patch. be sure that your gpu is not isolated.
step 4:
after reboot lets start to install the tvheadend with nvenc support
lets add a new docker app.
- put a name to your docker container
- in image repository use "gee1/tvheadend" with the latest tag
- then add 4 Container Environment Variables, TZ=Etc/UTC, RUNTIME=nvidia, NVIDIA_DRIVER_CAPABILITIES= all, NVIDIA_VISIBLE_DEVICES=all
- in network add a new interface and add a static ip and the route to 0.0.0.0/0 with your gateway
- then add a Volume for the /config directory to store our settings.
- then save the container, Dont allocate any nvidia GPU in the dashboard
Now we have installed our docker container with tvheadend with nvenc support, now we have to navigate to navigate to settings and make the tvheadend wizard and install our playlist or dv cards and map our services
transcoding:
- go to settings and navigate to restream and go to codec profiles, we need to add the h264 and h265 using nvenc that now is available in the profiles
- now go to the restreaming profiles, select the advanced settings and add the profiles for the new codec profiles, in my case y select the webtv-h264-aac-matroska profile use the expert settings and select it as the default profile.
- then in the video codec profile change it to h264 nvenc profile or use the h265 nvenc profile if you want to use less bandwith with lossless quality.
Lets test it.
first step we need to go to setting and go to the user profiles go to passwords and select the user that you create in the wizard and edit it and enable persistent mode and save, then edit again the user and copy the persistent authentication code and paste it on a txt, in settings general go and use expert mode navigate to authentication type and select plain & digest and save it.
now open vlc media player and open a url and enter http://"staticip of tvheadend":9981/playlist/auth/channels?auth="persistent authentication code" and now test the powerful nvidia transcoding.
Enjoy and happy hacking.
Last edited:
Relate Threads