Plex isnt HW-transcoding for some reason

server-windows

#1

Im running PMS 1.13.0.5023-31d3c0c65 on Windows 10 Pro on a Intel NUC 7I7BNH.

It's got an Intel I7-7567U that has all the requrements needed.
https://ark.intel.com/products/97541/Intel-Core-i7-7567U-Processor-4M-Cache-up-to-4_00-GHz

That CPU has the Intel® Iris™ Plus Graphics 650 that can do both HW decoding and encoding of X265 video.
https://en.wikichip.org/wiki/intel/iris_plus_graphics_650

The drivers for the "GPU" are the latest available from intels own download center (version 24.20.100.6025).

The BIOS is updated to the latest one (BNKBL357.86A, version 0063).

I have checked the box in PMS settings that says "use hardware acceleration when available".

But when starting a HEVC movie/show it just starts to transcode it using the CPU instead of the GPU.

Why is that? Someone has any suggestions?

EDIT:

Actually i was wrong about the drivers for the GPU part.
I had installed the latest drivers from Windows Update for some reason.
After installing the latest drivers from Intel download center, PMS reported (hw) for both parts. But the CPU is still at 100% and the GPU is hardly working at all. And if that wasnt enough, the video never starts playing. Its just loading for a long time, then crashes.


#2

I’d really hope that someone had something to say that helped. :frowning:
Would be greatly appreciated. I think i have to move to some other software if i cant make this to work and i really like to stay with Plex.


#3

getting server logs during one of these transcodes and processor % usage figures / screenshots would be a start to look into this

ensure debug logging enabled
See https://support.plex.tv/articles/201643703-reporting-issues-with-plex-media-server/

restart the server anyway to get fresh logs created

do a test and capture the processing usage figures / screenshots and server logs
https://support.plex.tv/articles/200250417-plex-media-server-log-files/


#4

@sa2000
Ok, so heres the screenshots and some logs (attatched).

CPU Load when HW-transcoding.

Image of the status in Plex Web App, when HW-transcoding.


#5

@mjewl said:
@sa2000
Ok, so heres the screenshots and some logs (attatched).

CPU Load when HW-transcoding.

Image of the status in Plex Web App, when HW-transcoding.

Thanks - could you tell me the times these screenshots were captured so I can relate to the contents of the logs


#6

Looks like getting an error and switching to software

May 14, 2018 18:51:35.919 [1304] DEBUG - TPU: hardware transcoding: using hardware decode accelerator dxva2
May 14, 2018 18:51:35.919 [1304] DEBUG - [Universal] Using local file path instead of URL: V:\UHD\Get.Out.2017.2160p.Remux.HEVC.DTS-X-7.1-CapBd\Get.Out.2017.2160p.Remux.HEVC.DTS-X-7.1-CapBd.mkv
May 14, 2018 18:51:35.919 [1304] DEBUG - TPU: hardware transcoding: zero-copy support not present
May 14, 2018 18:51:35.919 [1304] DEBUG - TPU: hardware transcoding: final decoder: dxva2, final encoder: qsv
. . .
May 14, 2018 18:51:37.231 [1304] ERROR - [Transcoder] [h264_qsv @ 04434980] Error during encoding: device failed (-17)
May 14, 2018 18:51:37.247 [1304] ERROR - [Transcoder] Video encoding failed
May 14, 2018 18:51:37.388 [6064] DEBUG - Jobs: 'C:\Program Files (x86)\Plex\Plex Media Server\PlexTranscoder.exe' exit code for process 840 is 1 (failure)
May 14, 2018 18:51:37.388 [7532] DEBUG - Streaming Resource: Changing client to use software decoding

#7

The error -17 logged just means device failed. MFX_ERR_DEVICE_FAILED which is being returned by the intel driver. There is no more information


#8

could you try without the embedded subtitles selected to see if it makes a difference


#9

@sa2000
The screenshots were taken at 18:52 (cpu.png) and 18:56 (hw_transcode.png)

I tried playing it without subtitles and it seems to play just fine with them turned off.
But still using around 40% CPU for one 1080 transcode. But perhaps thats normal?

I also tried changing from built-in (PSG) subtitles to some external subtitles (.srt) and then it started using CPU again instead of GPU.

Here are some screenshots from when its working, without subtitles.

CPU:

