Poor image quality when HW Transcoding HEVC 1080p content to 720p

Server Version#: 1.20.1.3232
Player Version#: 1.17.0

Since setting up my DS920+ as my PMS (and making sure it is not using the iHD driver for HW transcoding) everything has been working great, with the exception of hardware transcoded HEVC content down to 720p. I have attached examples of the output from the same source file with various different settings, specified in the filenames. This is just one example but as far as i can tell it happens with all of my 1080p HEVC content if hardware transcoded to 720p (be it 2/3/4Mbit). I will also note that adjusting the Transcoder Quality setting seems to make zero difference.

We’ve already identified a workaround while waiting for Intel to release the correction for the iHD_drv_video driver.

Please join the conversation here

Closing.

@Arsenal

I got your post in the other thread.
Please recreate this by playing for 30 seconds then capture the logs (Settings - Server - Troubleshooting - Download Logs)

Attach that ZIP file here please and I will look at what’s happening.

I apolgize for closing prematurely but it seemed to be the same as that plaguing all the new J4xxx CPU transcodes.

No worries, i too thought my issues might relate to another thread but it turns out that one was specific to Windows servers.

In running the logs now I decided to test with another file just to further confirm my findings, and in doing so i think i’ve realised a flaw with my previous supposition - it seems to actually be related to the output bitrate being lower than the source, rather than the resolution, as this file was 1080p HEVC 3.7Mbps, and when i set the output to 720p 4Mbit it looks fine, but 720p 3Mbit or 2Mbit looks bad (see attached).

Vs Software Transcoding:

It seems reds in particular are a bigger (or at least more noticeable) issue if you look at all the chair arms in these shots.

.Plex Media Server Logs_2020-08-27_18-33-57.zip (6.6 MB)

It’s been a month, is there anything more I can do/provide to help get to the bottom of this?

I’m sorry I didn’t get notified until now.

Here is the workaround until Intel releases the update for us to their iHD_drv_video library

https://forums.plex.tv/t/synology-faq-questions-answers-and-a-few-how-tos/490215/32

Hi mate, i know it must be hard to keep track of all these things, but as you’ll see above we already established i am using that fix and that this is a different issue i am having.

I’m sorry. I missed that.

Regarding the washed out 10-bit (HDR) -> 8-bit (SDR), this is the norm (for now).

I can’t say much more than what I just said.

  1. Direct Play
  2. Direct Stream

Both will give you the unmodified HDR video color space (bt2020/bt2020nc) you are looking for.

If I may be candid? Those bit rates do not give the transcoder much to work with either way. Quality will suffer regardless what happens . 1080p HEVC Profile 4.0 (the norm) is up to 20 Mbps and here it’s getting 3.7 (?)…

Was this file preprocessed before you got it or is this what you were able to capture ?

Addendum. I can help with some “control” test files if you wish.
I use them when trying to diagnose transcoding and playback problems.

Washed out HDR? I don’t have any HDR content. The above examples are both SDR.

The file is pre-processed, and relatively low bit rate yes… but i am happy with the software transcoded output above, whereas the hardware transcoded output has clear artefacts on the edge of things, and in particular on the arms of the chairs in the background of the Dogma screenshots.

I will find a higher bit rate file to confirm (though not sure how well the Synology will cope software transcoding a higher bit rate HEVC file) but i’m pretty sure from previous testing the artefacts will still occur in the hardware transcoded output.

I suggested the higher bitrate jellyfish files because they are a defacto standard.
I also suggested them because the encoding is known to be correct and per standards for both HEVC and H.264.

If I may suggest,

  1. Create a Home Video library type for these files.
  2. Download a bunch of them in both HEVC snd H.264
  3. Index and then play as you deem appropriate (output resolution).

You’ll find the QSV ASIC in the J3455 and J4xxx CPUs (UHD 630 ASIC) to be very capable and able to handle several of these concurrently. (I’ve played 8 concurrently without issue. I didn’t play more because I ran out of players)

Here is what I have onhand.

