Jump to content

High CPU utilization when transcoding with integrated Intel GPU


Go to solution Solved by softworkz,

Recommended Posts

Posted

Hey there,

trying to save on some electricity I want to get rid of my Nvidia graphics card and use the integrated GPU of my Intel processor for hardware transcoding. I am running the official Emby docker container on Unraid and switching to Intel QuickSync seemed pretty straight forward at first. I managed to install the drivers no problem and I can see the correct hardware decoders and encoders in the transcoding page of Emby (VAAPI HD Graphics 530 and QuickSync HD Graphics 530). On the Unraid dashboard I can also monitor the utilization of the integrated GPU.

So far so good, but now strange things started happening: when setting "Enable hardware acceleration when available" to "Yes" it will always use software transcoding; when setting it to "Advanced" and leaving all check marks ticked, it will also always use software transcoding and only when deselecting all QuickSync check marks, leaving only the VAAPI checkmarks ticked, it'll do hardware transcoding. Or at least I can see some GPU utilization on the unraid dashboard in that very case. The bothering part is that even then the CPU utilization still remains about 90-100%.

I also tried with the official EmbyBeta container and it seems to transcode a bit faster, but the problem remains exactly the same: when I enable QuickSync it will no longer do hardware transcoding and the CPU utilization always is about 100%, even when seemingly doing hardware transcoding (when I only checked the VAAPI check marks).

I don't know what to try anymore, maybe the attached logs, will give you a clue...


Best regards and thanks a lot in advance!

ffmpeg-transcode-4e0b9842-4fa8-4452-8891-180e962a3f22_1.txt ffmpeg-transcode-5a08fc70-d968-4a6b-b453-87f6ab43f9b9_1.txt ffmpeg-transcode-7a9c4d4a-35a2-4fca-961d-07dc6c4cc875_1.txt embyserver.txt ffmpeg-transcode-51290035-cb1f-45c4-a690-c989ed8ff86f_1.txt

Q-Droid
Posted

This has come up before. Your CPU which appears to be Gen 6 (Skylake) may or may not support HEVC 10-bit decoding in hardware. It's on the threshold and possible that some variants could. The QSV HW detection thinks it can but is failing. VAAPI detects (correctly?) that it can't and does not attempt to HW decode.

When the correct plan is chosen (VAAPI enabled/QSV disabled) the decoding is done in SW and the encoding done in HW, lower overall CPU usage.

When the plan fails due to errors (QSV enabled) then both decoding and encoding are done in SW and higher CPU usage.

Short term options - keep QSV disabled since you have already tried the beta release which has updated Intel drivers and it still fails.

Long term - perhaps @softworkz can review and figure out why HW detection is enabling HEVC 10-bit for Skylake. And if the detection is correct then why does it error?

 

  • Like 1
Posted

@brewlo- Can you please post the hardware detection log?

Thanks

  • Solution
Posted (edited)

Thanks for the detection log.

The story is a bit complicated. Both detection outputs are correct for VAAPI and for QuickSync HEVC - because QSV actually can do HEVC 10bit in a hybrid (CPU+GPU) way.

see: https://en.wikipedia.org/wiki/Intel_Quick_Sync_Video#Development => Version 5 (Skylake)

This hybrid mode requires loading of a QSV plugin. For long time it was freely available only for Windows but not for Linux (only when purchasing Intel Media Server Studio). 
On Windows, we're loading the plugin but for Linux, we had added out-of-the-box support for QuickSync only two years ago, that's why it never mattered and  I've never seen this case before actually.

It's the combination of age-old CPU plus new Emby, which reveals that there's a tiny logical hole... 🙂

 

The conclusion is: Just stick to VAAPI codecs with your CPU.

Edited by softworkz
  • Like 1
  • Thanks 1
Posted

Of course, thanks a lot for the excellent support and the great work on Emby, cheers! 

  • Thanks 2

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...