GPU:


#10

I tried playing it without subtitles and it seems to play just fine with them turned off.
But still using around 40% CPU for one 1080 transcode

Would like logs for this to see that the intel encoder is used and if it is no longer giving an error


#11

@sa2000
sorry, forgot about that. guess it was to early in the morning. :slight_smile:

anyway, made a new set of logs when hw-transcoding without subtitles.
Have attatched them to this post.


#12

@mjewl said:
@sa2000
sorry, forgot about that. guess it was to early in the morning. :slight_smile:

anyway, made a new set of logs when hw-transcoding without subtitles.
Have attatched them to this post.

Thank you. That confirms that h264_qsv intel driver is not returning error MFX_ERR_DEVICE_FAILED when there are no embedded subtitles


#13

@sa2000
Ok, and is there any solution?

I’m pretty sure hw-transcoding should work with subtitles. And I really need subtitles. :slight_smile:


#14

@mjewl said:
@sa2000
Ok, and is there any solution?

I’m pretty sure hw-transcoding should work with subtitles. And I really need subtitles. :slight_smile:

It is the intel driver that is returning the error.
Is the problem only arising with HEVC videos?


#15

@sa2000

Ok.

Yes, when hw-transcoding an X264 (1080p) movie there seems to be no issues.
Everything plays fine.

Though the GPU % is much higher when hw-transcoding an x264 1080p to x264 720p than it was then hw-transcoding the HEVC.

As you can see in the earlier screenshots the GPU is around 14% for the HEVC.
But when hw-transcoding the 1080p x264 to 720p its around 40%. and the CPU is also around 40%.
Not sure if that matters. But i thought id mention it.

Did you want logs for the hw-transcode of the x264 1080p to 720p x264 as well?


#16

@mjewl
Could you see if the problem can be reproduced with a sample file - say a 5 minute clip of the video?

May be useful to get logs for the working set as well
So for the 5 minute clip,

  • Test HEVC with embedded subtitles selected - should fail with h264_qsv device error -17
  • Test HEVC with embedded subtitles not selected - should hardware transcode ok
  • Test x264 with embedded subtitles selected - I understand that uses hardware transcoding ok

Media info xml for the 2 files please and logs for the 3 tests. Please use latest PMS beta 1.13.1.5063

if the 5 minute clip is too large for the forum please upload to dropbox or similar service and send me a link by Private Message


#17

@sa2000
Are you meaning i should get two samples? One from the HEVC and one from the x264?
Not sure how i would go about doing that, got any suggestions?
with media info.xml, do you mean https://mediaarea.net/sv/MediaInfo ?

And you have already gotten logs from the two first tests. Isnt that enough? Not sure i understand why you need two more logs from the exact same thing. Or am i misunderstanding something?


#18

@mjewl said:
@sa2000
Are you meaning i should get two samples? One from the HEVC and one from the x264?
Not sure how i would go about doing that, got any suggestions?
with media info.xml, do you mean https://mediaarea.net/sv/MediaInfo ?

And you have already gotten logs from the two first tests. Isnt that enough? Not sure i understand why you need two more logs from the exact same thing. Or am i misunderstanding something?

I just wanted the sample from the Media that is getting the intel driver error - which i understood to be hevc with embedded subtitles

If also failing for other media formats then that would be useful to have as well.

With regards to media Info xml, I meant the Plex web view xml Media info - see https://support.plex.tv/articles/201998867-investigate-media-information-and-formats/

So confirm that the samples fail the same way (don’t have the word sample in the file name as the scanner ignores samples) and get logs for the samples failure and media info xml


#19

The extra logs I wanted are for using the sample files as proof that intel is failing on the samples - I would not be able to verify that the samples fail


#20

Oh ok. im trying to find out how to make sample files from the movies. Once i figure that out i will make them. And run them thru Plex to gather logs. Then i will install Media Info and run the sample files thru that software to get the .xml you want.

Not sure i can add them to plex though, Plex usually ignore sample files as they are only a couple of minutes long.
But i guess i have to figure that out as well.

EDIT: missed your first post. :slight_smile:
I will get the xml from plex. And i wont name the sample file “sample”.
Its only HEVC that is giving me problems. So i just take a sample of that.
And i’ll give you logs for all three tests (tho the third (working) test is a full x264 file, and not a sample)