4K HEVC hardware transcoding barely uses GPU

Server Version: 4.51.3
Player Version: Plex for LG 5.10.0 (webOS 4.3.0)

Hey all. I have my Plex Media Server configured on Dell Wyse 5070 with Celeron J4105 (Intel UHD 600), 8GB DDR4 RAM. I also have Plex Pass active and hardware transcoding checked.

First of all, is that CPU/GPU even capable to transcode 4K HEVC? I’m not completely sure after doing some web research, but testing hardware performance is always fun, so why not to try?

Anyway, when hardware transcoding is checked and I’m trying to transcode a 4K video, I expect full load both on CPU and GPU. Unfortunately when I try to transcode 4K HEVC videos, the GPU is barely used. Does anyone know why is that? The load increased a little bit when I lowered target quality from 720p to 480p, but it was still around 10%, which is quite low.

4K HEVC hardware transcoding - suprisingly low GPU load

4K HEVC software transcoding - expected low GPU load - according to PLEX transcoding guide my 3000-passmark score CPU has no business here

I did some further investigation I noticed that when Plex hardware transcodes 1080p x264 video, the GPU load is around 60% and the CPU load is around half of its power.

For testing purposes I turned off hardware transcoding and the GPU load was very low and CPU load significantly increased.

To sum up - why 1080p transcoding takes more advantage of GPU than 4K HEVC transcoding? Is there any way to consume all GPU power during 4K transcoding?

Celeron’s sometimes get gimped :frowning: but based on the specs I see it should be working.

I’m using a kaby with HD630 and a 8series with UHD630 and they do great relying on the quick sync.

May I see the DEBUG, not VERBOSE , log files which capture the start of playback?

  1. Verify logging settings
  2. Start playback of problematic video
  3. Let play 20 seconds
  4. Stop Playback
  5. Wait 20 seconds for logs to flush
  6. Settings - Server - Troubleshooting - Download Logs
  7. Attach the ZIP file for review.

Thanks for your input!

I think I know what’s the issue here. It’s all about Enable HDR tone mapping. I unmarked that checkbox in transcoding settings and GPU load increased a lot, to 60-70%!

Obviously, colors are washed out now. Nevertheless, transcoding is amazingly fast!

So the final question is - is it epxected that my CPU/GPU is not able to transcode 4K HEVC with HDR tone mapping? Does it always lower the usage of GPU like it’s described in my initial post?

Here’s the ZIP file for review.

Plex Media Server Logs_2021-03-05_15-41-45.zip (1.2 MB)

I turned on again HDR tone mapping in transcoding settings and then I did exactly what you said.

It was a transcode of 4K HEVC to 1080p 8Mbps (low):

  • 1 minute buffering
  • 5 seconds playback
  • again 1 minute buffering
  • 10 seconds playback

GPU usage around 5%.

Thanks for the logs.

  1. In both cases, the hardware is being accessed (VAAPI)
  2. You’re using the SNAP package (you installed from the Ubuntu Store)