./H.264:
total 7011452
-rw-r--r-- 1 chuck chuck 373916255 Feb  5  2016 jellyfish-100-mbps-hd-h264.mkv
-rw-r--r-- 1 chuck chuck  37370394 Feb  5  2016 jellyfish-10-mbps-hd-h264.mkv
-rw-r--r-- 1 chuck chuck 412458010 Feb  5  2016 jellyfish-110-mbps-hd-h264.mkv
-rw-r--r-- 1 chuck chuck 452292468 Feb  5  2016 jellyfish-120-mbps-4k-uhd-h264.mkv
-rw-r--r-- 1 chuck chuck 527038810 Feb  5  2016 jellyfish-140-mbps-4k-uhd-h264.mkv
-rw-r--r-- 1 chuck chuck  56063351 Feb  5  2016 jellyfish-15-mbps-hd-h264.mkv
-rw-r--r-- 1 chuck chuck 601826018 Feb  5  2016 jellyfish-160-mbps-4k-uhd-h264.mkv
-rw-r--r-- 1 chuck chuck 676607941 Feb  5  2016 jellyfish-180-mbps-4k-uhd-h264.mkv
-rw-r--r-- 1 chuck chuck 751452274 Feb  5  2016 jellyfish-200-mbps-4k-uhd-h264.mkv
-rw-r--r-- 1 chuck chuck  74754816 Feb  5  2016 jellyfish-20-mbps-hd-h264.mkv
-rw-r--r-- 1 chuck chuck  74754816 Feb  5  2016 jellyfish-20-mbps-hd-h264.mkv.1
-rw-r--r-- 1 chuck chuck 938508957 Feb  5  2016 jellyfish-250-mbps-4k-uhd-h264.mkv
-rw-r--r-- 1 chuck chuck  93454639 Feb  5  2016 jellyfish-25-mbps-hd-h264.mkv
-rw-r--r-- 1 chuck chuck 112143943 Feb  5  2016 jellyfish-30-mbps-hd-h264.mkv
-rw-r--r-- 1 chuck chuck 130845761 Feb  5  2016 jellyfish-35-mbps-hd-h264.mkv
-rw-r--r-- 1 chuck chuck  11202628 Feb  5  2016 jellyfish-3-mbps-hd-h264.mkv
-rw-r--r-- 1 chuck chuck 149525406 Feb  5  2016 jellyfish-40-mbps-hd-h264.mkv
-rw-r--r-- 1 chuck chuck 168217764 Feb  5  2016 jellyfish-45-mbps-hd-h264.mkv
-rw-r--r-- 1 chuck chuck 187317859 Feb  5  2016 jellyfish-50-mbps-hd-h264.mkv
-rw-r--r-- 1 chuck chuck 209546578 Feb  5  2016 jellyfish-55-mbps-hd-h264.mkv
-rw-r--r-- 1 chuck chuck  18679132 Feb  5  2016 jellyfish-5-mbps-hd-h264.mkv
-rw-r--r-- 1 chuck chuck 224298230 Feb  5  2016 jellyfish-60-mbps-hd-h264.mkv
-rw-r--r-- 1 chuck chuck 261716843 Feb  5  2016 jellyfish-70-mbps-hd-h264.mkv
-rw-r--r-- 1 chuck chuck 299074490 Feb  5  2016 jellyfish-80-mbps-hd-h264.mkv
-rw-r--r-- 1 chuck chuck 336531905 Feb  5  2016 jellyfish-90-mbps-hd-h264.mkv

