Struggling with 4K HEVC HW Transcoding with GPU

There are some improvements we have in the works that should speed up hardware transcoding. Not sure when it will be released but it is actively being worked on.

The types of graphics utilized by games is not the same as what is needed for transcoding. This is apples to oranges.

I’ve done a couple previous requests here about the spotty hardware acceleration in Windows (I can link them if you’d like), so I completely understand where you’re coming from. It’s a constant source of frustration for me. I do want to toss a few things out there, based on my experiences.

  1. You can’t do this with your NUC, but for anyone using a full PC, there are no such problems with a compatible nvidia card. It locks in hardware transcoding every time for me. (I have seen people on the forums dealing with some nvidia bugs, but they have not happened to me so far)

  2. I have a similar spec’d box to you: A quad core Kaby Lake i5 in a SFF (not a NUC). I finally took the plunge and converted it to a Linux server (18.04.2 LTS), and under Linux, quick sync hardware acceleration is 100% reliable. Also quite speedy. I’d rather use Windows because I’m far more comfortable there, but the server has been reasonably easy to maintain. (I have it connect to a NAS for content)

I hope some day Windows acceleration is fixed, but for now there is clearly some kind of problem among the combination of Intel, Windows 10, and Plex, and honestly I’m not sure where it lies.

@TeknoJunky switched the audio output to AC3 5.1
Plex started Direct Streaming the audio. But it is still transcoding the video.

This is beyond me as to why.
Base Tivo Bolt supports 4K, bandwidth via MOCA network is more than enough, satellite Tivo Bolt mini also supports 4K, the TV is 4K. And I know it plays 4K because Netflix works and show the Ultra banner when playing certain content. So why is Plex still transcoding???!!!

:face_with_symbols_over_mouth:

@Cafe_Diem Thank you for the input. The drudgery of converting the database back to Linux
:roll_eyes::gun:
I actually originally converted from Linux (Synology) to Windows (NUC). And a full PC running constantly is not energy plausible. I have my server running all day every day, for my family to play any movie they want anytime from any device.

1 Like

Please turn on logging in the Tivo App, replay the video, then provide the PMS log. Also provide the XML file for the video. Not all 4K is equal so just saying you have 4k video doesn’t mean it will direct play.

The NUC is perfect as a Plex device once you hit Kaby Lake because it can hardware-decode 10-bit HEVC. I totally understand where you’re coming from.

If you get bored and want to see my previous frustrations, here’s my second post about it: Plex has a reproducable issue where it can’t accelerate MPEG2 at 720p, only on Windows with Intel.

And here’s my previous post with further problems, this one about HEVC and AVC. Just in case you’re a glutton for punishment. I did send in a sample video and logs during this one, but nothing came of it. Originally I thought it was an issue with the wake-up of an idle box, but instead it turns out to just randomly fail.

One additional thing about Linux: Your server can be headless, unlike the HDMI dummy-plug needed for Windows. No idea why, but I’ve tested both.

At one point I brought it up to Elan during the Roku situation, and IIRC (I can’t find the comment right now!), he hinted that perfect hardware acceleration of Intel/Windows was a fairly tough nut to crack from an engineering perspective.

I can backup the linux > windows advice when it comes to plex hardware trancoding on intel. My i3-8100 is simply rock solid under linux or synology (xpenology) could not get that to happen under windows no matter what I tried. I am more familiar with Windows, so that was what I tried at first. It kicks in when I expect it to. PS the tautlulli add on is helpful when you are troubleshooting these things, it gives many more details live on what is being transcoded and from what to what.

can you explain the use case where you actually needed this? I ran headless in test on windows and linux and didn’t notice this requirement in either.

You are one of the lucky ones! Normally, Intel Quick Sync can’t engage in Windows without seeing an active monitor. The easiest way to fool a system like that is to just buy a dummy plug from Amazon, with either HDMI or Displayport as needed. I can personally confirm I ran into this problem with acceleration. A search for dummy plug on the forums will bring up a decent amount of history, but here’s one from earlier this year that spells out some details:

Maybe it was because I didn’t have another GPU installed? Maybe this was fixed in BIOS? I didn’t pay really close attention, but I have read about these adapters, specifilly for RDP in the past, but I didn’t run into a use case myself. I have a spare system I can play with, I might spin this up on the week-end, it’s supposed to be chilly :slight_smile:

I read about Intel Quick Sync needing an active monitor. I am running this system headless. Is this an absolute need? Is there anyway to see/verify if Quick Sync is on without a monitor?

ā€œIntelĀ® Quick Sync Video uses the dedicated media processing capabilities of IntelĀ® Graphics Technology to decode and encode fast, enabling the processor to complete other tasks and improving system responsiveness.ā€ - intel’s website

Also the quick sync would be for transcoding/encoding/decoding only, is that right? Which currently the GPU kicks in for transcoding at the beginning playback of a file (~10% usage), but drops off to 0% with any fast forwarding or rewinding.

