Artifacting when using hardware acceleration transcoding with integrated intel graphics

These are two examples of the high CPU usage.

1 Like

I have tested this release since it came out now and was very happy that after months finally a solution for this intel quick sync bug was introduced. Now since the transcoder quality is again where it should be, Plex Media Server does crash several times a day which was never the case before. Checking the log does always show the same picture, it crashes excatly then when Plex starts a trancoding process via intel quick sync. So I think the released fix is fixing the quality issues but introduces new issues with regards to stability.

@Ridley do you think you can check those logs and let me know if you need any additional information?

Oct 10, 2020 23:04:42.377 [12372] DEBUG - [Transcode] Streaming Resource: Calculated bandwidth of 6790kbps exceeds bandwidth limit. Changing decision parameters provided by client to fit bandwidth limit of 4000kbps
Oct 10, 2020 23:04:42.377 [12372] DEBUG - [Transcode] Streaming Resource: Determining preferred transcode encoders through transcode only decision.
Oct 10, 2020 23:04:42.377 [12372] DEBUG - [Transcode] Codecs: testing h264_qsv (encoder)
Oct 10, 2020 23:04:42.378 [12372] DEBUG - [Transcode] Codecs: hardware transcoding: testing API qsv
Oct 10, 2020 23:04:42.382 [12372] ERROR - [Transcode] [FFMPEG] - Failed to create Direct3D device
Oct 10, 2020 23:04:42.382 [12372] DEBUG - [Transcode] Codecs: hardware transcoding: opening hw device failed - probably not supported by this system, error: Unknown error occurred
Oct 10, 2020 23:04:42.382 [12372] DEBUG - [Transcode] Codecs: testing h264_nvenc (encoder)
Oct 10, 2020 23:04:42.383 [12372] DEBUG - [Transcode] Codecs: hardware transcoding: testing API nvenc
Oct 10, 2020 23:04:42.383 [12372] ERROR - [Transcode] [FFMPEG] - Cannot load nvcuda.dll
Oct 10, 2020 23:04:42.383 [12372] ERROR - [Transcode] [FFMPEG] - Could not dynamically load CUDA
Oct 10, 2020 23:04:42.383 [12372] DEBUG - [Transcode] Codecs: hardware transcoding: opening hw device failed - probably not supported by this system, error: Unknown error occurred
Oct 10, 2020 23:04:42.383 [12372] DEBUG - [Transcode] Codecs: testing h264_mf (encoder)
Oct 10, 2020 23:04:42.563 [12372] INFO - [Transcode] [FFMPEG] - MFT name: 'IntelĀ® Quick Sync Video H.264 Encoder MFT'
Oct 10, 2020 23:04:42.670 [5096] DEBUG - Job running: C:\Program Files (x86)\Plex\Plex Media Server\CrashUploader.exe "--directory=C:\Users\p\AppData\Local\Plex Media Server\Crash Reports\1.20.3.3401-ea77aa162" --version=1.20.3.3401-ea77aa162 --platform=Windows "--platformVersion=10.0 (Build 18363)" --serverUuid=f7442421b86d45fa2bc1ca1a7c38857537d85a38 --userId=daniel.jazbec@gmail.com --sentryUrl=https://sentry.io/api/1233455/minidump --sentryKey=xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx --vendor=Microsoft --model=x64 --device=PC --allowRetries=0 
Oct 10, 2020 23:04:42.674 [5096] DEBUG - Jobs: Starting child process with pid 8056
Oct 11, 2020 17:14:43.365 [3708] DEBUG - [Transcode] Streaming Resource: Required bandwidth unknown (media requires deep analysis) Changing decision parameters provided by client to fit bandwidth limit of 4000kbps
Oct 11, 2020 17:14:43.365 [3708] DEBUG - [Transcode] Streaming Resource: Determining preferred transcode encoders through transcode only decision.
Oct 11, 2020 17:14:43.365 [3708] DEBUG - [Transcode] Codecs: testing h264_qsv (encoder)
Oct 11, 2020 17:14:43.366 [3708] DEBUG - [Transcode] Codecs: hardware transcoding: testing API qsv
Oct 11, 2020 17:14:43.368 [3708] ERROR - [Transcode] [FFMPEG] - Failed to create Direct3D device
Oct 11, 2020 17:14:43.369 [3708] DEBUG - [Transcode] Codecs: hardware transcoding: opening hw device failed - probably not supported by this system, error: Unknown error occurred
Oct 11, 2020 17:14:43.369 [3708] DEBUG - [Transcode] Codecs: testing h264_nvenc (encoder)
Oct 11, 2020 17:14:43.369 [3708] DEBUG - [Transcode] Codecs: hardware transcoding: testing API nvenc
Oct 11, 2020 17:14:43.369 [3708] ERROR - [Transcode] [FFMPEG] - Cannot load nvcuda.dll
Oct 11, 2020 17:14:43.369 [3708] ERROR - [Transcode] [FFMPEG] - Could not dynamically load CUDA
Oct 11, 2020 17:14:43.369 [3708] DEBUG - [Transcode] Codecs: hardware transcoding: opening hw device failed - probably not supported by this system, error: Unknown error occurred
Oct 11, 2020 17:14:43.369 [3708] DEBUG - [Transcode] Codecs: testing h264_mf (encoder)
Oct 11, 2020 17:14:43.549 [3708] INFO - [Transcode] [FFMPEG] - MFT name: 'IntelĀ® Quick Sync Video H.264 Encoder MFT'
Oct 11, 2020 17:14:43.624 [12664] DEBUG - Job running: C:\Program Files (x86)\Plex\Plex Media Server\CrashUploader.exe "--directory=C:\Users\p\AppData\Local\Plex Media Server\Crash Reports\1.20.3.3401-ea77aa162" --version=1.20.3.3401-ea77aa162 --platform=Windows "--platformVersion=10.0 (Build 18363)" --serverUuid=f7442421b86d45fa2bc1ca1a7c38857537d85a38 --userId=daniel.jazbec@gmail.com --sentryUrl=https://sentry.io/api/1233455/minidump --sentryKey=xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx --vendor=Microsoft --model=x64 --device=PC --allowRetries=0 
Oct 11, 2020 17:14:43.627 [12664] DEBUG - Jobs: Starting child process with pid 11500

