Intel Quick Sync transcode quality issues on Intel 12th/13th gen CPUs

Server Version#: 1.31.0.6654
Player Version#: 4.101.1 (Plex Web – Also able to reproduce on Samsung TV Smart App)

Update 5: This thread has been referenced a few times, and a lot of testing has been completed to get to where we are now. To summarize, there is an issue with Plex and hardware transcoding HEVC / x265 content with Intel Quick Sync on 11th - 13th gen Intel CPUs that utilize Intel Iris XE iGPUs (14th gen status unknown). Hardware transcoding via QS produces frequent blocky frames and artifacts which can be seen in the screenshot below, and in many of the sample clips throughout this thread. Personally, I downgraded to a 10th generation intel NUC and the issues have stopped. I can freely migrate my Plex LXC container between my two Proxmox hosts (10th gen NUC, 12th gen NUC) to confidently reproduce and resolve this issue. Plex support have acknowledged this as a problem but have not replied in 6~ months.

Original Post

I’m looking for anyone else that has an Intel 12th or 13th gen CPU to test PMS hardware transcoding with. I’m not able to find any relevant logs on the issues that I’m having so this is a particularly painful issue to track down – Getting it to replicate elsewhere would be helpful.

Cross posting from Reddit with condensed details: Reddit - The heart of the internet

  • Nvidia NVENC transcodes run great on all devices. Latest drivers installed on Windows 11, no issues. Running on an AMD Ryzen 5 3600x with a Quadro P4000. Both source (265) and output (264) video show (hw) so I know hardware transcoding is working properly. I can start up a lot of simultaneous streams without any CPU load issues.

  • Intel Quick Sync has micro-stutters, gets blocky in dark or high-bitrate scenes, and has lots of blocky artifacting. Original testing was completed with Intel Quick Sync on Windows 10 22H2, Windows 11 22H2, Ubuntu direct, Dockerized (ubuntu), and i’m now running in Proxmox LXC (ubuntu). I’ve also tested 22.04 and 22.10 Ubuntu updates as well with the same results. These tests were completed on an Intel i5 13600K (UHD 770 igpu) and an Intel NUC 12 with the i7-1260P (Intel Iris XE 96EU igpu). I’m running out of hardware options to test with! – HDR tone mapping was disabled on all the tests even though it shouldn’t be a problem now. Both source (265) and output (264) video show (hw) so I know hardware transcoding is working properly. I can start up a lot of simultaneous streams without any CPU load issues.

See the following example from the plex web app using the two separate systems side-by-side on the same media file. Quick Sync on the plex web app shows this pixelation for about half a second on some scene transitions, and more frequently (even at random times) on the Samsung TV app.


NVENC system on the left, QS system on the right.

NVENC:

QS:

3 Likes

The issue with the Samsung TV app appears to be with Subtitles. (ASS) subtitles play fine and do not impact quality on the NVENC system, however they produce quite a bit of artifacting through the system running Quick Sync to the Samsung TV App. If I disable subtitles on the playback stream from the Quick Sync system on the Samsung TV App, the quality is noticeably better without all the artifacts; I just can’t understand what anyone is saying. I always assumed subtitles were handled by the end device separate from the transcode?

Subtitles are only handled by the end device if it supports the subtitle format. If not they have to be burned in.

Normally in that case I would think you would see a transcode reason on the dashboard, I’ve seen it for audio tracks but maybe it doesn’t indicate that for subtitles.

I remember when I got my shield it was specifically because it could handle whatever subtitle format of my very old anime DVD rips. On the Firetv it couldn’t handle them and I had to transcode.

If you google Samsung and ASS subtitles there a ton of issues.

The problem here is that ASS subtitles work fine on Samsung devices with the same piece of media if being transcoded through NVENC. I only experience these quality issues when transcoding through the system running Quick Sync. I have both systems up and running, side-by-side now and can reliably replicate.

Oh sorry, I missed that part… Very strange then.

I set up two separate instances of Tautulli (not sure if you can point one instance at multiple servers) – Here are the results streaming to the Samsung TV app along with a sample debug log from each. I’m not seeing anything out of the ordinary here, but the difference in quality through Quick Sync between subs on/off is night and day, especially in darker scenes. I have seen instances of a green blocky underlay around the subtitle area, but that’s not nearly as common as the general quality issue.

NVENC: Imgur: The magic of the Internet

QS: Imgur: The magic of the Internet

This does appear to be an issue with Quick Sync on the latest gen / UHD 770 and the intel Iris XE which can be found in Intel NUCs gen 11 and newer. I deployed PMS on a spare laptop with UHD 620 iGPU and an i5-8365U (8th gen) and hardware transcoding works perfectly. I’d almost be willing to downgrade just to get the quality back…

I’m not sure where to go at this point, or if there’s anything I can do with this newer equipment.

