Hello, posting this in the hopes a fresh set of eyeballs. can figure out my problem. I’ve searched the forums and internet extensively and not found another soul with my issue. This leads to believe the problem is on my end, but I suppose it’s possible I found a really strange bug.
Plex refuses to use the hardware decoder only for Live TV when it’s viewed in any Plex App on my server while at the same time using the hardware encoder perfectly fine. For every other media type, hardware decoding and encoding works.
Here’s the summary in at nutshell. I’ve tried this with both an nVidia 3050 and an Intel Arc 310 and even though everything I provide will be from the Arc’s perspective, literally every single thing is the same with the 3050. I fed all this into Chat GPT to help me summarize it and trim down the copious log entries. If you want the full monty though I can provide it.
Environment
-
TrueNAS SCALE 25.10.7
-
Plex installed from the TrueNAS Apps catalog
-
Normal/current PMS version:
-
TrueNAS App version:
1.3.14 -
PMS:
1.43.4.10903-e5521bd8c
-
-
Also tested by rolling the TrueNAS app back to:
- PMS
1.42.2.10156-f737b826c
- PMS
-
Intel Arc A310 dedicated to Plex transcoding
-
A310:
/dev/dri/renderD128 -
Intel iHD VAAPI driver
-
HDHomeRun-compatible tuner
-
The channels are HEVC Main 10, 3840x2160, 50 fps, HDR10/PQ & H.264 High, 1920x1080, 29.97 fps, SDR/BT.709
-
Transcoding was attempted on both down to 1080p & 720p, respectively.
These were all my test results:
Library H.264 file, Library HEVC Main 10, Manual Plex Transcoder against the same Live TV stream via a shell command: VAAPI decode and encode work.
Live TV in the Plex App: Encode words, Decode falls back to software
1. Successful library HEVC Main 10 hardware transcode
I forced a normal HEVC Main 10 library file down to 720p.
Plex’s TPU immediately selected the hardware decoder:
Streaming Resource: Reached Decision ...
Video=(... decision=transcode bitrate=1785 encoder=hevc_vaapi width=1280 height=532)
Starting a transcode session ...
hardware transcoding: using hardware decode accelerator vaapi
hardware transcoding: zero-copy support present
hardware transcoding: using zero-copy transcoding
Using local file path instead of URL:
...Star Trek Strange New Worlds...mkv
Codecs: hardware transcoding: testing API vaapi for device
'/dev/dri/renderD128' (Intel DG2 [Arc A310])
The VAAPI probe sees 10-bit support:
[FFMPEG] - Format 0x3231564e -> nv12.
...
[FFMPEG] - Format 0x30313050 -> p010le.
[FFMPEG] - Format 0x32313050 -> p012le.
...
[FFMPEG] - Created surface 0.
[FFMPEG] - Direct mapping possible.
Preparing driver imd for GPU Intel DG2 [Arc A310]
hardware transcoding: final decoder: vaapi, final encoder: vaapi
The resulting Transcoder command includes the expected hardware-decoder options:
-codec:0 hevc
-hwaccel:0 vaapi
-hwaccel_output_format:0 vaapi
-hwaccel_device:0 vaapi
...
-init_hw_device vaapi=vaapi:/dev/dri/renderD128,driver=iHD
-filter_hw_device vaapi
...
scale_vaapi=w=1280:h=532:format=p010
...
-codec:0 hevc_vaapi
So normal HEVC Main 10 decode/scale/encode on the A310 works correctly.
Live TV HEVC Main 10 does not select a hardware decoder
With the Live TV channel transcoding from 4K HEVC Main 10 to 1080p, Plex makes this decision:
Reached Decision ...
Video=(... decision=transcode bitrate=9327 encoder=hevc_vaapi width=1920 height=1080)
Starting a transcode session ...
hardware transcoding: enabled, but no hardware decode accelerator found
Codecs: hardware transcoding: testing API vaapi for device
'/dev/dri/renderD128' (Intel DG2 [Arc A310])
Interestingly, the subsequent VAAPI initialization still succeeds. Plex sees the same formats including P010, creates a surface, and reports direct mapping support.
But the end result is:
hardware transcoding: final decoder: , final encoder: vaapi
The generated Transcoder command looks like this:
-codec:0 hevc
...
-i "http://127.0.0.1:32400/livetv/sessions/.../index.m3u8?..."
...
-init_hw_device vaapi=vaapi:/dev/dri/renderD128,driver=iHD
-filter_hw_device vaapi
...
-filter_complex
"[0:0]scale=w=1920:h=1080:force_divisible_by=4[0];
[0]format=pix_fmts=nv12[1];
[1]hwupload[2]"
...
-codec:0 hevc_vaapi
There is no:
-hwaccel:0 vaapi
-hwaccel_output_format:0 vaapi
-hwaccel_device:0 vaapi
I have reproduced the same basic behavior with an H.264 Live TV source, so this does not seem to be an HEVC Main 10 limitation.
I also checked whether Plex might simply be making the hardware-decoder decision before it knew what the Live TV source contained.
The Live TV Media object contains:
videoCodec="hevc"
videoResolution="4k"
container="mpegts"
origin="livetv"
protocol="hls"
and the video stream contains:
codec="hevc"
frameRate="50.000"
height="2160"
level="153"
profile="main 10"
width="3840"
displayTitle="4K"
extendedDisplayTitle="4K (HEVC Main 10)"
So Plex does appear to know that this is HEVC Main 10, 3840x2160 at 50 fps.
3. Manually forcing Plex Transcoder to VAAPI-decode the same Live TV source works
To eliminate the HDHR stream itself as the problem, I first ran Plex’s own Plex Transcoder manually against the live stream with:
-hwaccel vaapi
-hwaccel_device /dev/dri/renderD128
-hwaccel_output_format vaapi
That successfully selected hardware decoding.
I then ran the same test against Plex’s own internal Live TV HLS URL:
http://127.0.0.1:32400/livetv/sessions/.../index.m3u8
This is the same internal HLS representation that Plex normally gives the Live TV transcoder.
Plex Transcoder reported:
Selecting decoder 'hevc' because of requested hwaccel method vaapi
It identified the stream correctly:
Stream #0:0:
Video: hevc (Main 10),
yuv420p10le(tv, bt2020nc/bt2020/smpte2084),
3840x2160,
50 fps
The VAAPI stack initialized successfully:
libva: VA-API version 1.22.0
libva: User environment variable requested driver 'iHD'
libva: Trying to open .../iHD_drv_video.so
libva: va_openDriver() returns 0
Initialised VAAPI connection: version 1.22
VAAPI driver: Intel iHD driver for Intel(R) Gen Graphics - 25.2.6
There were several errors immediately after joining the live stream:
Could not find ref with POC 37
Failed to end picture decode issue: 23
hardware accelerator failed to decode picture
Could not find ref with POC 38
...
However, it recovered and continued decoding in VAAPI:
w:3840 h:2160 pixfmt:vaapi
...
Video: wrapped_avframe ... vaapi(...)
The 20-second test completed with:
Output stream #0:0 (video):
988 frames encoded; 988 packets muxed
Input stream #0:0 (video):
1015 packets read
1001 frames decoded
12 decode errors
frame=988
time=00:00:19.98
speed=1.64x
So despite the initial errors from joining the HLS stream, Plex Transcoder was able to hardware-decode essentially the entire test on the A310.
I also tested PMS 1.42.2
Some people have reported issues with the new transcoder in 1.43, so I gave 1.42.2.10156 a try and the behavior was exactly the same.
So that’s what I got, if you want more complete logs or if the robot brain I dumped all this into and asked it to summarize left important details out, please ask.