Page 1 of 1

Intel QSV x265 quality setting

Posted: Fri May 24, 2019 3:36 pm
by rcrh
Description of problem or question:
I'm trying to use the Intel QSV encoder on my laptop to encode x265 video. I'm curious why the quality setting switches from CRF to QP when I move from x265 to QSV. Also, I'm trying to find some guidance on what QP setting will approximate the CRF setting. IE, If I'm using CRF 22 should I use QP 22?
Thanks.

HandBrake version 1.2.2 (2019022300)
Windows 10

Re: Intel QSV x265 quality setting

Posted: Fri May 24, 2019 3:47 pm
by Woodstock
The two encoders have different options, which is why the name changes.

Re: Intel QSV x265 quality setting

Posted: Sun May 26, 2019 12:14 am
by rcrh
Woodstock wrote:
Fri May 24, 2019 3:47 pm
The two encoders have different options, which is why the name changes.
Great but I'm still looking for "guidance on what QP setting will approximate the CRF setting". ie, CRF22 = QP___???

Re: Intel QSV x265 quality setting

Posted: Sun May 26, 2019 12:24 am
by mduell
On average they're the same, CRF just adjusts QP throughout the video depending on whats going on based on a psychovisual model.

Other than on average, there's no equivalency.

Re: Intel QSV x265 quality setting

Posted: Tue May 28, 2019 1:32 am
by rcrh
mduell wrote:
Sun May 26, 2019 12:24 am
On average they're the same, CRF just adjusts QP throughout the video depending on whats going on based on a psychovisual model.

Other than on average, there's no equivalency.
Any idea why CRF isn't available with QSV? If I start with an HEVC profile and just switch to Intel QSV I seem to get files that are much bigger. They encode WAY faster but the result isn't as small. I go from about 4 frames per second to about 30 and about a 40% increase in file size.

Re: Intel QSV x265 quality setting

Posted: Tue May 28, 2019 2:14 am
by mduell
QSV doesn't have a psychovisual model to support CRF.

Yes, that's one of the tradeoffs of the quick hardware encoders, the efficiency (quality for size) is crap.

Re: Intel QSV x265 quality setting

Posted: Thu May 30, 2019 7:39 pm
by rcrh
mduell wrote:
Tue May 28, 2019 2:14 am
QSV doesn't have a psychovisual model to support CRF.

Yes, that's one of the tradeoffs of the quick hardware encoders, the efficiency (quality for size) is crap.
Thanks for confirming that. I guess I have to stick with 3fps and remain patient.

Re: Intel QSV x265 quality setting

Posted: Sun Jun 02, 2019 4:15 pm
by Rodeo
The QSV H.264 encoder has a CRF-like rate control algorithm called "ICQ". It might possibly make its way to the HEVC encoder in the future (I have no inside knowledge of Intel's plans though, it's just wishful thinking on my part)…

Re: Intel QSV x265 quality setting

Posted: Sun Jun 02, 2019 4:20 pm
by Rodeo
rcrh wrote:
Thu May 30, 2019 7:39 pm
mduell wrote:
Tue May 28, 2019 2:14 am
QSV doesn't have a psychovisual model to support CRF.

Yes, that's one of the tradeoffs of the quick hardware encoders, the efficiency (quality for size) is crap.
Thanks for confirming that. I guess I have to stick with 3fps and remain patient.
There's one or more orders of magnitude between whatever x265 settings you use that encode at 3fps and a hardware-accelerated encoder. You will have a hard time matching the performance of a hardware-accelerated encoder with a CPU-based encoder, but there's gotta be an x265 preset that fits, say, halfway between 3fps and however the hardware-accelerated encoder performs on your system while providing equivalent or better compression efficiency…

Re: Intel QSV x265 quality setting

Posted: Wed Jun 12, 2019 2:06 pm
by watchdoc
On my Skylake I5-6500u laptop, encoding Fifth Element Blu Ray with H265 QSV takes approx 90 minutes with the Fast 1080p preset and the slider set all the way to the right for quality and CQP of 22. Average frame rate is in the 40s. The file ends up being around 4.5 to 5 gig and looks very good on my 65” Samsung KS8000.