Update 2: After further testing, the artifacting seems to be limited to the Samsung TV Plex app (Samsung 2017) with Intel Quick Sync transcoding and subtitles on Intel Iris XE and 12/13th gen Intel CPUs with UHD 770. There are no problems with PMS when using NVENC. Plex web client does show artifacting in dark scenes, but I’ve opted to ignore that and use the plex desktop app instead. Samsung TV app is a killer for me since there are several around the house. >> Tagging to samsung-tizen for traction and moving to server-linux as I have this running on ubuntu (proxmox lxc). Forcing the latest kernel and compiling the latest intel-media-driver had no impact.

It seems that this problem is very similar to the content of a post a long time ago. Although I don’t know if it is related, it can be used as a reference for developers.
here is the link:

Questions:

  1. Is this Windows or Linux server? (Linux is tagged by default but Windows was added)

  2. May I see server logs DEBUG ZIP files? Nothing can be diagnosed without them

From what I see here, this seems to be a Player problem??a

NOTE: Referencing 2 year old threads which are minimally 10+ (likely 20) releases ago doesn’t help. Engineering will only address issues with current/recent release with samples which recreate the issue and logs. (that’s what they need – sorry)

Hi Chuck,

  1. This issue occurs on both Linux and Windows. I have opted to tag Linux as I am currently running on Linux and will be testing on this system going forward; Windows was tested previously. As far as I can tell, the issue occurs on CPUs using Quick Sync with Iris XE iGPU (Intel NUC) and UHD 770 iGPU (Intel 12/13th gen). This issue does not occur on either OS while using NVENC to transcode.

  2. There are two issues here, I’d like to focus on the issue with the Samsung App, but will explain and provide logs for both issues just in case.

Issue 1 - Samsung TV App - Playing x265 HW transcoded content (Anime) through Quick Sync with subtitles results in micro-stutters and artifacting during scene changes and screen ‘smearing’ in darker scenes. Artifacting occurs in plex web app, but it not as apparent. Issue does not occur in plex windows desktop application. Disabling subtitles results in normal quality playback without issue.

Plex Media Server Logs (SAMSUNG).zip (322.6 KB)

Issue 2 - Plex Web App - Playing x265 HW transcoded content (Movie) through Quick Sync without subtitles results in micro-stutters and artifacting during high action and darker scenes. Issue does not occur in plex windows desktop application. I can confirm enabling subtitles and playing movies on Samsung TV results in micro-stutters, artifacting, and smearing, similar to issue 1, and also plays well on Samsung without subtitles. The quality is still bad on plex web app regardless of whether subtitles are enabled or not.

PLEX-BROWSER-CONSOLE-LOG.txt (84.6 KB)
PLEX-WEB-APP-LOGS.txt (73.1 KB)

This does appear to be an issue with plex player, however I’m not 100% sure because NVENC transcoding works fine on any player, while Quick Sync and the CPU generation appears to be one of the common factors.

Please let me know if there’s any testing you’d like me to complete or confirm, or if any additional information is required. I can provide the test media on request.

I’ll be blunt. I hate ANIME :stuck_out_tongue: LOLOLOL

It’s tough video to deal with because of how it’s constructed

May I see the XML (</media> section) for one of these with ‘micro-stutters’ ?

WHen I see it – it’s always been a player problem

I run into it the most on Linux player apps. The video has that “Lagging” feeling or just plain ‘jumps’ because temporal resolution is being lost.

Hey, no worries! To each their own. It seems the same issue with subtitles on Samsung also impacts the quality of movies, so I’m including both outputs for both of my test items.

Sample TV

<Media id="2" duration="150278" bitrate="1496" width="1920" height="1080" aspectRatio="1.78" audioChannels="2" audioCodec="aac" videoCodec="hevc" videoResolution="1080" container="mkv" videoFrameRate="24p" audioProfile="lc" videoProfile="main 10">
<Part accessible="1" exists="1" id="2" key="/library/parts/2/1677504567/file.mkv" duration="150278" file="/mnt/Library/TV Shows/Test TV (2023)/Season 1/Test_Anime S01E01 (1080p 10bit x265 AAC 2.0).mkv" size="28104753" audioProfile="lc" container="mkv" videoProfile="main 10">
<Stream id="4" streamType="1" default="1" codec="hevc" index="0" bitrate="1496" bitDepth="10" chromaLocation="left" chromaSubsampling="4:2:0" codedHeight="1080" codedWidth="1920" colorPrimaries="bt709" colorRange="tv" colorSpace="bt709" colorTrc="bt709" frameRate="23.976" height="1080" level="150" profile="main 10" refFrames="1" width="1920" displayTitle="1080p (HEVC Main 10)" extendedDisplayTitle="1080p (HEVC Main 10)"> </Stream>
<Stream id="5" streamType="2" selected="1" default="1" codec="aac" index="1" channels="2" bitrate="128" language="Japanese" languageTag="ja" languageCode="jpn" profile="lc" samplingRate="44100" displayTitle="Japanese (AAC Stereo)" extendedDisplayTitle="Japanese (AAC Stereo)"> </Stream>
<Stream id="6" streamType="3" selected="1" default="1" codec="ass" index="2" bitrate="0" language="English" languageTag="en" languageCode="eng" title="English subs" displayTitle="English (ASS)" extendedDisplayTitle="English subs (ASS)"> </Stream>
</Part>
</Media>