./HEVC:
total 10344852
-rw-r--r-- 1 chuck chuck  375630834 Feb  4  2016 jellyfish-100-mbps-hd-hevc.mkv
-rw-r--r-- 1 chuck chuck   37981901 Feb  5  2016 jellyfish-10-mbps-hd-hevc-10bit.mkv
-rw-r--r-- 1 chuck chuck   37541091 Feb  4  2016 jellyfish-10-mbps-hd-hevc.mkv
-rw-r--r-- 1 chuck chuck  412466670 Feb  5  2016 jellyfish-110-mbps-hd-hevc.mkv
-rw-r--r-- 1 chuck chuck  450874733 Feb  5  2016 jellyfish-120-mbps-4k-uhd-hevc-10bit.mkv
-rw-r--r-- 1 chuck chuck  527931284 Feb  5  2016 jellyfish-140-mbps-4k-uhd-hevc-10bit.mkv
-rw-r--r-- 1 chuck chuck   55136461 Feb  4  2016 jellyfish-15-mbps-hd-hevc.mkv
-rw-r--r-- 1 chuck chuck  600945328 Feb  5  2016 jellyfish-160-mbps-4k-uhd-hevc-10bit.mkv
-rw-r--r-- 1 chuck chuck  678586160 Feb  5  2016 jellyfish-180-mbps-4k-uhd-hevc-10bit.mkv
-rw-r--r-- 1 chuck chuck  751776437 Feb  5  2016 jellyfish-200-mbps-4k-uhd-hevc-10bit.mkv
-rw-r--r-- 1 chuck chuck   73923940 Feb  5  2016 jellyfish-20-mbps-hd-hevc-10bit.mkv
-rw-r--r-- 1 chuck chuck   74792753 Feb  4  2016 jellyfish-20-mbps-hd-hevc.mkv
-rw-r--r-- 1 chuck chuck  940882316 Feb  5  2016 jellyfish-250-mbps-4k-uhd-hevc-10bit.mkv
-rw-r--r-- 1 chuck chuck   95050627 Feb  4  2016 jellyfish-25-mbps-hd-hevc.mkv
-rw-r--r-- 1 chuck chuck 1128468600 Feb  5  2016 jellyfish-300-mbps-4k-uhd-hevc-10bit.mkv
-rw-r--r-- 1 chuck chuck  114324565 Feb  4  2016 jellyfish-30-mbps-hd-hevc.mkv
-rw-r--r-- 1 chuck chuck  131682151 Feb  4  2016 jellyfish-35-mbps-hd-hevc.mkv
-rw-r--r-- 1 chuck chuck   11234367 Feb  3  2016 jellyfish-3-mbps-hd-hevc-10bit.mkv
-rw-r--r-- 1 chuck chuck   10638970 Feb  3  2016 jellyfish-3-mbps-hd-hevc.mkv
-rw-r--r-- 1 chuck chuck 1504953150 Feb  5  2016 jellyfish-400-mbps-4k-uhd-hevc-10bit.mkv
-rw-r--r-- 1 chuck chuck  150460227 Feb  5  2016 jellyfish-40-mbps-hd-hevc-10bit.mkv
-rw-r--r-- 1 chuck chuck  150543980 Feb  4  2016 jellyfish-40-mbps-hd-hevc.mkv
-rw-r--r-- 1 chuck chuck  170499369 Feb  4  2016 jellyfish-45-mbps-hd-hevc.mkv
-rw-r--r-- 1 chuck chuck  189233778 Feb  4  2016 jellyfish-50-mbps-hd-hevc.mkv
-rw-r--r-- 1 chuck chuck  206796989 Feb  4  2016 jellyfish-55-mbps-hd-hevc.mkv
-rw-r--r-- 1 chuck chuck   17793467 Feb  4  2016 jellyfish-5-mbps-hd-hevc.mkv
-rw-r--r-- 1 chuck chuck  225782292 Feb  5  2016 jellyfish-60-mbps-hd-hevc-10bit.mkv
-rw-r--r-- 1 chuck chuck  226116244 Feb  4  2016 jellyfish-60-mbps-hd-hevc.mkv
-rw-r--r-- 1 chuck chuck  264087940 Feb  4  2016 jellyfish-70-mbps-hd-hevc.mkv
-rw-r--r-- 1 chuck chuck  300721011 Feb  4  2016 jellyfish-80-mbps-hd-hevc.mkv
-rw-r--r-- 1 chuck chuck  336956857 Feb  5  2016 jellyfish-90-mbps-hd-hevc-10bit.mkv
-rw-r--r-- 1 chuck chuck  339176499 Feb  4  2016 jellyfish-90-mbps-hd-hevc.mkv
[chuck@lizum jellyfish.125]$ 

Oh yeah, i know QSV will cope with outputting them with hardware transcoding enabled, its just the software transcoding output that i want to compare the output quality to that i think will be an issue at high bitrate on the J4125 CPU.

I’ve used the jellyfish files in the past but not for this particular issue, so I’ll do some testing tonight.

From my experience:

Given ample source bitrate, transcoding down in hardware to low bitrates is indistinguishable from software.

Software does have smoothing in it. Hardware algorithms in the chips do not yet. A few more generations and they will .

So you think the artefacts in my screenshots above maybe related to a combination of lack of smoothing and low bit rate? Interesting insight, thank you!

I do still find it surprising that the hardware transcoding of the 1080p HEVC 3.7Mbit file to 720p h264 4Mbit doesn’t have issues but to 720p h264 3Mbit it does. I would have thought the same issue should be visible since it is still being transcoded from HEVC to H264 at a low bit rate.

I’ll let you know how i go with transcoding the jellyfish-20-mbps-hd-hevc-10bit.mkv video tonight.

Remember, HEVC is the ‘effectively more bits at lower actual bit rate’ codec.

4 Mbps of H.264 != 4 Mbps of HEVC. HEVC will always win out because it was designed to use less bandwidth.

Yeah, which is partly why i was surprised the artefacts weren’t present when hardware transcoded to 4Mbit h264.

definitely fun experiment time.

I’m looking forward to your results.

No change with a 20Mbit HEVC10 file unfortunately. This is the 4Mbit HW transcode - note the tentacles in particular, though the artefacts are also present elsewhere:

This is the 4Mbit SW transcode:

and just for comparison sake, this is the 8Mbit (1080p) HW transcode.

So in summary, there is definitely something going awry when hardware transcoding HEVC10 down from 1080p → 720p, regardless of source bit rate.

Using the same test file on an i7-7700

Converting 20 Mbps HEVC HDR (10 bit) to 720p 4 Mbps SDR

It seems you have no choice but to wait until Intel releases the update for the drivers for that proper video quality.

The J4xxx CPUs are provisionally supported when the i965 workaround is in use. It isn’t ‘fully supported’ operation but otherwise enough to get by.

No problem, hopefully that sorts it out!

I figured it was a relatively specific issue to my setup as i was sure it was noticeable enough for others to have brought it up otherwise, but i don’t know enough about the workings of the transcoder to narrow it down beyond that as to whether it was a driver issue or something within my Plex config.