Switching to H265 x265 takes approx 8 hours with frame rates in the 3 to 5 range. This is the same 1080p preset and using the MEDIUM setting. This is x265 version 2.9 btw that comes with handbrake 1.2.2. X265 3.0 is out which is supposed to have some additional emphasis on quality at the very slow settings. No idea on file size since I stopped the encode.

I would love to see some additional H265 QSV options and development within handbrake.

Re: Intel QSV x265 quality setting

Posted: Thu Jun 13, 2019 4:33 pm
by Rodeo
watchdoc wrote:
Wed Jun 12, 2019 2:06 pm
Switching to H265 x265 takes approx 8 hours with frame rates in the 3 to 5 range. This is the same 1080p preset and using the MEDIUM setting.
While I haven't done any specific testing, hardware-accelerated encoders' compression efficiency should generally lie somewhere between the superfast and the faster preset depending on settings. With medium you're already in the territory where comparison with most hardware-accelerated video encoders is kind of pointless.

Re: Intel QSV x265 quality setting

Posted: Thu Jun 13, 2019 4:35 pm
by Rodeo
watchdoc wrote:
Wed Jun 12, 2019 2:06 pm
I would love to see some additional H265 QSV options and development within handbrake.
If Intel adds ICQ rate control to their HEVC encoder, that's definitely something we'll be very keen to add support for. In the meantime you're stuck with what the QSV HEVC encoders provides, i.e. constant QP or average bitrate.

Re: Intel QSV x265 quality setting

Posted: Thu Jun 13, 2019 5:29 pm
by BradleyS
The Performance article in the documentation may be of interest. It has some very basic quality comparisons: https://handbrake.fr/docs/en/latest/tec ... mance.html

Re: Intel QSV x265 quality setting

Posted: Fri Jun 14, 2019 2:19 pm
by watchdoc
BradleyS wrote:
Thu Jun 13, 2019 5:29 pm
The Performance article in the documentation may be of interest. It has some very basic quality comparisons: https://handbrake.fr/docs/en/latest/tec ... mance.html
This article provides very little info on H265 QSV encoding. I feel like QSV encoding has gotten a bad rap because H264 QSV produces such large files compared to the software encoders.

My H265 QSV encodes look great on my laptop or my 65" KS8000! I have been able to encode the Fifth Element Blu Ray down to under 4 gig so the file would fit on a 4 gig usb drive or a blank DVD and the results were really good with no artifacts and only slight softening in certain scenes. My wife couldn't tell the difference from the 4 gig encode and the original. YMMV. Here are my suggested settings.

If you want to encode Blu Ray to USB drive or blank DVD media: Very Fast 1080p CQP set to 24, "speed, balanced, quality" slider set to quality, Audio set to AAC 160k. If your encode comes in smaller than the desired file size, consider upping the audio bit rate or even pass thru audio. Setting the CQP to 23 would be my next step. It would be so awesome if if Handbrake had a desired file size option. It's worth noting that very few Disc players support H265.

I have noticed that nothing seems to change encode times very much with QSV encoding. Everything seems to take between 80 and 100 minutes for this experiment. Going from HQ1080p preset down to Veryfast 1080p preset added less than 10 minutes to my Blu Ray encoding time while quality didn't change a noticable amount so long as the slider was set to "quality".

I plan to compare the original Blu Ray disc, H265 QSV file encoded to less than 4.35 gig, H265 QSV HQ1080p file (probably 5-6 gig), and the original DVD movie disc. I'm interested to see how the encoded files compare to an original DVD movie disc because DVD movie back ups are simpler and take about 1/4th the time to back up compared to a Blu Ray. My Samsung KS8000 plays H265 files directly and upconverts DVD's.

My main goal is having my collection on a USB hard drive for laptop use when we travel or playing directly from my Samsung KS8000. My Roku 3 in the bedroom won't play H265 files nor will our Sony BDPS3700 Blu Ray player.