Plex Nvidia encoder/decoder issues with h265/hvec content

crazycra1g

Cadet
Joined
Dec 16, 2022
Messages
3
Hi there!

I've been going through my media library and using unmanic to encode everything to h265/hvec. I have found that I run into an error when trying to stream this content through the plex web app on a browser, any browser (tried Edge, Chrome, Brave). If I use any one of the various plex client apps it'll downscale and transcode perfectly fine and use hardware transcoding. I'm not sure if this is because of the way that I'm encoding it or because of some issue within Plex, or some issue with how I've "attached" the GPU to the Plex app within TrueNAS Scale

Here is the relevant logs when I attempt to stream the hvec encoded content to a browser: (this constantly repeats with a different POC #)
Jan 12, 2023 18:47:00.805 [0x7ff16ae03b38] ERROR - [Req#2704d0/Transcode/22mg3at80effcm2x3ys3cdwg/239799c1-0bd5-4a63-9061-339a9113868b] [hevc @ 0x7f8897e4aa00] Could not find ref with POC 15
Jan 12, 2023 18:47:00.806 [0x7ff16b209b38] ERROR - [Req#2704d1/Transcode/22mg3at80effcm2x3ys3cdwg/239799c1-0bd5-4a63-9061-339a9113868b] [hevc @ 0x7f8897e4aa00] No decoder surfaces left
Jan 12, 2023 18:47:00.807 [0x7ff16928fb38] ERROR - [Req#2704d2/Transcode/22mg3at80effcm2x3ys3cdwg/239799c1-0bd5-4a63-9061-339a9113868b] [hevc @ 0x7f8897e4aa00] decoder->cvdl->cuvidDecodePicture(decoder->decoder, &ctx->pic_params) failed -> CUDA_ERROR_INVALID_VALUE: invalid argument
Jan 12, 2023 18:47:00.807 [0x7ff169b4fb38] ERROR - [Req#2704d3/Transcode/22mg3at80effcm2x3ys3cdwg/239799c1-0bd5-4a63-9061-339a9113868b] [hevc @ 0x7f8897e4aa00] hardware accelerator failed to decode picture
Jan 12, 2023 18:47:00.808 [0x7ff16ac00b38] ERROR - [Req#2704d4/Transcode/22mg3at80effcm2x3ys3cdwg/239799c1-0bd5-4a63-9061-339a9113868b] Error while decoding stream #0:0: Generic error in an external library

I've tested streaming the h265/hvec content to various clients both inside and outside of my network.

  1. Confirmed hardware transcoding is working when on mobile not on the same network (Plex for Android here)
    1673579624179.png


  2. Confirmed that h264 content gets transcoded just fine on plex client apps (Roku here):
    1673579971177.png


  3. Confirmed h264 content transcodes/direct plays in web browsers (chrome here):
    1673580048492.png
I never receive an error on the client side in the web browser when trying to stream the h265 encoded content, it just spins and spins. Nothing shows on the dashboard either when I try to play the content.

Hardware specs:
TrueNAS SCALE 22.12.0
Dell PowerEdge R720
96GB ECC Ram
24 x 8TB various shucked drives (mostly WD white labels)
8 x 3TB various shucked drives (mostly seagates)
2 x 256GB SSD boot drives (samsung evo 850)
2 x Xeon E5-2640
1 x Nvidia Quadro P5000

For the Plex app itself I'm running the official app from ix-systems and it is up to date.
1673579736339.png


In order to expose the GPU to Plex, I followed this thread here and added the following environment variables to the app:
1673579792300.png

I confirmed with nvidia-smi that Plex is indeed using the GPU to transcode:
1673582499432.png

Looking for guidance on how to get Plex to transcode h265/hvec content when playing from a web browser.
Thanks!
 

crazycra1g

Cadet
Joined
Dec 16, 2022
Messages
3
I have also tried removing the environment variables and using gpu allocation to give the Plex app access to the GPU
1673623424067.png

But I still receive the exact same errors when trying to play h265/hvec encoded content in the web browser client.
 
Top