• 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: Hardware acceleration on Unraid issues

     
    • 0 Vote(s) - 0 Average

    SOLVED: Hardware acceleration on Unraid issues

    Configuring hardware acceleration for an iGPU w/Unraid
    n8jadams
    Offline

    Junior Member

    Posts: 10
    Threads: 2
    Joined: 2023 Oct
    Reputation: 0
    Country:United States
    #5
    2023-10-11, 06:29 PM
    So I wonder if you're onto something with the permissions...

    Code:
    # From my unraid terminal as root
    # ls -lart /dev/dri
    total 0
    drwxrwxrwx  2 root root        80 Oct 11 09:05 by-path/
    drwxrwxrwx  3 root root       100 Oct 11 09:05 ./
    crwxrwxrwx  1 root video 226, 128 Oct 11 09:05 renderD128
    crwxrwxrwx  1 root video 226,   0 Oct 11 09:05 card0
    drwxr-xr-x 16 root root      3360 Oct 11 09:08 ../

    So I can see that the
    Code:
    video
    usergroup owns /dev/renderD128 and /dev/card0, so I ran

    Code:
    # getent group video | cut -d: -f3
    18

    and I adjusted my docker-compose.yml accordingly:

    Code:
    version: '3'
    services:
      jellyfin:
        image: jellyfin/jellyfin:latest
        container_name: jellyfin_official
        user: 99:100
        group_add:
          - "18" # output from `getent group video | cut -d: -f3` command, which ls -lart /dev/dri on Unraid gave for the devices
        environment:
          - PUID=99
          - PGID=100
          - UMASK=000
          - TZ=America/Denver
        network_mode: 'host'
        volumes:
          - /mnt/user/cloud-storage/apps/Jellyfin/media:/media # Media
          - /mnt/user/cloud-storage/apps/Jellyfin/config:/config # Jellyfin files
          - /mnt/user/cloud-storage/apps/Jellyfin/cache:/cache # Jellyfin cache
        devices:
         - /dev/dri/renderD128:/dev/dri/renderD128
         - /dev/dri/card0:/dev/dri/card0
        ports:
          - 8096:8096
        restart: unless-stopped

    Interestingly, these commands seem to work, indicating that there is hardware acceleration getting to Jellyfin in Docker (running again as root from Unraid)

    Code:
    # docker exec -it jellyfin_official /usr/lib/jellyfin-ffmpeg/vainfo
    Trying display: drm
    libva info: VA-API version 1.19.0
    libva info: Trying to open /usr/lib/jellyfin-ffmpeg/lib/dri/iHD_drv_video.so
    libva info: Found init function __vaDriverInit_1_19
    libva info: va_openDriver() returns 0
    vainfo: VA-API version: 1.19 (libva 2.19.0)
    vainfo: Driver version: Intel iHD driver for Intel(R) Gen Graphics - 23.3.2 (95dc859)
    vainfo: Supported profile and entrypoints
          VAProfileNone                   : VAEntrypointVideoProc
          VAProfileNone                   : VAEntrypointStats
          VAProfileMPEG2Simple            : VAEntrypointVLD
          VAProfileMPEG2Simple            : VAEntrypointEncSlice
          VAProfileMPEG2Main              : VAEntrypointVLD
          VAProfileMPEG2Main              : VAEntrypointEncSlice
          VAProfileH264Main               : VAEntrypointVLD
          VAProfileH264Main               : VAEntrypointEncSlice
          VAProfileH264Main               : VAEntrypointFEI
          VAProfileH264Main               : VAEntrypointEncSliceLP
          VAProfileH264High               : VAEntrypointVLD
          VAProfileH264High               : VAEntrypointEncSlice
          VAProfileH264High               : VAEntrypointFEI
          VAProfileH264High               : VAEntrypointEncSliceLP
          VAProfileVC1Simple              : VAEntrypointVLD
          VAProfileVC1Main                : VAEntrypointVLD
          VAProfileVC1Advanced            : VAEntrypointVLD
          VAProfileJPEGBaseline           : VAEntrypointVLD
          VAProfileJPEGBaseline           : VAEntrypointEncPicture
          VAProfileH264ConstrainedBaseline: VAEntrypointVLD
          VAProfileH264ConstrainedBaseline: VAEntrypointEncSlice
          VAProfileH264ConstrainedBaseline: VAEntrypointFEI
          VAProfileH264ConstrainedBaseline: VAEntrypointEncSliceLP
          VAProfileVP8Version0_3          : VAEntrypointVLD
          VAProfileVP8Version0_3          : VAEntrypointEncSlice
          VAProfileHEVCMain               : VAEntrypointVLD
          VAProfileHEVCMain               : VAEntrypointEncSlice
          VAProfileHEVCMain               : VAEntrypointFEI
          VAProfileHEVCMain10             : VAEntrypointVLD
          VAProfileHEVCMain10             : VAEntrypointEncSlice
          VAProfileVP9Profile0            : VAEntrypointVLD
          VAProfileVP9Profile2            : VAEntrypointVLD

    and

    Code:
    # docker exec -it jellyfin_official /usr/lib/jellyfin-ffmpeg/ffmpeg -v verbose -init_hw_device vaapi=va -init_hw_device opencl@va
    ffmpeg version 5.1.3-Jellyfin Copyright (c) 2000-2022 the FFmpeg developers
      built with gcc 10 (Debian 10.2.1-6)
      configuration: --prefix=/usr/lib/jellyfin-ffmpeg --target-os=linux --extra-libs=-lfftw3f --extra-version=Jellyfin --disable-doc --disable-ffplay --disable-ptx-compression --disable-static --disable-libxcb --disable-sdl2 --disable-xlib --enable-lto --enable-gpl --enable-version3 --enable-shared --enable-gmp --enable-gnutls --enable-chromaprint --enable-libdrm --enable-libass --enable-libfreetype --enable-libfribidi --enable-libfontconfig --enable-libbluray --enable-libmp3lame --enable-libopus --enable-libtheora --enable-libvorbis --enable-libopenmpt --enable-libdav1d --enable-libwebp --enable-libvpx --enable-libx264 --enable-libx265 --enable-libzvbi --enable-libzimg --enable-libfdk-aac --arch=amd64 --enable-libsvtav1 --enable-libshaderc --enable-libplacebo --enable-vulkan --enable-opencl --enable-vaapi --enable-amf --enable-libmfx --enable-ffnvcodec --enable-cuda --enable-cuda-llvm --enable-cuvid --enable-nvdec --enable-nvenc
      libavutil      57. 28.100 / 57. 28.100
      libavcodec     59. 37.100 / 59. 37.100
      libavformat    59. 27.100 / 59. 27.100
      libavdevice    59.  7.100 / 59.  7.100
      libavfilter     8. 44.100 /  8. 44.100
      libswscale      6.  7.100 /  6.  7.100
      libswresample   4.  7.100 /  4.  7.100
      libpostproc    56.  6.100 / 56.  6.100
    [AVHWDeviceContext @ 0x55c1f30a2d40] Trying to use DRM render node for device 0.
    [AVHWDeviceContext @ 0x55c1f30a2d40] libva: VA-API version 1.19.0
    [AVHWDeviceContext @ 0x55c1f30a2d40] libva: Trying to open /usr/lib/jellyfin-ffmpeg/lib/dri/iHD_drv_video.so
    [AVHWDeviceContext @ 0x55c1f30a2d40] libva: Found init function __vaDriverInit_1_19
    [AVHWDeviceContext @ 0x55c1f30a2d40] libva: va_openDriver() returns 0
    [AVHWDeviceContext @ 0x55c1f30a2d40] Initialised VAAPI connection: version 1.19
    [AVHWDeviceContext @ 0x55c1f30a2d40] VAAPI driver: Intel iHD driver for Intel(R) Gen Graphics - 23.3.2 (95dc859).
    [AVHWDeviceContext @ 0x55c1f30a2d40] Driver not found in known nonstandard list, using standard behaviour.
    [AVHWDeviceContext @ 0x55c1f30c6040] 0.0: Intel(R) OpenCL HD Graphics / Intel(R) HD Graphics 630 [0x5912]
    [AVHWDeviceContext @ 0x55c1f30c6040] Intel QSV to OpenCL mapping function found (clCreateFromVA_APIMediaSurfaceINTEL).
    [AVHWDeviceContext @ 0x55c1f30c6040] Intel QSV in OpenCL acquire function found (clEnqueueAcquireVA_APIMediaSurfacesINTEL).
    [AVHWDeviceContext @ 0x55c1f30c6040] Intel QSV in OpenCL release function found (clEnqueueReleaseVA_APIMediaSurfacesINTEL).
    Hyper fast Audio and Video encoder
    usage: ffmpeg [options] [[infile options] -i infile]... {[outfile options] outfile}...

    Use -h to get full help or, even better, run 'man ffmpeg'

    In the Jellyfin admin video playback settings:
    Checked "Enable hardware encoding" for: H264, MPEG2, VC1, VP8, VP9, VP9 10-bit.
    Checked "Prefer OS native DXVA or VA-API hardware decoders
    Checked "Enable hardware encoding"
    Unchecked "Enable Intel Low-Power H.264 hardware encoder"
    Unchecked "Enable Intel Low-Power HEVC hardware encoder"
    Unhecked "Allow encoding in HEVC format"
    Everything else was default.

    Unfortunately the same thing is happening. The video just doesn't start playing for a very long time:

    Code:
    [12:27:25] [INF] [12] Jellyfin.Api.Helpers.MediaInfoHelper: User policy for admin. EnablePlaybackRemuxing: True EnableVideoPlaybackTranscoding: True EnableAudioPlaybackTranscoding: True
    [12:27:25] [INF] [12] Jellyfin.Api.Helpers.MediaInfoHelper: StreamBuilder.BuildVideoItem( Profile=Anonymous Profile, Path=/media/TV/The Office (US)/Season 6/The Office (US) - S06E26 - Whistleblower Bluray-1080p.mp4, AudioStreamIndex=null, SubtitleStreamIndex=null ) => ( PlayMethod=DirectPlay, TranscodeReason=0 ) media:/videos/0ea35f7e-919a-bd95-fe54-530e9ebc816f/stream.mp4?MediaSourceId=0ea35f7e919abd95fe54530e9ebc816f&Static=true&VideoCodec=hevc&AudioCodec=aac&AudioStreamIndex=2&api_key=<token>&Tag=4df13c51ed77c888f05fbead0afce219
    [12:27:26] [INF] [40] Jellyfin.Api.Helpers.TranscodingJobHelper: /usr/lib/jellyfin-ffmpeg/ffmpeg -analyzeduration 200M -fflags +genpts  -i file:"/media/TV/The Office (US)/Season 6/The Office (US) - S06E26 - Whistleblower Bluray-1080p.mp4" -map 0:0 -map 0:1 -map -0:s -codec:v:0 copy -map_metadata -1 -map_chapters -1 -threads 0 -codec:a:0 copy -f mp4 -movflags frag_keyframe+empty_moov -y "/config/transcodes/98073f0de38ebdb5a4006681b0f4f05e.mp4"
    [12:27:27] [WRN] [16] Jellyfin.Server.Middleware.ResponseTimeMiddleware: Slow HTTP Response from <REDACTED_MY_URL>/Videos/0ea35f7e919abd95fe54530e9ebc816f/stream.mp4 to 163.116.147.7 in 0:00:01.22703 with Status Code 200
    [12:27:27] [WRN] [41] Jellyfin.Server.Middleware.ResponseTimeMiddleware: Slow HTTP Response from <REDACTED_MY_URL>/Sessions/Playing to 163.116.147.33 in 0:00:01.1664658 with Status Code 204
    [12:27:28] [INF] [26] Jellyfin.Api.Helpers.TranscodingJobHelper: FFmpeg exited with code 0
    « Next Oldest | Next Newest »

    Users browsing this thread: 2 Guest(s)


    Messages In This Thread
    Hardware acceleration on Unraid issues - by n8jadams - 2023-10-11, 04:08 PM
    RE: Hardware acceleration on Unraid issues - by TheDreadPirate - 2023-10-11, 04:36 PM
    RE: Hardware acceleration on Unraid issues - by n8jadams - 2023-10-11, 04:57 PM
    RE: Hardware acceleration on Unraid issues - by bitmap - 2023-10-11, 05:18 PM
    RE: Hardware acceleration on Unraid issues - by n8jadams - 2023-10-11, 06:29 PM
    RE: Hardware acceleration on Unraid issues - by TheDreadPirate - 2023-10-11, 07:17 PM
    RE: Hardware acceleration on Unraid issues - by n8jadams - 2023-10-11, 08:38 PM
    RE: Hardware acceleration on Unraid issues - by TheDreadPirate - 2023-10-11, 09:06 PM
    RE: Hardware acceleration on Unraid issues - by n8jadams - 2023-10-11, 09:29 PM
    RE: Hardware acceleration on Unraid issues - by bitmap - 2023-10-11, 10:59 PM
    RE: Hardware acceleration on Unraid issues - by n8jadams - 2023-10-11, 11:18 PM
    RE: Hardware acceleration on Unraid issues - by bitmap - 2023-10-11, 11:30 PM
    RE: Hardware acceleration on Unraid issues - by n8jadams - 2023-10-11, 11:49 PM
    RE: Hardware acceleration on Unraid issues - by bitmap - 2023-10-12, 02:53 AM
    RE: Hardware acceleration on Unraid issues - by n8jadams - 2023-10-12, 09:17 PM
    RE: Hardware acceleration on Unraid issues - by bitmap - 2023-10-13, 12:40 AM
    RE: Hardware acceleration on Unraid issues - by n8jadams - 2023-10-13, 09:09 PM

    • 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