Mar 05, 2021 15:37:59.371 [0x7f776cff9700] DEBUG - [Transcode] TPU: hardware transcoding: using hardware decode accelerator vaapi
Mar 05, 2021 15:37:59.371 [0x7f776cff9700] DEBUG - [Transcode] TPU: hardware transcoding: zero-copy support present
Mar 05, 2021 15:37:59.371 [0x7f776cff9700] DEBUG - [Transcode] TPU: hardware transcoding: using zero-copy transcoding
Mar 05, 2021 15:37:59.371 [0x7f776cff9700] DEBUG - [Transcode] [Universal] Using local file path instead of URL: /media/**REDACT**remux.mkv
Mar 05, 2021 15:37:59.371 [0x7f776cff9700] DEBUG - [Transcode] Codecs: hardware transcoding: testing API vaapi
Mar 05, 2021 15:37:59.372 [0x7f776cff9700] DEBUG - [Transcode] [FFMPEG] - Format 0x41524742 -> bgra.
Mar 05, 2021 15:37:59.372 [0x7f776cff9700] DEBUG - [Transcode] [FFMPEG] - Format 0x42475241 -> argb.
Mar 05, 2021 15:37:59.372 [0x7f776cff9700] DEBUG - [Transcode] [FFMPEG] - Format 0x41424752 -> rgba.
Mar 05, 2021 15:37:59.372 [0x7f776cff9700] DEBUG - [Transcode] [FFMPEG] - Format 0x52474241 -> abgr.
Mar 05, 2021 15:37:59.372 [0x7f776cff9700] DEBUG - [Transcode] [FFMPEG] - Format 0x58524742 -> bgr0.
Mar 05, 2021 15:37:59.372 [0x7f776cff9700] DEBUG - [Transcode] [FFMPEG] - Format 0x42475258 -> 0rgb.
Mar 05, 2021 15:37:59.372 [0x7f776cff9700] DEBUG - [Transcode] [FFMPEG] - Format 0x58424752 -> rgb0.
Mar 05, 2021 15:37:59.372 [0x7f776cff9700] DEBUG - [Transcode] [FFMPEG] - Format 0x52474258 -> 0bgr.
Mar 05, 2021 15:37:59.372 [0x7f776cff9700] DEBUG - [Transcode] [FFMPEG] - Format 0x30335241 -> unknown.
Mar 05, 2021 15:37:59.372 [0x7f776cff9700] DEBUG - [Transcode] [FFMPEG] - Format 0x30334241 -> unknown.
Mar 05, 2021 15:37:59.372 [0x7f776cff9700] DEBUG - [Transcode] [FFMPEG] - Format 0x30335258 -> unknown.
Mar 05, 2021 15:37:59.372 [0x7f776cff9700] DEBUG - [Transcode] [FFMPEG] - Format 0x30334258 -> unknown.
Mar 05, 2021 15:37:59.372 [0x7f776cff9700] DEBUG - [Transcode] [FFMPEG] - Format 0x36314752 -> unknown.
Mar 05, 2021 15:37:59.372 [0x7f776cff9700] DEBUG - [Transcode] [FFMPEG] - Format 0x50424752 -> unknown.
Mar 05, 2021 15:37:59.372 [0x7f776cff9700] DEBUG - [Transcode] [FFMPEG] - Format 0x50524742 -> unknown.
Mar 05, 2021 15:37:59.372 [0x7f776cff9700] DEBUG - [Transcode] [FFMPEG] - Format 0x56555941 -> unknown.
Mar 05, 2021 15:37:59.372 [0x7f776cff9700] DEBUG - [Transcode] [FFMPEG] - Format 0x30303859 -> gray.
Mar 05, 2021 15:37:59.372 [0x7f776cff9700] DEBUG - [Transcode] [FFMPEG] - Format 0x3231564e -> nv12.
Mar 05, 2021 15:37:59.372 [0x7f776cff9700] DEBUG - [Transcode] [FFMPEG] - Format 0x3132564e -> unknown.
Mar 05, 2021 15:37:59.372 [0x7f776cff9700] DEBUG - [Transcode] [FFMPEG] - Format 0x32595559 -> yuyv422.
Mar 05, 2021 15:37:59.372 [0x7f776cff9700] DEBUG - [Transcode] [FFMPEG] - Format 0x59565955 -> uyvy422.
Mar 05, 2021 15:37:59.372 [0x7f776cff9700] DEBUG - [Transcode] [FFMPEG] - Format 0x32315659 -> yuv420p.
Mar 05, 2021 15:37:59.372 [0x7f776cff9700] DEBUG - [Transcode] [FFMPEG] - Format 0x30323449 -> yuv420p.
Mar 05, 2021 15:37:59.372 [0x7f776cff9700] DEBUG - [Transcode] [FFMPEG] - Format 0x50313134 -> yuv411p.
Mar 05, 2021 15:37:59.372 [0x7f776cff9700] DEBUG - [Transcode] [FFMPEG] - Format 0x48323234 -> yuv422p.
Mar 05, 2021 15:37:59.372 [0x7f776cff9700] DEBUG - [Transcode] [FFMPEG] - Format 0x56323234 -> yuv440p.
Mar 05, 2021 15:37:59.372 [0x7f776cff9700] DEBUG - [Transcode] [FFMPEG] - Format 0x50343434 -> yuv444p.
Mar 05, 2021 15:37:59.372 [0x7f776cff9700] DEBUG - [Transcode] [FFMPEG] - Format 0x33434d49 -> unknown.
Mar 05, 2021 15:37:59.372 [0x7f776cff9700] DEBUG - [Transcode] [FFMPEG] - Format 0x30313050 -> p010le.
Mar 05, 2021 15:37:59.372 [0x7f776cff9700] DEBUG - [Transcode] [FFMPEG] - Created surface 0.
Mar 05, 2021 15:37:59.372 [0x7f776cff9700] DEBUG - [Transcode] [FFMPEG] - Direct mapping possible.
Mar 05, 2021 15:37:59.373 [0x7f776cff9700] DEBUG - [Transcode] TPU: hardware transcoding: final decoder: vaapi, final encoder: vaapi
Mar 05, 2021 15:37:59.373 [0x7f776cff9700] DEBUG - [Transcode/JobRunner] Job running: FFMPEG_EXTERNAL_LIBS='/var/snap/plexmediaserver/common/Library/Application\ Support/Plex\ Media\ Server/

Did the SNAP package prompt you to install the Beignet or OpenCL drivers?
(I don’t think it does).

My recommendation here is to install the native package (downloaded from plex.tv/downloads)

That installer will check for and report if there are supplemental dependencies to enable HW HDR tone mapping (which is what’s missing here)

Sounds great! I’ll do a clean install today or tomorrow and come back with results. Thanks!

PS: Don’t install PMS 1.22.0 – yet. Keep 1.21.1.4079 (I filed a bug report against 1.22.0 that has some significant impact on Ubuntu. It has been fixed already but I don’t know when 1.22.0.4145 will be superseded)

Noted. I’ll install this one: https://downloads.plex.tv/plex-media-server-new/1.21.4.4079-1b7748a7b/debian/plexmediaserver_1.21.4.4079-1b7748a7b_amd64.deb

I reinstalled Plex Media Server native package as you suggested and it works perfect! The only thing that I had to add manually was Beignet, OpenCL was in place.

Right now colors are great and GPU usage is around 60%.

Thanks for your great support!

That sounds perfect.

Enjoy!

FYI: Engineering was able to quickly track down the bug I submitted and fixed it.

I think they are targeting Monday for a hotfix release to PlexPass Beta

1 Like

Hey Chuck. One more thing in regard to GPU usage during transconding.

I have some movies with .ass subtitles. I know that they have to be burned in because of unsupport of the clien app. However, GPU usage during HW transcoding here is also low. Is there a way to fix it or is it a common issue?

Screenshots for reference.

Transcoding without subs:

Transcoding with .ass subs:

Subtitle burning is always done by the CPU.

  1. It generates the image from the characters to be overlayed
  2. It merges that layer into the image.

It stinks because that’s something BluRay players do so effortlessly but Intel didn’t give us an API to do with vaapi (even though the GPUs can do it)

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