Hardware transcoding issue

We were testing it on 6617.

I wonder if they decided not to serialize it via the API.

Putting it in Preferences.xml will work and shows up on the FFMPEG command line showing the extra_frames value

From our convo:

curl -X PUT http://192.168.0.20:32400/:/prefs?nvdecExtraFrames=16&X-Plex-Token=$TOKEN

I can’t set it via the API either at this point with newer versions

Interesting. I have shut down PMS, added nvdecExtraFrames="4" to Preferences.xml and started PMS again.

Looking at the Plex Transcoder arguments. I see -extra_hw_frames:#0x01 8. Tested again with different values, restarting PMS in between. No difference in the arguments.

Quadruple verified that the version running is 1.31.1.6617.

  1. Web UI confirms it.
  2. head -n1 'Plex Media Server.log' shows Plex Media Server v1.31.1.6617-cbcbc6f56
  3. dpkg -l shows 1.31.1.6617-cbcbc6f56 installed.
  4. Extracted plexmediaserver_1.31.1.6617-cbcbc6f56_amd64.deb manually on another computer and verified md5sum for Plex Media Server is 2de84cf9801614ec6379993c69f393da from the extracted package. Same as on the server.

What am I missing ?

plexmediaserver-1.31.1.6617-cbcbc6f56

Don’t know at this point.

1.31.1 isn’t out yet so who knows what’s happening with the build.

Internally, 1.31.1.6667 is internal alpha stage 1.31.1.6617 has been superseded and removed

Which version would be best to test it on ?

I need to ask because there are 3 different server builds in flight as I look at our build system.

I see them at different stages but don’t know which fixes are in which at this stage of alpha (developer level).

We take alpha builds, funnel them together to a QA/beta internally.
When that passes, it goes to Plex Pass and eventually Public (barring no show stoppers)

Think of how GitHub works.

Everyone is on their branch with their issue(s).
Alpha builds are those builds.

The QA build is the consolidation of the alpha builds ready to test

If you want your brain completely fried at this mess.

Nvidia drivers - 525.60.13 (from Ubuntu)
P2200 GPU
Any PMS version

Success

I can’t make it fail

Ok. I just checked with 1.31.1.6641 the nvdecExtraFrames is not having any effect. There is no -extra_hw_frames showing up.

So it looks to me like build 6617 has a hardcoded value of 8, and 6641 does not have the fix at all.

I look forwarding to testing it, when it’s actually working on any version :slight_smile:

Ok that’s interesting. Do you know if the same applies to P2000 GPU ?

The very first build did have a hard coded value of 8.
That worked and proved the direction to go in.

That’s correct.

I don’t know if that applies to a P2000.

What I have here (at home)

Ubuntu 20.04.5 LTS (server)
P2200

Any version of PMS I try.

Ok, I will give it a try with P2000 and same Ubuntu & Drivers :slight_smile:

Adjust for maximum

:fire:

1 Like

Hi team, been having this same issue and glad I found this thread!

Unfortunately I can’t downgrade to version-1.29.2.6364 since it doesn’t seem to be compatible with my database and just keeps crashing the PMS when launching.

@bolex17

Current Plex Media Server version?
Platform / OS?
Current Nvidia driver version?

If available, upload a set of debug level server log files.

Can you provide additional details on “crashing”? Plex will not run, it runs but you receive an error message, etc?

In the ffmpeg tests I did, I need to have at least 9 -extra_hw_frames. Eight is not enough with a [NVIDIA GeForce GTX 1050 Ti]. Tried different driver version; now on [ Driver Version: 515.86.01 CUDA Version: 11.7]

You could try to get the DB as clean as possible ==> optimise DB and clean bundles before downgrading
I downgraded from plexmediaserver_1.31.1.6617-cbcbc6f56_amd64.deb to 1.29.2.6364

PMS Version - Version 1.30.2.6563, tried to downgrade to 1.29.2.6364 via Docker.
OS - Ubuntu 20.04
NVIDIA Driver Version - Driver Version: 510.108.03 CUDA Version: 11.6

Plex will migrate the database but will then crash.

Have attached log files.

Plex Media Server.5.log (70.6 KB)

Edit: Nevermind - managed to restore an older database file and do the downgrade! Thanks everyone.

@pozunmv @ChuckPa
Did some more testing with standard ffmpeg
When using extra frames [[ffmpeg -hwaccel cuda -hwaccel_output_format cuda -extra_hw_frames 9]] … it actually triggers an error(see below) which results in a lots of cpu threads being active and my sample file uses GPU_mem[nvtop] 5-6% GPU 6 (speed 7.xxX) and multiple processes using cpu of which one at 160%. (as per htop)