The server does just completely quit after the last line without logging anything else.

There are two known causes of such crashes

  1. Intel driver bugs
  2. Plex Media Server is run as a service or as scheduled task or headless through RDP

See this post which consolidated the information in December 2019

@sa2000 Thanks a lot to pointing me into this direction. Since I am not running Plex Media Server as a service or scheduled task or the like, the only option was the Intel driver. So I checked and my NUC had the ā€œlatestā€ driver installed which was 24.20.100.6286. Interesting that there were no crashes while running Plex Media Server 1.17 but only when I installed 1.20 with the new transcoder fixes. So I was pretty sure this might be still buggy.

Ok, anyway, I wanted to update my Intel drivers. But with the DCH drivers this is not possible since Windows is complaining that the latest drivers are not made for my ā€œoldā€ system. Stupid… finally I found an option to install them anyway! Thanks to this tutorial: https://medium.com/@amitgujar15/fix-for-driver-being-installed-is-not-validated-for-this-computers-issue-install-intel-dch-5e91fea009da

So I am now on the latest drivers, let’s see if that makes things better or not. But at least it is worth a try, thanks again.

I can’t write this comment/question in the consolidated thread since it’s closed, but I thought it would be good to share.
It seems that the RDP connections will use the Intel driver in the correct way if two settings are enabled for the Remote desktop server:

  1. Prioritize H.264/AVC 444 Graphics mode for Remote Desktop connections
  2. Configure H.264/AVC hardware encoding for Remote Desktop Connections

These settings are changed by running gpedit.msc (Win+ R) and then navigating to Computer Configuration -> Administrative Templates -> Windows Components -> Remote Desktop Services -> Remote Desktop Session Host -> Remote Session Environment.

For this to work, both the server and the client needs to support what Microsoft calls AVC 4:4:4, which is the same as RemoteFX. From what I can gather, supported graphics cards include Nvidia 600 and up, AMD 7000 and up, Intel iGPU from Sandy Bridge and up.

Currently, my RDP client computer does not support this, so I can’t try it myself. Can anyone else set this up and try if it solves the crashes when starting PMS via headless RDP?

4 Likes

Yes! Great find. My testing seems to show that working. Thank you.

It fixed the high CPU usage when transcoding. I can now restart my computer, log in using RDP and the GPU does most of the work with a transcode - computer stays nice and quiet.

I only did the first setting (Prioritize H.264) and noticed a big improvement. I’ve also turned on the second setting now (Configure H.264).

1 Like

I’ll test this out later today as well. I have both Nvidia and Intel, though I’ve never had headless/RDP issues with the Nvidia, for whatever reasons. Lots of problems with Intel since they changed the drivers.

Edit: Unfortunately, PMS hard-crashed immediately when trying to transcode HEVC. I’ll fool with it more later.

I may have jumped the gun on this :slightly_frowning_face: I’ve noticed my pc being pretty noisy again when it’s transcoding. It seems to be back to normal behaviour, i.e. it only uses the GPU fully when I restart and log in via the console. I can safely RDP after that and it’s fine. But if I update plex or stop and start plex I need to do it logged into the console.

Is anyone still having artifacting issues with hardware transcoding on 1.21.1.3876? I have a remote Plex client (Fire TV) who is having severe artifacting (he says it looks like an escalator) when I have hardware acceleration enabled. After turning off hardware acceleration, playback is smooth.

I’m on Windows 10; NUC8i5BEH

1 Like

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.