• Login
  • Register
  • Login Register
    Login
    Username/Email:
    Password:
    Or login with a social network below
  • Forum
  • Website
  • GitHub
  • Status
  • Translation
  • Features
  • Team
  • Rules
  • Help
  • Feeds
User Links
  • Login
  • Register
  • Login Register
    Login
    Username/Email:
    Password:
    Or login with a social network below

    Useful Links Forum Website GitHub Status Translation Features Team Rules Help Feeds
    Jellyfin Forum Support Troubleshooting SOLVED: Jellyfin hw transcoding not working

     
    • 0 Vote(s) - 0 Average

    SOLVED: Jellyfin hw transcoding not working

    GOU drivers confirmed working with jellyfin-ffmpeg in container
    canguy247
    Offline

    Junior Member

    Posts: 3
    Threads: 1
    Joined: 2025 Apr
    Reputation: 0
    Country:Canada
    #1
    2025-04-05, 01:44 PM (This post was last modified: 2025-04-06, 05:27 PM by canguy247. Edited 2 times in total.)
    Hey Folks,

    I am hoping someone can help me with an issue as I am at the end of my knowledge here.

    I have a server running NixOS and have a few containers running and all is well except for one thing.

    The issue I have is that i want to use gpu acceleration for transcoding in Jellyfin and cannot for the life of me get it working.

    Here is a summary of what I have done, with the logs/details below:
    -confirmed Jellyfin running well without hardware transcoding
    -installed NVidia drivers on host and container and passed devices through
    -confirmed drivers working on host and container
    -enabled NVENC hardware acceleration in Jellyfin - I get an error when playing media which uses the hardware
    -ffmpeg log shows an error wrt no cuda device
    -copying and pasting the exact ffmpeg command from the log into the container works fine
    -changed the systemd service to run as root with no luck
    -reached wit's end and came here

    Details of what I have tried:
    I have installed the drivers on the host and confirmed them as running with nvidia-smi:
    NVIDIA-SMI 565.77 Driver Version: 565.77 CUDA Version: 12.7

    I also did same in the container and confirmed them running as above.

    The issue is that playing any media which requires gpu transcoding fails…ffmpeg log shows:
    https://pastebin.com/V84W4i25


    Here is the config for the container for reference:
    https://pastebin.com/rWJKej8W

    Checked ffmpeg sees the hardware:


    Code:
    /nix/store/n6jgkqjx03jalh683vxfv7mhl4xnhlc4-jellyfin-ffmpeg-7.0.2-5-bin/bin/ffmpeg -hide_banner -hwaccels
    Hardware acceleration methods:
    vdpau
    cuda
    vaapi
    qsv
    drm
    opencl
    vulkan


    And then successfully used the jellyfin-ffmpeg within the container to do a conversion including using the full command from the ffmpeg log.

    I do not know where to go from here...journalctl shows the following so it definitely can run ffmpeg successfully:


    Code:
    .
    jellyfin[320]: [08:57:06] [INF] [1] MediaBrowser.MediaEncoding.Encoder.MediaEncoder: Available decoders: ["libdav1d", "av1", "av1_cuvid", "av1_qsv", "h264", "h264_qsv", "h264_cuvid", "hevc", "hevc_qsv", "hevc_cuvid", "mpeg2video", "mpeg2_qsv", "mpeg2_cuvid", "mpeg4", "mpeg4_cuvid", "msmpeg4", "vc1_qsv", "vc1_cuvid", "vp8", "libvpx", "vp8_cuvid", "vp8_qsv", "vp9", "libvpx-vp9", "vp9_cuvid", "vp9_qsv", "aac", "ac3", "ac4", "dca", "flac", "mp3", "truehd"]
    .
    .


    Code:
    .
    MediaBrowser.MediaEncoding.Encoder.MediaEncoder: Available encoders: ["libsvtav1", "av1_nvenc", "av1_amf", "av1_vaapi", "libx264", "h264_amf", "h264_nvenc", "h264_qsv", "h264_v4l2m2m", "h264_vaapi", "libx265", "hevc_amf", "hevc_nvenc", "hevc_qsv", "hevc_vaapi", "mjpeg_qsv", "mjpeg_vaapi", "aac", "ac3", "alac", "dca", "flac", "libmp3lame", "libopus", "truehd", "libvorbis", "srt"]
    .
    .

    Changed bind mounts to allowedDevices and all is good thanks to TheDreadPirate

    Not sure why bind mounts are suggested in most NixOS docs I read or why I could still use hw transcoding from ffmpeg within the container. I am thinking the allowedDevices does something that is needed by the systemd.services sandboxing.
    TheDreadPirate
    Offline

    Community Moderator

    Posts: 15,374
    Threads: 10
    Joined: 2023 Jun
    Reputation: 460
    Country:United States
    #2
    2025-04-05, 06:09 PM
    Which GPU are you using? And did you install the nvidia encode and decode packages?
    Jellyfin 10.10.7 (Docker)
    Ubuntu 24.04.2 LTS w/HWE
    Intel i3 12100
    Intel Arc A380
    OS drive - SK Hynix P41 1TB
    Storage
        4x WD Red Pro 6TB CMR in RAIDZ1
    [Image: GitHub%20Sponsors-grey?logo=github]
    canguy247
    Offline

    Junior Member

    Posts: 3
    Threads: 1
    Joined: 2025 Apr
    Reputation: 0
    Country:Canada
    #3
    2025-04-05, 08:53 PM
    Thanks for the suggestion

    Quadro P400

    I am running NixOS so no extra packages needed. I also confirmed ffmpeg works with hardware accel works within the container

    I have done everything i can think of to deal with systemd sandboxing but that is the only difference between running ffmpeg myself or Jellyfin teying it...
    TheDreadPirate
    Offline

    Community Moderator

    Posts: 15,374
    Threads: 10
    Joined: 2023 Jun
    Reputation: 460
    Country:United States
    #4
    2025-04-05, 09:27 PM
    I'm not familiar with NixOS, but the only thing that looks odd is that you passed in several, or all, of the Nvidia devices as volumes. In plain docker you pass in devices as devices and not volumes.
    Jellyfin 10.10.7 (Docker)
    Ubuntu 24.04.2 LTS w/HWE
    Intel i3 12100
    Intel Arc A380
    OS drive - SK Hynix P41 1TB
    Storage
        4x WD Red Pro 6TB CMR in RAIDZ1
    [Image: GitHub%20Sponsors-grey?logo=github]
    canguy247
    Offline

    Junior Member

    Posts: 3
    Threads: 1
    Joined: 2025 Apr
    Reputation: 0
    Country:Canada
    #5
    2025-04-06, 05:24 PM
    Thank you so much for this. When I first read it I almost ignored it because binding the /dev devices is what evry example I saw said to do

    I looked a little deeper thanks to your post and switch it to allowedDevices and it works!

    Thanks again eh!


    (2025-04-05, 09:27 PM)TheDreadPirate Wrote: I'm not familiar with NixOS, but the only thing that looks odd is that you passed in several, or all, of the Nvidia devices as volumes.  In plain docker you pass in devices as devices and not volumes.
    « Next Oldest | Next Newest »

    Users browsing this thread: 1 Guest(s)


    • View a Printable Version
    • Subscribe to this thread
    Forum Jump:

    Home · Team · Help · Contact
    © Designed by D&D - Powered by MyBB
    L


    Jellyfin

    The Free Software Media System

    Linear Mode
    Threaded Mode