Building on what pozunmv suggested >> using the auto output_format but with hwaccel cuda [ffmpeg -hwaccel cuda -hwaccel_output_format auto -i input.mkv -c:v h264_nvenc -preset slow output.mp4] transcodes the file without any problem and loads the GPU_mem by 11% GPU 11%using 1 cpu thread at 100% [from the 50+ processes that are created] and speed 7.xxX

It doesn’t look to me the extra hw frames are actually addressing the actual problem but trigger a cuda initialisation error. Using the -hwaccel_output_format auto works and looks to be more effective in using the GPU vs the CPU.

----edit----
when lowering the threads and not triggering the error the hw_frames are not helping (>>No decoder surfaces left<<)[[ffmpeg -hwaccel cuda -hwaccel_output_format cuda -extra_hw_frames 9 -threads 1 -i input.mkv -c:v h264_nvenc -preset slow output.mp4]] adding more the evidence that the extra frames are not addressing the real problem.

==============================================
error with extra frames===>
[hevc @ 0x55772f2d4500] decoder->cvdl->cuvidCreateDecoder(&decoder->decoder, params) failed → CUDA_ERROR_INVALID_VALUE: invalid argument
[hevc @ 0x55772f2d4500] Using more than 32 (33) decode surfaces might cause nvdec to fail.
[hevc @ 0x55772f2d4500] Try lowering the amount of threads. Using 16 right now.
[hevc @ 0x55772f2d4500] Failed setup for format cuda: hwaccel initialisation returned error.
<===

when using auto ===>
[hevc @ 0x55d1540389c0] nal_unit_type: 32(VPS), nuh_layer_id: 0, temporal_id: 0
[hevc @ 0x55d1540389c0] Decoding VPS
[hevc @ 0x55d1540389c0] Main 10 profile bitstream
[hevc @ 0x55d1540389c0] nal_unit_type: 33(SPS), nuh_layer_id: 0, temporal_id: 0
[hevc @ 0x55d1540389c0] Decoding SPS
[hevc @ 0x55d1540389c0] Main 10 profile bitstream
[hevc @ 0x55d1540389c0] Decoding VUI
[hevc @ 0x55d1540389c0] nal_unit_type: 34(PPS), nuh_layer_id: 0, temporal_id: 0
[hevc @ 0x55d1540389c0] Decoding PPS
Stream mapping:
Stream #0:0#0:0 (hevc (native) → h264 (h264_nvenc))

[graph 0 input from stream 0:0 @ 0x55d153f07880] Setting ‘video_size’ to value ‘1920x1080’
[graph 0 input from stream 0:0 @ 0x55d153f07880] Setting ‘pix_fmt’ to value ‘23’
[graph 0 input from stream 0:0 @ 0x55d153f07880] Setting ‘time_base’ to value ‘1/1000’
[graph 0 input from stream 0:0 @ 0x55d153f07880] Setting ‘pixel_aspect’ to value ‘1/1’
[graph 0 input from stream 0:0 @ 0x55d153f07880] Setting ‘frame_rate’ to value ‘24/1’
[graph 0 input from stream 0:0 @ 0x55d153f07880] w:1920 h:1080 pixfmt:nv12 tb:1/1000 fr:24/1 sar:1/1
[format @ 0x55d15580b400] Setting ‘pix_fmts’ to value ‘yuv420p|nv12|p010le|yuv444p|p016le|yuv444p16le|bgr0|rgb0|cuda’
[AVFilterGraph @ 0x55d1552be1c0] query_formats: 4 queried, 3 merged, 0 already done, 0 delayed
[h264_nvenc @ 0x55d153bbbe80] Using device cuda0 (type cuda) with h264_nvenc encoder.
[h264_nvenc @ 0x55d153bbbe80] Loaded lib: libcuda.so.1

[h264_nvenc @ 0x55d153bbbe80] Loaded sym: cuEGLStreamProducerReturnFrame
[h264_nvenc @ 0x55d153bbbe80] Loaded lib: libnvidia-encode.so.1
[h264_nvenc @ 0x55d153bbbe80] Loaded sym: NvEncodeAPICreateInstance
[h264_nvenc @ 0x55d153bbbe80] Loaded sym: NvEncodeAPIGetMaxSupportedVersion
[h264_nvenc @ 0x55d153bbbe80] Loaded Nvenc version 11.1
[h264_nvenc @ 0x55d153bbbe80] Nvenc initialized successfully
[h264_nvenc @ 0x55d153bbbe80] Lookahead enabled: depth 28, scenecut enabled, B-adapt enabled.
<===

