Server Version#: 1.42.1.10069-cbf7ce637 (Forum preview build on TrueNAS)
Player Version#: Android TV 10.30.6.4151
My server has two GPUs in it: an AMD iGPU, and an Intel Arc B580. I’ve had transcoding working for a while in Plex, and I know Battlemage support isn’t working yet, so I want to continue using the AMD iGPU.
This is selected in the UI:
[Req#d02/Transcode/9840b171682a485e-com-plexapp-android] Preparing driver rsv for GPU AMD Cezanne [Radeon Vega Series / Radeon Vega Mobile Series]
[Req#d02/Transcode/9840b171682a485e-com-plexapp-android/DriverDL/rsv] Skipping download; already exists
This is reflected in the FFmpeg invocation:
[Req#d02/Transcode/9840b171682a485e-com-plexapp-android/JobRunner] Job running: FFMPEG_EXTERNAL_LIBS='/config/Library/Application\ Support/Plex\ Media\ Server/Codecs/5a45f5a-34a364f06232ef31ec8ebad0-linux-x86_64/' LIBVA_DRIVERS_PATH="/config/Library/Application Support/Plex Media Server/Cache/va-dri-linux-x86_64" X_PLEX_TOKEN=xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx "/usr/lib/plexmediaserver/Plex Transcoder" -codec:0 h264 -analyzeduration 20000000 -probesize 20000000 -i "/mnt/video/XXXXX.mkv" -start_at_zero -copyts -fps_mode cfr -init_hw_device vaapi=vaapi:/dev/dri/renderD129 -filter_hw_device vaapi -y -nostats -loglevel quiet -loglevel_plex error -progressurl http://127.0.0.1:32400/video/:/transcode/session/9840b171682a485e-com-plexapp-android/21e3e941-9932-4c73-b54c-2f73316837a6/progress -filter_complex "[0:0]scale=w=1920:h=1080:force_divisible_by=4[0];[0]format=pix_fmts=nv12[1];[1]hwupload[2]" -map "[2]" -metadata:s:0 language=eng -codec:0 h264_vaapi -b:0 20000k -maxrate:0 20000k -bufsize:0 40000k -bsf:0 extract_extradata -r:0 23.975999999999999 -sei:0 -a53_cc -force_key_frames:0 "expr:gte(t,n_forced*1)" -map 0:1 -metadata:s:1 language=eng -codec:1 copy -copypriorss:1 0 -segment_format matroska -f ssegment -individual_header_trailer 0 -flags +global_header -segment_header_filename header -segment_time 1 -segment_start_number 0 -segment_time_delta 0.0625 -segment_list "http://127.0.0.1:32400/video/:/transcode/session/9840b171682a485e-com-plexapp-android/21e3e941-9932-4c73-b54c-2f73316837a6/manifest?X-Plex-Http-Pipeline=infinite" -segment_list_type csv -segment_list_size 5 -segment_list_separate_stream_times 1 -segment_list_unfinished 1 -segment_format_options output_ts_offset=10 -max_delay 5000000 -avoid_negative_ts disabled -map_metadata:g -1 -map_metadata:c -1 -map_chapters -1 "media-%05d.ts"
The device, vaapi:/dev/dri/renderD129, is the correct card:
root@pandorica[~]# lspci | grep 30:00.0
30:00.0 VGA compatible controller: Advanced Micro Devices, Inc. [AMD/ATI] Cezanne [Radeon Vega Series / Radeon Vega Mobile Series] (rev dc)
root@pandorica[~]# ls -l /dev/dri/by-path | grep 129
lrwxrwxrwx 1 root root 13 Nov 23 20:06 pci-0000:30:00.0-render -> ../renderD129
However, playback fails with Intel-specific complaints from VAAPI, mirroring Battlemage errors:
[Req#df6/Transcode/9840b171682a485e-com-plexapp-android/21e3e941-9932-4c73-b54c-2f73316837a6] [AVHWDeviceContext @ 0x7f38fcd6ce40] libva: /config/Library/Application Support/Plex Media Server/Cache/va-dri-linux-x86_64/iHD_drv_video.so init failed
[Req#e11/Transcode/9840b171682a485e-com-plexapp-android/21e3e941-9932-4c73-b54c-2f73316837a6] [AVHWDeviceContext @ 0x7f38fcd6ce40] Failed to initialise VAAPI connection: 18 (invalid parameter).
[Req#e15/Transcode/9840b171682a485e-com-plexapp-android/21e3e941-9932-4c73-b54c-2f73316837a6] Device creation failed: -5.
[Req#e18/Transcode/9840b171682a485e-com-plexapp-android/21e3e941-9932-4c73-b54c-2f73316837a6] Failed to set value 'vaapi=vaapi:' for option 'init_hw_device': I/O error
[Req#e1b/Transcode/9840b171682a485e-com-plexapp-android/21e3e941-9932-4c73-b54c-2f73316837a6] Error parsing global options: I/O error
This seems like a bug - why is it even touching the Arc card (renderD128) enough to fail on initializing it?