It seems Plex will transcode the entire file and cannot start from the middle of a file. So you have to play from the beginning and wait for full transcode before jumping around playback. @anon18523487 is that a correct assessment of how transcoding works?

It shouldn’t affect direct playback of a HEVC file, should it?

The easiest way is to check the dashboard during playback. For compatible files being transcoded, it should show ā€œ(hw)ā€ for both decode and encode.

You can definitely jump around in a transcoded file. I don’t know the particulars on how Plex handles that, I’m guessing their process jumps to that point in the file and restarts transcoding. I’ve found that sometimes it fails on the first try, so I move slightly forward or back.

Correct, it does not. Direct play doesn’t need transcoding so it’s never kicked in.

:open_mouth:Yes I’ve seen that (hw) before and definitely with these HEVC files. So I guess I can assume Quick Sync is functioning even without the dummy HDMI dongle.

Yes once it is fully transcoded, jumping around is fine, but I meant when it starts transcoding. You have to let it finish the whole file transcode before FF/Rew because then the stuttering issues start up again. I’m guessing that Plex either stops the transcode it was in the middle of and restarts from the beginning or the new start point you’ve jumped to or it keeps transcoding from whatever point it was at in the process, but slows down tremendously. I’m not sure but the whole process slows to a crawl, GPU usage 0%, CPU usage 100% and stuttering playback. Basically don’t do a FF/Rew too soon when starting playback of a movie from the beginning, that is going to get transcoded. The same slow transcode occurs if I resume a movie that I was playing at a previous time.

Suggestion @anon18523487
I wish there was an on screen indicator, maybe in the on screen auto-hiding playback controls, that shows a red dot that turns green, so that you know when the transcode is occuring and finished, respectively. Without logging into the dashboard. Basically so you know when it’s safe to perform a FF/Rew.

:+1:

As far as I know, Plex does not transcode the whole video file when you click play. It transcodes to the number of seconds listed in the settings for your transcoder buffer (in the Transcoder settings of your server; the default is 60 seconds I believe), and then it just maintains that level of buffer when possible.

You know, doing a little searching, this is a far better explanation for the transcoding process, assuming nothing major has changed.

That is correct.

If you (@SWETTPLEX09) are having issues skipping through the file, that is something we would need to look into. That is definitely not the expected behavior.

Well then, yes I have issues :smirk:

Sometimes I can fast forward a little, two 30 second presses, and sometimes not at all. And forget about a huge jump, fast forward to the middle of the movie; that is simply not possible without the drop in GPU/jump in CPU/stuttering playback issue. I usually have to let the file play for 20 - 30 minutes before I can fast forward to anywhere in the film. Which is why I thought I was waiting for the system to do a full transcode. But thanks for the clarification on the transcoding process.

BTW please let me know if you were able to download and review the logs I sent you.

Based on your logs, it looks like you are playing back 4k content on a Tivo device. Is that correct? If so, this is a known issue with the Tivo devices. Here is a note from our support article, https://support.plex.tv/articles/203810286-what-media-formats-are-supported/.

  • We’ve noticed issues when seeking or resuming UHD content in some media specific cases. (We’ll continue working with TiVo to resolve these issues.)
1 Like

=========================================================

Models with 4K output (TiVo Roamio OTA, Bolt, etc.)

Additional Direct Play video support:

  • MKV container with H.264 video encoding
  • 10-bit hevc (H.265) video encoding (works best with lower bit rate content)

Additional 4K (UHD) video support:

  • MKV container with hvec (H.265) video encoding
  • Framerates up to 60fps
    ========================================================

The wording seems to say that MKV container with HEVC is supported. So I’m still not sure why it’s getting transcoded?

Well I guess those are the issues I am talking about. I hope you guys get that fixed soon.

But I am having the same stuttering issues with the web client as well, as the file gets transcoded. The transcoding is expected on the web client, because I am running it on a Chrome browser on a non 4K computer monitor. So even though the transcoding is expected in that case, the stuttering shouldn’t be the same as when I play on the Tivo, since it’s two different platforms.

So the issues remain.

Why is the Tivo causing transcoding?
And why, regardless of platform, does transcoding prevent me from FF/Rew?

@anon18523487
Any more input on this?

That link you sent me says Tivo supports mkv with h.265, but it also says there are issues with seeking and resuming, which I have noticed and mentioned in this thread.

But if it supports MKV with h.265 why is it transcoding the file?
I sent you the XML’s of two files with similar behavior. Do you see anything in their formatting that would cause the transcode?

And that seeking/resuming issue also happens with the web client on Chrome/Windows 7 only with these h.265 files. So I don’t think it’s a Tivo only issue.

You had PGS subtitles enabled. The TiVo does not support direct play of PGS subtitles so they had to be burned in.