Just spotted that 1.29.2.6364 is using nvdec ; is that’s why it’s working with that release? [[[-hwaccel:0 nvdec -hwaccel_fallback_threshold:0 10 -threads:0 1 -hwaccel_device:0 cuda -]]

ps: as posted cuda with output auto is also working [-hwaccel cuda -hwaccel_output_format auto]

update to be complete ===== using cuvid iso nvdec is also working (alternative frame handling)

ffmpeg -hwaccel cuvid -hwaccel_output_format cuvid -i input.mkv -c:v h264_nvenc -preset slow output.mp4

@ChuckPa I have changed up how I was testing the nvdecExtraFrames to capture the command that is being executed by plex. I have tested plexmediaserver-1.31.0.6654-02189b09f.x86_64.rpm which doesnt show the extra frames being passed at all, and then I see with plexmediaserver-1.31.1.6617-cbcbc6f56.x86_64.rpm that extra frames are present but appear to be hardcoded to 8. Also note the output also includes the Prefences value as well. Can you please let me know how I can test, what version that is and where can I get it, that would allow me to manually have that value set by the nvdecExtraFrames settings in the Preferences file.

Running: plexmediaserver-1.31.1.6617-cbcbc6f56.x86_64.rpm

[root@pozunflix pozunmv]# grep -hoe 'nvdecExtraFrames=.*' /var/lib/plexmediaserver/Library/Application\ Support/Plex\ Media\ Server/Preferences.xml; ps aux |grep cuda | grep -v grep; nvidia-smi; tail -10 /var/lib/plexmediaserver/Library/Application\ Support/Plex\ Media\ Server/Logs/Plex\ Media\ Server.log
nvdecExtraFrames="1"/>
plex      639488 15.5  1.2 5275772 397544 ?      Sl   08:42   0:00 /usr/lib/plexmediaserver/Plex Transcoder -codec:0 hevc -hwaccel:0 nvdec -hwaccel_fallback_threshold:0 10 -threads:0 1 -extra_hw_frames:0 8 -hwaccel_output_format:0 cuda -hwaccel_device:0 cuda -analyzeduration 20000000 -probesize 20000000 -i /srv/ftp/movies/test/jellyfish-30-mbps-hd-hevc.mkv -filter_complex [0:0]hwupload[0];[0]scale_cuda=w=1920:h=1080:format=nv12[1] -map [1] -codec:0 h264_nvenc -b:0 20000k -preset:0 hq -forced-idr:0 1 -r:0 29.969999999999999 -force_key_frames:0 expr:gte(t,n_forced*3) -f dash -seg_duration 3 -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/uquax5a0j5cc4tyb686lo6p2/37297ba2-d2b4-4ce3-993d-937056a0e6f3/manifest?X-Plex-Http-Pipeline=infinite -avoid_negative_ts disabled -map_metadata -1 -map_chapters -1 dash -start_at_zero -copyts -vsync cfr -init_hw_device cuda=cuda: -filter_hw_device cuda -y -nostats -loglevel quiet -loglevel_plex error -progressurl http://127.0.0.1:32400/video/:/transcode/session/uquax5a0j5cc4tyb686lo6p2/37297ba2-d2b4-4ce3-993d-937056a0e6f3/progress
Sat Feb 11 08:42:40 2023       
+-----------------------------------------------------------------------------+
| NVIDIA-SMI 525.89.02    Driver Version: 525.89.02    CUDA Version: 12.0     |
|-------------------------------+----------------------+----------------------+
| GPU  Name        Persistence-M| Bus-Id        Disp.A | Volatile Uncorr. ECC |
| Fan  Temp  Perf  Pwr:Usage/Cap|         Memory-Usage | GPU-Util  Compute M. |
|                               |                      |               MIG M. |
|===============================+======================+======================|
|   0  NVIDIA GeForce ...  Off  | 00000000:01:00.0 Off |                  N/A |
|  0%   44C    P0    46W / 130W |    296MiB /  6144MiB |      2%      Default |
|                               |                      |                  N/A |
+-------------------------------+----------------------+----------------------+
                                                                               
+-----------------------------------------------------------------------------+
| Processes:                                                                  |
|  GPU   GI   CI        PID   Type   Process name                  GPU Memory |
|        ID   ID                                                   Usage      |
|=============================================================================|
|    0   N/A  N/A    639488      C   ...diaserver/Plex Transcoder      292MiB |
+-----------------------------------------------------------------------------+
Feb 11, 2023 08:42:38.134 [0x7f909db5fb38] ERROR - [Req#c95/Transcode/uquax5a0j5cc4tyb686lo6p2/37297ba2-d2b4-4ce3-993d-937056a0e6f3] Error while decoding stream #0:0: Generic error in an external library
Feb 11, 2023 08:42:38.134 [0x7f909db5fb38] ERROR - [Req#c96/Transcode/uquax5a0j5cc4tyb686lo6p2/37297ba2-d2b4-4ce3-993d-937056a0e6f3] [hevc @ 0x7f6458044240] Could not find ref with POC 897
Feb 11, 2023 08:42:38.135 [0x7f909db5fb38] ERROR - [Req#c97/Transcode/uquax5a0j5cc4tyb686lo6p2/37297ba2-d2b4-4ce3-993d-937056a0e6f3] [hevc @ 0x7f6458044240] No decoder surfaces left
Feb 11, 2023 08:42:38.135 [0x7f909db5fb38] ERROR - [Req#c98/Transcode/uquax5a0j5cc4tyb686lo6p2/37297ba2-d2b4-4ce3-993d-937056a0e6f3] [hevc @ 0x7f6458044240] decoder->cvdl->cuvidDecodePicture(decoder->decoder, &ctx->pic_params) failed -> CUDA_ERROR_INVALID_VALUE: invalid argument
Feb 11, 2023 08:42:38.135 [0x7f909db5fb38] ERROR - [Req#c99/Transcode/uquax5a0j5cc4tyb686lo6p2/37297ba2-d2b4-4ce3-993d-937056a0e6f3] [hevc @ 0x7f6458044240] hardware accelerator failed to decode picture
Feb 11, 2023 08:42:38.135 [0x7f909db5fb38] ERROR - [Req#c9a/Transcode/uquax5a0j5cc4tyb686lo6p2/37297ba2-d2b4-4ce3-993d-937056a0e6f3] Error while decoding stream #0:0: Generic error in an external library
Feb 11, 2023 08:42:38.135 [0x7f909db5fb38] ERROR - [Req#c9b/Transcode/uquax5a0j5cc4tyb686lo6p2/37297ba2-d2b4-4ce3-993d-937056a0e6f3] [hevc @ 0x7f6458044240] No decoder surfaces left
Feb 11, 2023 08:42:38.135 [0x7f909db5fb38] ERROR - [Req#c9c/Transcode/uquax5a0j5cc4tyb686lo6p2/37297ba2-d2b4-4ce3-993d-937056a0e6f3] [hevc @ 0x7f6458044240] decoder->cvdl->cuvidDecodePicture(decoder->decoder, &ctx->pic_params) failed -> CUDA_ERROR_INVALID_VALUE: invalid argument
Feb 11, 2023 08:42:38.135 [0x7f909db5fb38] ERROR - [Req#c9d/Transcode/uquax5a0j5cc4tyb686lo6p2/37297ba2-d2b4-4ce3-993d-937056a0e6f3] [hevc @ 0x7f6458044240] hardware accelerator failed to decode picture
Feb 11, 2023 08:42:38.136 [0x7f909db5fb38] ERROR - [Req#c9e/Transcode/uquax5a0j5cc4tyb686lo6p2/37297ba2-d2b4-4ce3-993d-937056a0e6f3] Error while decoding stream #0:0: Generic error in an external library

[root@pozunflix pozunmv]# grep -hoe 'nvdecExtraFrames=.*' /var/lib/plexmediaserver/Library/Application\ Support/Plex\ Media\ Server/Preferences.xml; ps aux |grep cuda | grep -v grep; nvidia-smi; tail -10 /var/lib/plexmediaserver/Library/Application\ Support/Plex\ Media\ Server/Logs/Plex\ Media\ Server.log
nvdecExtraFrames="2"/>
plex      640077 36.0  1.2 5277324 398620 ?      Sl   08:45   0:00 /usr/lib/plexmediaserver/Plex Transcoder -codec:0 hevc -hwaccel:0 nvdec -hwaccel_fallback_threshold:0 10 -threads:0 1 -extra_hw_frames:0 8 -hwaccel_output_format:0 cuda -hwaccel_device:0 cuda -analyzeduration 20000000 -probesize 20000000 -i /srv/ftp/movies/test/jellyfish-30-mbps-hd-hevc.mkv -filter_complex [0:0]hwupload[0];[0]scale_cuda=w=1920:h=1080:format=nv12[1] -map [1] -codec:0 h264_nvenc -b:0 20000k -preset:0 hq -forced-idr:0 1 -r:0 29.969999999999999 -force_key_frames:0 expr:gte(t,n_forced*3) -f dash -seg_duration 3 -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/q6aewj8cz25bs6klp3qutkto/a7ebdcdd-1408-4a58-979a-3b8bbd97cacc/manifest?X-Plex-Http-Pipeline=infinite -avoid_negative_ts disabled -map_metadata -1 -map_chapters -1 dash -start_at_zero -copyts -vsync cfr -init_hw_device cuda=cuda: -filter_hw_device cuda -y -nostats -loglevel quiet -loglevel_plex error -progressurl http://127.0.0.1:32400/video/:/transcode/session/q6aewj8cz25bs6klp3qutkto/a7ebdcdd-1408-4a58-979a-3b8bbd97cacc/progress
Sat Feb 11 08:45:22 2023       
+-----------------------------------------------------------------------------+
| NVIDIA-SMI 525.89.02    Driver Version: 525.89.02    CUDA Version: 12.0     |
|-------------------------------+----------------------+----------------------+
| GPU  Name        Persistence-M| Bus-Id        Disp.A | Volatile Uncorr. ECC |
| Fan  Temp  Perf  Pwr:Usage/Cap|         Memory-Usage | GPU-Util  Compute M. |
|                               |                      |               MIG M. |
|===============================+======================+======================|
|   0  NVIDIA GeForce ...  Off  | 00000000:01:00.0 Off |                  N/A |
|  0%   43C    P0    30W / 130W |    296MiB /  6144MiB |      2%      Default |
|                               |                      |                  N/A |
+-------------------------------+----------------------+----------------------+
                                                                               
+-----------------------------------------------------------------------------+
| Processes:                                                                  |
|  GPU   GI   CI        PID   Type   Process name                  GPU Memory |
|        ID   ID                                                   Usage      |
|=============================================================================|
|    0   N/A  N/A    640077      C   ...diaserver/Plex Transcoder      292MiB |
+-----------------------------------------------------------------------------+
Feb 11, 2023 08:45:22.243 [0x7f10736ccb38] ERROR - [Req#175c/Transcode/q6aewj8cz25bs6klp3qutkto/a7ebdcdd-1408-4a58-979a-3b8bbd97cacc] Error while decoding stream #0:0: Generic error in an external library
Feb 11, 2023 08:45:22.243 [0x7f10736ccb38] ERROR - [Req#175d/Transcode/q6aewj8cz25bs6klp3qutkto/a7ebdcdd-1408-4a58-979a-3b8bbd97cacc] [hevc @ 0x7f2a66a88240] Could not find ref with POC 897
Feb 11, 2023 08:45:22.244 [0x7f10736ccb38] ERROR - [Req#175e/Transcode/q6aewj8cz25bs6klp3qutkto/a7ebdcdd-1408-4a58-979a-3b8bbd97cacc] [hevc @ 0x7f2a66a88240] No decoder surfaces left
Feb 11, 2023 08:45:22.244 [0x7f10736ccb38] ERROR - [Req#175f/Transcode/q6aewj8cz25bs6klp3qutkto/a7ebdcdd-1408-4a58-979a-3b8bbd97cacc] [hevc @ 0x7f2a66a88240] decoder->cvdl->cuvidDecodePicture(decoder->decoder, &ctx->pic_params) failed -> CUDA_ERROR_INVALID_VALUE: invalid argument
Feb 11, 2023 08:45:22.244 [0x7f10736ccb38] ERROR - [Req#1760/Transcode/q6aewj8cz25bs6klp3qutkto/a7ebdcdd-1408-4a58-979a-3b8bbd97cacc] [hevc @ 0x7f2a66a88240] hardware accelerator failed to decode picture
Feb 11, 2023 08:45:22.244 [0x7f10736ccb38] ERROR - [Req#1761/Transcode/q6aewj8cz25bs6klp3qutkto/a7ebdcdd-1408-4a58-979a-3b8bbd97cacc] Error while decoding stream #0:0: Generic error in an external library
Feb 11, 2023 08:45:22.244 [0x7f10736ccb38] ERROR - [Req#1762/Transcode/q6aewj8cz25bs6klp3qutkto/a7ebdcdd-1408-4a58-979a-3b8bbd97cacc] [hevc @ 0x7f2a66a88240] No decoder surfaces left
Feb 11, 2023 08:45:22.244 [0x7f10736ccb38] ERROR - [Req#1763/Transcode/q6aewj8cz25bs6klp3qutkto/a7ebdcdd-1408-4a58-979a-3b8bbd97cacc] [hevc @ 0x7f2a66a88240] decoder->cvdl->cuvidDecodePicture(decoder->decoder, &ctx->pic_params) failed -> CUDA_ERROR_INVALID_VALUE: invalid argument
Feb 11, 2023 08:45:22.244 [0x7f10736ccb38] ERROR - [Req#1764/Transcode/q6aewj8cz25bs6klp3qutkto/a7ebdcdd-1408-4a58-979a-3b8bbd97cacc] [hevc @ 0x7f2a66a88240] hardware accelerator failed to decode picture
Feb 11, 2023 08:45:22.244 [0x7f10736ccb38] ERROR - [Req#1765/Transcode/q6aewj8cz25bs6klp3qutkto/a7ebdcdd-1408-4a58-979a-3b8bbd97cacc] Error while decoding stream #0:0: Generic error in an external library


[root@pozunflix pozunmv]# grep -hoe 'nvdecExtraFrames=.*' /var/lib/plexmediaserver/Library/Application\ Support/Plex\ Media\ Server/Preferences.xml; ps aux |grep cuda | grep -v grep; nvidia-smi; tail -10 /var/lib/plexmediaserver/Library/Application\ Support/Plex\ Media\ Server/Logs/Plex\ Media\ Server.log
nvdecExtraFrames="32"/>
plex      640448 38.0  1.2 5278432 399456 ?      Sl   08:47   0:00 /usr/lib/plexmediaserver/Plex Transcoder -codec:0 hevc -hwaccel:0 nvdec -hwaccel_fallback_threshold:0 10 -threads:0 1 -extra_hw_frames:0 8 -hwaccel_output_format:0 cuda -hwaccel_device:0 cuda -analyzeduration 20000000 -probesize 20000000 -i /srv/ftp/movies/test/jellyfish-30-mbps-hd-hevc.mkv -filter_complex [0:0]hwupload[0];[0]scale_cuda=w=1920:h=1080:format=nv12[1] -map [1] -codec:0 h264_nvenc -b:0 20000k -preset:0 hq -forced-idr:0 1 -r:0 29.969999999999999 -force_key_frames:0 expr:gte(t,n_forced*3) -f dash -seg_duration 3 -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/62cou4lq3bb5mudee2yvfh1a/6c6c6069-5e75-49c9-95dc-e21023d319b3/manifest?X-Plex-Http-Pipeline=infinite -avoid_negative_ts disabled -map_metadata -1 -map_chapters -1 dash -start_at_zero -copyts -vsync cfr -init_hw_device cuda=cuda: -filter_hw_device cuda -y -nostats -loglevel quiet -loglevel_plex error -progressurl http://127.0.0.1:32400/video/:/transcode/session/62cou4lq3bb5mudee2yvfh1a/6c6c6069-5e75-49c9-95dc-e21023d319b3/progress
Sat Feb 11 08:47:02 2023       
+-----------------------------------------------------------------------------+
| NVIDIA-SMI 525.89.02    Driver Version: 525.89.02    CUDA Version: 12.0     |
|-------------------------------+----------------------+----------------------+
| GPU  Name        Persistence-M| Bus-Id        Disp.A | Volatile Uncorr. ECC |
| Fan  Temp  Perf  Pwr:Usage/Cap|         Memory-Usage | GPU-Util  Compute M. |
|                               |                      |               MIG M. |
|===============================+======================+======================|
|   0  NVIDIA GeForce ...  Off  | 00000000:01:00.0 Off |                  N/A |
|  0%   44C    P0    34W / 130W |    296MiB /  6144MiB |      1%      Default |
|                               |                      |                  N/A |
+-------------------------------+----------------------+----------------------+
                                                                               
+-----------------------------------------------------------------------------+
| Processes:                                                                  |
|  GPU   GI   CI        PID   Type   Process name                  GPU Memory |
|        ID   ID                                                   Usage      |
|=============================================================================|
|    0   N/A  N/A    640448      C   ...diaserver/Plex Transcoder      292MiB |
+-----------------------------------------------------------------------------+
Feb 11, 2023 08:47:02.615 [0x7f78893ffb38] ERROR - [Req#b94/Transcode/62cou4lq3bb5mudee2yvfh1a/6c6c6069-5e75-49c9-95dc-e21023d319b3] Error while decoding stream #0:0: Generic error in an external library
Feb 11, 2023 08:47:02.616 [0x7f78893ffb38] ERROR - [Req#b95/Transcode/62cou4lq3bb5mudee2yvfh1a/6c6c6069-5e75-49c9-95dc-e21023d319b3] [hevc @ 0x7f230f5d9240] Could not find ref with POC 897
Feb 11, 2023 08:47:02.616 [0x7f78893ffb38] ERROR - [Req#b96/Transcode/62cou4lq3bb5mudee2yvfh1a/6c6c6069-5e75-49c9-95dc-e21023d319b3] [hevc @ 0x7f230f5d9240] No decoder surfaces left
Feb 11, 2023 08:47:02.616 [0x7f78893ffb38] ERROR - [Req#b97/Transcode/62cou4lq3bb5mudee2yvfh1a/6c6c6069-5e75-49c9-95dc-e21023d319b3] [hevc @ 0x7f230f5d9240] decoder->cvdl->cuvidDecodePicture(decoder->decoder, &ctx->pic_params) failed -> CUDA_ERROR_INVALID_VALUE: invalid argument
Feb 11, 2023 08:47:02.616 [0x7f78893ffb38] ERROR - [Req#b98/Transcode/62cou4lq3bb5mudee2yvfh1a/6c6c6069-5e75-49c9-95dc-e21023d319b3] [hevc @ 0x7f230f5d9240] hardware accelerator failed to decode picture
Feb 11, 2023 08:47:02.616 [0x7f78893ffb38] ERROR - [Req#b99/Transcode/62cou4lq3bb5mudee2yvfh1a/6c6c6069-5e75-49c9-95dc-e21023d319b3] Error while decoding stream #0:0: Generic error in an external library
Feb 11, 2023 08:47:02.617 [0x7f78893ffb38] ERROR - [Req#b9a/Transcode/62cou4lq3bb5mudee2yvfh1a/6c6c6069-5e75-49c9-95dc-e21023d319b3] [hevc @ 0x7f230f5d9240] No decoder surfaces left
Feb 11, 2023 08:47:02.617 [0x7f78893ffb38] ERROR - [Req#b9b/Transcode/62cou4lq3bb5mudee2yvfh1a/6c6c6069-5e75-49c9-95dc-e21023d319b3] [hevc @ 0x7f230f5d9240] decoder->cvdl->cuvidDecodePicture(decoder->decoder, &ctx->pic_params) failed -> CUDA_ERROR_INVALID_VALUE: invalid argument
Feb 11, 2023 08:47:02.617 [0x7f78893ffb38] ERROR - [Req#b9c/Transcode/62cou4lq3bb5mudee2yvfh1a/6c6c6069-5e75-49c9-95dc-e21023d319b3] [hevc @ 0x7f230f5d9240] hardware accelerator failed to decode picture
Feb 11, 2023 08:47:02.617 [0x7f78893ffb38] ERROR - [Req#b9d/Transcode/62cou4lq3bb5mudee2yvfh1a/6c6c6069-5e75-49c9-95dc-e21023d319b3] Error while decoding stream #0:0: Generic error in an external library

Running: plexmediaserver-1.31.0.6654-02189b09f.x86_64.rpm

[root@pozunflix pozunmv]# grep -hoe 'nvdecExtraFrames=.*' /var/lib/plexmediaserver/Library/Application\ Support/Plex\ Media\ Server/Preferences.xml; ps aux |grep cuda | grep -v grep; nvidia-smi; tail -10 /var/lib/plexmediaserver/Library/Application\ Support/Plex\ Media\ Server/Logs/Plex\ Media\ Server.log
nvdecExtraFrames="32"/>
plex      640864 23.5  1.2 5275764 397668 ?      Sl   08:48   0:00 /usr/lib/plexmediaserver/Plex Transcoder -codec:0 hevc -hwaccel:0 nvdec -hwaccel_fallback_threshold:0 10 -threads:0 1 -extra_hw_frames:0 8 -hwaccel_output_format:0 cuda -hwaccel_device:0 cuda -analyzeduration 20000000 -probesize 20000000 -i /srv/ftp/movies/test/jellyfish-30-mbps-hd-hevc.mkv -filter_complex [0:0]hwupload[0];[0]scale_cuda=w=1920:h=1080:format=nv12[1] -map [1] -codec:0 h264_nvenc -b:0 20000k -preset:0 hq -forced-idr:0 1 -r:0 29.969999999999999 -force_key_frames:0 expr:gte(t,n_forced*3) -f dash -seg_duration 3 -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/6vt223fzg6e5vviqes0eoi8q/c897846c-d569-46fd-9fe2-799d8a621ced/manifest?X-Plex-Http-Pipeline=infinite -avoid_negative_ts disabled -map_metadata -1 -map_chapters -1 dash -start_at_zero -copyts -vsync cfr -init_hw_device cuda=cuda: -filter_hw_device cuda -y -nostats -loglevel quiet -loglevel_plex error -progressurl http://127.0.0.1:32400/video/:/transcode/session/6vt223fzg6e5vviqes0eoi8q/c897846c-d569-46fd-9fe2-799d8a621ced/progress
Sat Feb 11 08:48:53 2023       
+-----------------------------------------------------------------------------+
| NVIDIA-SMI 525.89.02    Driver Version: 525.89.02    CUDA Version: 12.0     |
|-------------------------------+----------------------+----------------------+
| GPU  Name        Persistence-M| Bus-Id        Disp.A | Volatile Uncorr. ECC |
| Fan  Temp  Perf  Pwr:Usage/Cap|         Memory-Usage | GPU-Util  Compute M. |
|                               |                      |               MIG M. |
|===============================+======================+======================|
|   0  NVIDIA GeForce ...  Off  | 00000000:01:00.0 Off |                  N/A |
|  0%   45C    P0    47W / 130W |    296MiB /  6144MiB |      1%      Default |
|                               |                      |                  N/A |
+-------------------------------+----------------------+----------------------+
                                                                               
+-----------------------------------------------------------------------------+
| Processes:                                                                  |
|  GPU   GI   CI        PID   Type   Process name                  GPU Memory |
|        ID   ID                                                   Usage      |
|=============================================================================|
|    0   N/A  N/A    640864      C   ...diaserver/Plex Transcoder      292MiB |
+-----------------------------------------------------------------------------+
Feb 11, 2023 08:48:53.210 [0x7fb037900b38] ERROR - [Req#b8e/Transcode/6vt223fzg6e5vviqes0eoi8q/c897846c-d569-46fd-9fe2-799d8a621ced] [hevc @ 0x7f841f6d0240] Could not find ref with POC 897
Feb 11, 2023 08:48:53.211 [0x7fb037900b38] ERROR - [Req#b8f/Transcode/6vt223fzg6e5vviqes0eoi8q/c897846c-d569-46fd-9fe2-799d8a621ced] [hevc @ 0x7f841f6d0240] No decoder surfaces left
Feb 11, 2023 08:48:53.211 [0x7fb037900b38] ERROR - [Req#b90/Transcode/6vt223fzg6e5vviqes0eoi8q/c897846c-d569-46fd-9fe2-799d8a621ced] [hevc @ 0x7f841f6d0240] decoder->cvdl->cuvidDecodePicture(decoder->decoder, &ctx->pic_params) failed -> CUDA_ERROR_INVALID_VALUE: invalid argument
Feb 11, 2023 08:48:53.211 [0x7fb037900b38] ERROR - [Req#b91/Transcode/6vt223fzg6e5vviqes0eoi8q/c897846c-d569-46fd-9fe2-799d8a621ced] [hevc @ 0x7f841f6d0240] hardware accelerator failed to decode picture
Feb 11, 2023 08:48:53.211 [0x7fb037900b38] ERROR - [Req#b92/Transcode/6vt223fzg6e5vviqes0eoi8q/c897846c-d569-46fd-9fe2-799d8a621ced] Error while decoding stream #0:0: Generic error in an external library
Feb 11, 2023 08:48:53.211 [0x7fb037900b38] ERROR - [Req#b93/Transcode/6vt223fzg6e5vviqes0eoi8q/c897846c-d569-46fd-9fe2-799d8a621ced] [hevc @ 0x7f841f6d0240] No decoder surfaces left
Feb 11, 2023 08:48:53.212 [0x7fb037900b38] ERROR - [Req#b94/Transcode/6vt223fzg6e5vviqes0eoi8q/c897846c-d569-46fd-9fe2-799d8a621ced] [hevc @ 0x7f841f6d0240] decoder->cvdl->cuvidDecodePicture(decoder->decoder, &ctx->pic_params) failed -> CUDA_ERROR_INVALID_VALUE: invalid argument
Feb 11, 2023 08:48:53.212 [0x7fb037900b38] ERROR - [Req#b95/Transcode/6vt223fzg6e5vviqes0eoi8q/c897846c-d569-46fd-9fe2-799d8a621ced] [hevc @ 0x7f841f6d0240] hardware accelerator failed to decode picture
Feb 11, 2023 08:48:53.212 [0x7fb037900b38] ERROR - [Req#b96/Transcode/6vt223fzg6e5vviqes0eoi8q/c897846c-d569-46fd-9fe2-799d8a621ced] Error while decoding stream #0:0: Generic error in an external library
Feb 11, 2023 08:48:53.334 [0x7fb039d32b38] ERROR - Unknown metadata type: