{"id":1486,"date":"2025-03-30T17:34:10","date_gmt":"2025-03-30T17:34:10","guid":{"rendered":"https:\/\/www.labiol.xyz\/?p=1486"},"modified":"2025-03-30T17:37:14","modified_gmt":"2025-03-30T17:37:14","slug":"jellyfin-configuration-in-lxc-container","status":"publish","type":"post","link":"https:\/\/www.labiol.xyz\/index.php\/2025\/03\/30\/jellyfin-configuration-in-lxc-container\/","title":{"rendered":"jellyfin configuration in lxc container"},"content":{"rendered":"\n<p>Jellyfin is extremely useful software providing home streaming system. I am using it since a while for streaming my old ripped DVD, which I love to watch again and again. Jellyfin is opensource, cross platform as a server and as a client, including client for android and iOS. It is optimising network (in compression to media player using shared network disk), providing very good image quality and not less important  &#8211; playlist organisation within your library. <\/p>\n\n\n\n<p>If you are interested in more details check out: <a href=\"https:\/\/en.wikipedia.org\/wiki\/Jellyfin\">https:\/\/en.wikipedia.org\/wiki\/Jellyfin<\/a><\/p>\n\n\n\n<p>I am using jellyfin inside lxc container, which is very convenient (in case of keeping clean state of my computer) but usage in it comes with few challenges with graphic card hardware acceleration.<\/p>\n\n\n\n<p>Good description on how to deal with such scenarios can be found: <a href=\"https:\/\/forum.jellyfin.org\/t-unable-to-configure-transcoding-on-jellyfin-running-on-a-proxmox-lxc-container\">https:\/\/forum.jellyfin.org\/t-unable-to-configure-transcoding-on-jellyfin-running-on-a-proxmox-lxc-container<\/a><\/p>\n\n\n\n<p class=\"has-large-font-size\">In summary few steps<\/p>\n\n\n\n<p>Check the device you can use in your \/dev\/dri directory main operating system. In my example it is \/dev\/dri\/renderD128 (old i915 intel graphics card)<\/p>\n\n\n\n<p>In case of using cgroup2, to your lxc container config file add the following <\/p>\n\n\n\n<ol class=\"wp-block-list\"><\/ol>\n\n\n\n<div class=\"hcb_wrap\"><pre class=\"prism line-numbers lang-bash\" data-lang=\"Bash\"><code>lxc.cgroup2.devices.allow = c 226:0 rwm\nlxc.cgroup2.devices.allow = c 226:128 rwm\nlxc.mount.entry = \/dev\/dri\/renderD128 dev\/dri\/renderD128 none bind,optional,create=file<\/code><\/pre><\/div>\n\n\n\n<p>In case of using cgrop (ver1), use the add the following:<\/p>\n\n\n\n<div class=\"hcb_wrap\"><pre class=\"prism line-numbers lang-bash\" data-lang=\"Bash\"><code>lxc.cgroup.devices.allow = c 226:0 rwm\nlxc.cgroup.devices.allow = c 226:128 rwm\nlxc.mount.entry = \/dev\/dri\/renderD128 dev\/dri\/renderD128 none bind,optional,create=file<\/code><\/pre><\/div>\n\n\n\n<p>Alternatively, the last line can be replaced by:<\/p>\n\n\n\n<div class=\"hcb_wrap\"><pre class=\"prism line-numbers lang-bash\" data-lang=\"Bash\"><code>lxc.mount.entry = \/dev\/dri dev\/dri none bind,optional,create=dir<\/code><\/pre><\/div>\n\n\n\n<p>Check if render group has the same gid on main system and inside the lxc container. <br>Now, install in the container needed software, in my case of intel graphics card and debian12 it was:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>curl<\/li>\n\n\n\n<li>gnupg<\/li>\n\n\n\n<li>id3v2<\/li>\n\n\n\n<li>intel-opencl-icd<\/li>\n\n\n\n<li>intel-media-va-driver<\/li>\n\n\n\n<li>i965-va-driver<\/li>\n\n\n\n<li>vainfo<\/li>\n\n\n\n<li>xvfb<\/li>\n\n\n\n<li>i915<\/li>\n\n\n\n<li>xserver-xorg-video-intel<\/li>\n\n\n\n<li>firmware-linux-free<\/li>\n\n\n\n<li>firmware-linux-nonfree<\/li>\n<\/ul>\n\n\n\n<p>Follow the steps to install jellyfin: <a href=\"https:\/\/jellyfin.org\/docs\/general\/installation\/linux\/\">https:\/\/jellyfin.org\/docs\/general\/installation\/linux\/<\/a>, with script &#8220;curl https:\/\/repo.jellyfin.org\/install-debuntu.sh | sudo bash&#8221; or using extrepo &#8220;sudo apt install extrepo<br>sudo extrepo enable jellyfin&#8221; or in debian:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><code>mkdir -p \/etc\/apt\/keyrings<\/code><\/li>\n\n\n\n<li><code>curl -fsSL https:\/\/repo.jellyfin.org\/jellyfin_team.gpg.key | sudo gpg --dearmor -o \/etc\/apt\/keyrings\/jellyfin.gpg<\/code><\/li>\n\n\n\n<li>apt update &amp;&amp; apt install jellyfin<\/li>\n<\/ul>\n\n\n\n<p>Add group <strong>video<\/strong> and <strong>render<\/strong> to your jellyfin user. Also make sure the video belongs to jellyfin user (for simplification, jellyfin can manage those video like deleting it when not needed from GUI).<\/p>\n\n\n\n<p class=\"has-large-font-size\">Check the configuration<\/p>\n\n\n\n<div class=\"hcb_wrap\"><pre class=\"prism line-numbers lang-bash\" data-lang=\"Bash\"><code>\/usr\/lib\/jellyfin-ffmpeg\/vainfo --display drm --device \/dev\/dri\/renderD128\nTrying display: drm\nlibva info: VA-API version 1.22.0\nlibva info: Trying to open \/usr\/lib\/jellyfin-ffmpeg\/lib\/dri\/iHD_drv_video.so\nlibva info: Found init function __vaDriverInit_1_22\nlibva error: \/usr\/lib\/jellyfin-ffmpeg\/lib\/dri\/iHD_drv_video.so init failed\nlibva info: va_openDriver() returns 1\nlibva info: Trying to open \/usr\/lib\/jellyfin-ffmpeg\/lib\/dri\/i965_drv_video.so\nlibva info: Found init function __vaDriverInit_1_22\nlibva info: va_openDriver() returns 0\nvainfo: VA-API version: 1.22 (libva 2.22.0)\nvainfo: Driver version: Intel i965 driver for Intel(R) Haswell Mobile - 2.4.0.pre1 ()\nvainfo: Supported profile and entrypoints\n      VAProfileMPEG2Simple            :\tVAEntrypointVLD\n      VAProfileMPEG2Simple            :\tVAEntrypointEncSlice\n      VAProfileMPEG2Main              :\tVAEntrypointVLD\n      VAProfileMPEG2Main              :\tVAEntrypointEncSlice\n      VAProfileH264ConstrainedBaseline:\tVAEntrypointVLD\n      VAProfileH264ConstrainedBaseline:\tVAEntrypointEncSlice\n      VAProfileH264Main               :\tVAEntrypointVLD\n      VAProfileH264Main               :\tVAEntrypointEncSlice\n      VAProfileH264High               :\tVAEntrypointVLD\n      VAProfileH264High               :\tVAEntrypointEncSlice\n      VAProfileH264MultiviewHigh      :\tVAEntrypointVLD\n      VAProfileH264MultiviewHigh      :\tVAEntrypointEncSlice\n      VAProfileH264StereoHigh         :\tVAEntrypointVLD\n      VAProfileH264StereoHigh         :\tVAEntrypointEncSlice\n      VAProfileVC1Simple              :\tVAEntrypointVLD\n      VAProfileVC1Main                :\tVAEntrypointVLD\n      VAProfileVC1Advanced            :\tVAEntrypointVLD\n      VAProfileNone                   :\tVAEntrypointVideoProc\n      VAProfileJPEGBaseline           :\tVAEntrypointVLD\n<\/code><\/pre><\/div>\n\n\n\n<p>also check output of<\/p>\n\n\n\n<p>\/usr\/lib\/jellyfin-ffmpeg\/ffmpeg -v verbose -init_hw_device vaapi=va: \/dev\/dri\/renderD128 -init_hw_device opencl@va<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Jellyfin is extremely useful software providing home streaming system. I am using it since a while for streaming my old ripped DVD, which I love to watch again and again. Jellyfin is opensource, cross platform as a server and as a client, including client for android and iOS. It is &hellip; <\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[3],"tags":[51,8],"class_list":["post-1486","post","type-post","status-publish","format-standard","hentry","category-linux","tag-jellyfin","tag-linux"],"_links":{"self":[{"href":"https:\/\/www.labiol.xyz\/index.php\/wp-json\/wp\/v2\/posts\/1486","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.labiol.xyz\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.labiol.xyz\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.labiol.xyz\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.labiol.xyz\/index.php\/wp-json\/wp\/v2\/comments?post=1486"}],"version-history":[{"count":3,"href":"https:\/\/www.labiol.xyz\/index.php\/wp-json\/wp\/v2\/posts\/1486\/revisions"}],"predecessor-version":[{"id":1489,"href":"https:\/\/www.labiol.xyz\/index.php\/wp-json\/wp\/v2\/posts\/1486\/revisions\/1489"}],"wp:attachment":[{"href":"https:\/\/www.labiol.xyz\/index.php\/wp-json\/wp\/v2\/media?parent=1486"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.labiol.xyz\/index.php\/wp-json\/wp\/v2\/categories?post=1486"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.labiol.xyz\/index.php\/wp-json\/wp\/v2\/tags?post=1486"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}