2023-10-11, 06:29 PM 
		
	
	
		So I wonder if you're onto something with the permissions...
So I can see that the usergroup owns /dev/renderD128 and /dev/card0, so I ran
and I adjusted my docker-compose.yml accordingly:
Interestingly, these commands seem to work, indicating that there is hardware acceleration getting to Jellyfin in Docker (running again as root from Unraid)
and
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:
# 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:
videoCode:
# getent group video | cut -d: -f3
18and 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-stoppedInterestingly, 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            : VAEntrypointVLDand
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