Sample Movie

<Media id="1" duration="297397" bitrate="5704" width="1920" height="804" aspectRatio="2.35" audioChannels="8" audioCodec="aac" videoCodec="hevc" videoResolution="1080" container="mkv" videoFrameRate="24p" audioProfile="lc" videoProfile="main 10">
<Part accessible="1" exists="1" id="1" key="/library/parts/1/1677504709/file.mkv" duration="297397" file="/mnt/Library/Movies/Test Movie (2023)/Test_Movie (1080p 10bit x265 AAC 7.1).mkv" size="212060577" audioProfile="lc" container="mkv" videoProfile="main 10">
<Stream id="1" streamType="1" default="1" codec="hevc" index="0" bitrate="5704" bitDepth="10" chromaLocation="left" chromaSubsampling="4:2:0" codedHeight="808" codedWidth="1920" colorRange="tv" frameRate="23.976" height="804" level="120" profile="main 10" refFrames="1" width="1920" displayTitle="1080p (HEVC Main 10)" extendedDisplayTitle="1080p (HEVC Main 10)"> </Stream>
<Stream id="2" streamType="2" selected="1" default="1" codec="aac" index="1" channels="8" bitrate="578" language="English" languageTag="en" languageCode="eng" profile="lc" samplingRate="48000" displayTitle="English (AAC 7.1)" extendedDisplayTitle="English (AAC 7.1)"> </Stream>
<Stream id="3" streamType="3" selected="1" codec="vobsub" index="2" bitrate="2" language="English" languageTag="en" languageCode="eng" headerCompression="1" displayTitle="English (VOBSUB)" extendedDisplayTitle="English (VOBSUB)"> </Stream>
</Part>
</Media>

Do you have the TV app trying to handle the subtitles ???

(Some of them have Subtitle overlay capability now)

I do not believe the app is handling the subtitles. When playing the test content, tautulli specifically shows “BURN” prefixing the subtitle format. I had a friend test the same content on a brand-new Samsung qn800b (2022/23) and was able to reproduce the same issue. Neither my friend or I have manually adjusted subtitle handling on the samsung tv app from the default settings after install.

Can you cut me a ‘dd’ snippet of the file ? (just enough to recreate?)

I’ll run here with the debugger on and see if I can spot it

Here’s a link to the sample content. TV sample is 2 minutes 30 seconds, Movie sample is just under 5 minutes.

Thank you! Got it.

This is Ubuntu in a ProxMox LXC ?

If true, that is likely why I am having trouble reproducing it.

(group matches for access to /dev/dri ?) That has to be perfect else you’ll need CPU transcoding instead of using the hardware.

I am, however, playing with Subtitles turned off. If that little bit, on 1080p, with this CPU, is the difference then there’s a resource allocation problem.

May I see the server DEBUG logs ZIP please which captures the start of a failing playback??

This is Ubuntu in a ProxMox LXC ?
If true, that is likely why I am having trouble reproducing it.

Currently, yes, but that’s just because it’s what I’ve settled with. The same results were produced on Windows 11, Ubuntu base (no proxmox/containers), and through Ubuntu base with docker.

(group matches for access to /dev/dri ?) That has to be perfect else you’ll need CPU transcoding instead of using the hardware.

Yes, I can confirm full passthrough with HW transcoding with little to no CPU activity. I actually used a proxmox one-liner deployment from github that does a 0-to-hero full PMS LXC deploy with passthrough and configuration – I’ll need to track that down. EDIT Here it is, these are reasons I decided to stick with Proxmox (Proxmox Helper Scripts | Scripts for Streamlining Your Homelab with Proxmox (tteck.github.io))

I am, however, playing with Subtitles turned off. If that little bit, on 1080p, with this CPU, is the difference then there’s a resource allocation problem.

Be sure it’s a 12th or 13th gen Intel with QS with the UHD 770, or an intel NUC 10+ with the Iris xe (96EU) iGPU – the 96 extended is only on the i7 models. I haven’t been able to replicate the issue on older gen hardware.

May I see the server DEBUG logs ZIP please which captures the start of a failing playback??

I actually don’t get any playback failures. The content plays straight through – it’s just the quality degradation that comes with using QS and not NVENC. (or older hardware)