I assume the error [AVHWDeviceContext @ 0x7f8bcc7442c0] No matching devices found comes from:
Job running: EAE_ROOT=/tmp/pms-1a7a9e45-a6c8-4a4e-8aaa-7e52e1d1499d/EasyAudioEncoder FFMPEG_EXTERNAL_LIBS='/config/Library/Application\ Support/Plex\ Media\ Server/Codecs/8217c1c-4578-linux-x86_64/' LIBVA_DRIVERS
_PATH="/config/Library/Application Support/Plex Media Server/Cache/va-dri-linux-x86_64" OCL_ICD_VENDORS="/config/Library/Application Support/Plex Media Server/Cache/cl-icds-linux-x86_64" X_PLEX_TOKEN=xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx cl_cache_dir="/config/Library/Application Support/P
lex Media Server/Cache/Shaders/icr-97-linux-x86_64/" "/usr/lib/plexmediaserver/Plex Transcoder" -codec:0 hevc -hwaccel:0 vaapi -hwaccel_fallback_threshold:0 10 -hwaccel_output_format:0 vaapi -hwaccel_device:0 vaapi -codec:1 truehd_eae -eae_prefix:1 g7owdzz2ks4im4kku1qetbzs_ -analyzeduration 20
000000 -probesize 20000000 -i /site/uhd/movies/XXXX.2021.UHD.BluRay.2160p.TrueHD.Atmos.7.1.DV.HEVC.REMUX-FOO/XXXX.2021.UHD.BluRay.2160p.TrueHD.Atmos.7.1.DV.HEVC.REMUX-FOO.mkv -filter_complex "[0:0]hwupload[0];[0]scale_vaapi=w=2276:h=1280:format=p010[1];[1]hwmap=derive_device=opencl[2];[2]tonem
ap_opencl=tonemap=mobius:format=nv12:m=bt709:p=bt709:r=tv[3];[3]hwmap=derive_device=vaapi:reverse=1[4];[4]hwupload[5]" -map "[5]" -codec:0 h264_vaapi -b:0 20000k -r:0 23.975999999999999 -force_key_frames:0 "expr:gte(t,n_forced*1)" -filter_complex "[0:1] aresample=async=1:ochl='stereo':rematrix
_maxval=0.000000dB:osr=48000[6]" -map "[6]" -metadata:s:1 language=eng -codec:1 aac -b:1 256k -f dash -seg_duration 1 -dash_segment_type mp4 -init_seg_name 'init-stream$RepresentationID$.m4s' -media_seg_name 'chunk-stream$RepresentationID$-$Number%05d$.m4s' -window_size 5 -delete_removed false
-skip_to_segment 1 -time_delta 0.0625 -manifest_name "http://127.0.0.1:32400/video/:/transcode/session/g7owdzz2ks4im4kku1qetbzs/84b135e8-4b46-4aaa-9f0c-471cefdd0429/manifest?X-Plex-Http-Pipeline=infinite" -avoid_negative_ts disabled -map_metadata -1 -map_chapters -1 dash -start_at_zero -copyt
s -vsync cfr -init_hw_device vaapi=vaapi:/dev/dri/renderD128 -filter_hw_device vaapi -y -nostats -loglevel quiet -loglevel_plex error -progressurl http://127.0.0.1:32400/video/:/transcode/session/g7owdzz2ks4im4kku1qetbzs/84b135e8-4b46-4aaa-9f0c-471cefdd0429/progres
I ran it manually with addional debug, relevant lines:
[AVHWDeviceContext @ 0x7fc16b644180] libva: VA-API version 1.18.0
[AVHWDeviceContext @ 0x7fc16b644180] libva: Trying to open /config/Library/Application Support/Plex Media Server/Cache/va-dri-linux-x86_64/iHD_drv_video.so
[AVHWDeviceContext @ 0x7fc16b644180] libva: Found init function __vaDriverInit_1_18
[AVHWDeviceContext @ 0x7fc16b644180] libva: va_openDriver() returns 0
[AVHWDeviceContext @ 0x7fc16b644180] Initialised VAAPI connection: version 1.18
[AVHWDeviceContext @ 0x7fc16b644180] VAAPI driver: Intel iHD driver for Intel(R) Gen Graphics - 23.1.6 (df5ea346).
[AVHWDeviceContext @ 0x7fc16b644180] Driver not found in known nonstandard list, using standard behaviour.
Input #0, matroska,webm, from '/site/uhd/movies/XXXX.2021.UHD.BluRay.2160p.TrueHD.Atmos.7.1.DV.HEVC.REMUX-FOO/XXXX.2021.UHD.BluRay.2160p.TrueHD.Atmos.7.1.DV.HEVC.REMUX-FOO.mkv':
...
Stream #0:0: Video: hevc (Main 10), 1 reference frame, yuv420p10le(tv, bt2020nc/bt2020/smpte2084, topleft), 3840x2160 [SAR 1:1 DAR 16:9], 23.98 fps, 23.98 tbr, 1k tbn (default)
...
Stream #0:1(eng): Audio: truehd, 48000 Hz, 7.1, s32 (24 bit) (default)
...
hevc @ 0x7fc1676664c0] Skipping NAL unit 63
[graph 0 input from stream 0:0 @ 0x7fc167622c40] w:3840 h:2160 pixfmt:vaapi tb:1/1000 fr:24000/1001 sar:1/1
[hevc @ 0x7fc167666980] Skipping NAL unit 63
[hevc @ 0x7fc167666980] Skipping NAL unit 63
[AVHWDeviceContext @ 0x7fc15bd08c00] No matching devices found.
[AVHWDeviceContext @ 0x7fc15bd08c00] 0.0: Intel(R) OpenCL HD Graphics / Intel(R) UHD Graphics P750
[AVHWDeviceContext @ 0x7fc15bd08c00] Beignet DRM to OpenCL image mapping function not found (clCreateImageFromFdINTEL).
[AVHWDeviceContext @ 0x7fc15bd08c00] Beignet DRM to OpenCL mapping not usable.
[AVHWDeviceContext @ 0x7fc15bd08c00] Intel QSV to OpenCL mapping function found (clCreateFromVA_APIMediaSurfaceINTEL).
[AVHWDeviceContext @ 0x7fc15bd08c00] Intel QSV in OpenCL acquire function found (clEnqueueAcquireVA_APIMediaSurfacesINTEL).
[AVHWDeviceContext @ 0x7fc15bd08c00] Intel QSV in OpenCL release function found (clEnqueueReleaseVA_APIMediaSurfacesINTEL).
[h264_vaapi @ 0x7fc16767b700] Using input frames context (format vaapi) with h264_vaapi encoder.
[h264_vaapi @ 0x7fc16767b700] Input surface format is nv12.
[h264_vaapi @ 0x7fc16767b700] Using VAAPI profile VAProfileH264High (7).
[h264_vaapi @ 0x7fc16767b700] Using VAAPI entrypoint VAEntrypointEncSlice (6).
[h264_vaapi @ 0x7fc16767b700] Using VAAPI render target format YUV420 (0x1).
[h264_vaapi @ 0x7fc16767b700] RC mode: AVBR.
[h264_vaapi @ 0x7fc16767b700] RC target: 20000000 bps converging in 120 frames with 100% accuracy.
[h264_vaapi @ 0x7fc16767b700] RC framerate: 2997/125 (23.98 fps).
[h264_vaapi @ 0x7fc16767b700] Using intra, P- and B-frames (supported references: 8 / 2).
[h264_vaapi @ 0x7fc16767b700] All wanted packed headers available (wanted 0xd, found 0x1f).
[h264_vaapi @ 0x7fc16767b700] Using level 5.
[hevc @ 0x7fc167666e00] Skipping NAL unit 63
[hevc @ 0x7fc167666e00] Skipping NAL unit 63
[graph_1_in_0_1 @ 0x7fc14f689a80] tb:1/48000 samplefmt:s32 samplerate:48000 chlayout:7.1
[Parsed_aresample_0 @ 0x7fc14f67ef40] ch:8 chl:7.1 fmt:s32 r:48000Hz -> ch:2 chl:stereo fmt:fltp r:48000Hz
[dash @ 0x7fc167172980] Opening 'init-stream0.m4s' for writing
[mp4 @ 0x7fc15a954f40] Empty MOOV enabled; disabling automatic bitstream filtering
[dash @ 0x7fc167172980] Representation 0 init segment will be written to: init-stream0.m4s
[dash @ 0x7fc167172980] Opening 'init-stream1.m4s' for writing
[mp4 @ 0x7fc15a955240] Empty MOOV enabled; disabling automatic bitstream filtering
[dash @ 0x7fc167172980] Representation 1 init segment will be written to: init-stream1.m4s
Output #0, dash, to 'dash':
Metadata:
encoder : Lavf59.20.101
Stream #0:0: Video: h264 (High), 1 reference frame, vaapi(tv, bt709, progressive, topleft), 2276x1280 (0x0) [SAR 5120:5121 DAR 16:9], q=2-31, 20000 kb/s, 23.98 fps, 11988 tbn
Metadata:
encoder : Lavc59.25.100 h264_vaapi
Side data:
DOVI configuration record: version: 1.0, profile: 7, level: 6, rpu flag: 1, el flag: 1, bl flag: 1, compatibility id: 6
Stream #0:1(eng): Audio: aac (LC), 48000 Hz, stereo, fltp, delay 1024, 256 kb/s
Metadata:
encoder : Lavc59.25.100 aac
...
So looks as if the ERROR [AVHWDeviceContext @ 0x7fc15bd08c00] No matching devices found. comes from ffmpeg initially looking for Beignet DRM to OpenCL, fails to find it, but then selects Intel QSV. Am I right in assuming this is expected behaviour (beignet not working but QSV does) for recent CPUs?
Now, the same thing on 1.32.6.7468 returns:
...
[hevc @ 0x7f65f5843980] Skipping NAL unit 63
[hevc @ 0x7f65f5843980] Slice 0 param buffer (264 bytes) is 0x1.
[hevc @ 0x7f65f5843980] Slice 0 data buffer (176 bytes) is 0.
[hevc @ 0x7f65f5843980] Decode to surface 0x11.
[Parsed_hwmap_2 @ 0x7f65f3534d40] Configure hwmap vaapi -> opencl.
[AVHWDeviceContext @ 0x7f65f57f2180] Failed to get number of OpenCL platforms: -1001.
[AVHWDeviceContext @ 0x7f65f57f2180] Failed to get number of OpenCL platforms: -1001.
[Parsed_hwmap_2 @ 0x7f65f3534d40] Failed to created derived device context: -19.
[Parsed_hwmap_2 @ 0x7f65f3534d40] Failed to configure output pad on Parsed_hwmap_2
...
This isn’t just HDR tonemapping being broken, this is transcoding in general being broken.
An strace of that shows:
madvise(0x7f3093fdd000, 4096, MADV_FREE) = 0
munmap(0x7f3093fdc000, 32768) = 0
open("/config/Library/Application Support/Plex Media Server/Cache/cl-icds-linux-x86_64", O_RDONLY|O_LARGEFILE|O_CLOEXEC|O_DIRECTORY) = 5
fcntl(5, F_SETFD, FD_CLOEXEC) = 0
getdents64(5, /* 3 entries */, 2048) = 80
stat("/config/Library/Application Support/Plex Media Server/Cache/cl-icds-linux-x86_64/icr.icd", {st_mode=S_IFREG|0644, st_size=96, ...}) = 0
open("/config/Library/Application Support/Plex Media Server/Cache/cl-icds-linux-x86_64/icr.icd", O_RDONLY|O_LARGEFILE) = 6
lseek(6, 0, SEEK_END) = 96
lseek(6, 0, SEEK_CUR) = 96
lseek(6, 0, SEEK_SET) = 0
readv(6, [{iov_base="/config/Library/Application Support/Plex Media Server/Drivers/icr-117-linux-x86_64/libigdrcl.so", iov_len=95}, {iov_base="\n", iov_len=1024}], 2) = 96
open("/config/Library/Application Support/Plex Media Server/Drivers/icr-117-linux-x86_64/libigdrcl.so", O_RDONLY|O_LARGEFILE|O_CLOEXEC) = 7
fcntl(7, F_SETFD, FD_CLOEXEC) = 0
fstat(7, {st_mode=S_IFREG|0755, st_size=12671352, ...}) = 0
..
mmap(0x7f30936d1000, 8204288, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED, 7, 0x4ce000) = 0x7f30936d1000
mmap(0x7f3093e19000, 569344, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x7f3093e19000
close(7) = 0
munmap(0x7f3093200000, 13254656) = 0
close(6) = 0
getdents64(5, /* 0 entries */, 2048) = 0
close(5) = 0
writev(2, [{iov_base="", iov_len=0}, {iov_base="[AVHWDeviceContext @ 0x7f30a0c56700] ", iov_len=37}], 2) = 37
writev(2, [{iov_base="", iov_len=0}, {iov_base="Failed to get number of OpenCL platforms: -1001.\n", iov_len=49}], 2) = 49
That’s about as fasr as I can get on 1.32.6.7468 because I can’t run clinfo with the clang built opencl library, so can’t get any more info on whether if these libraries are working correctly. What I can say is that stock focal packages don’t show any platforms, but installing the newer intel opencl deb package set (23.26.26690.22) within the focal container does make clinfo show supported platforms.
What would really help here in general is either
A) running clinfo, vaapi info, and vdpauinfo at plex startup (with LD_LIBARY_PATH if needed) so that we can simply look at the startup log to determine if the plex-supplied libraries are detecting offload targets,
or B) a method to run a quick dummy transcode test using your ffmpeg binary that logs the success or failure of general and tonemapped transcoding
I’ll post back as soon as you have something newer to test.