Intel QSV x265 quality setting

General questions or discussion about HandBrake, Video and/or audio transcoding, trends etc.
Post Reply
rcrh
Posts: 39
Joined: Wed Feb 11, 2009 1:49 am

Intel QSV x265 quality setting

Post by rcrh » Fri May 24, 2019 3:36 pm

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

Woodstock
Veteran User
Posts: 3091
Joined: Tue Aug 27, 2013 6:39 am

Re: Intel QSV x265 quality setting

Post by Woodstock » Fri May 24, 2019 3:47 pm

The two encoders have different options, which is why the name changes.

rcrh
Posts: 39
Joined: Wed Feb 11, 2009 1:49 am

Re: Intel QSV x265 quality setting

Post by rcrh » Sun May 26, 2019 12:14 am

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___???

mduell
Veteran User
Posts: 6526
Joined: Sat Apr 21, 2007 8:54 pm

Re: Intel QSV x265 quality setting

Post by mduell » 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.

rcrh
Posts: 39
Joined: Wed Feb 11, 2009 1:49 am

Re: Intel QSV x265 quality setting

Post by rcrh » Tue May 28, 2019 1:32 am

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.

mduell
Veteran User
Posts: 6526
Joined: Sat Apr 21, 2007 8:54 pm

Re: Intel QSV x265 quality setting

Post by mduell » 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.

rcrh
Posts: 39
Joined: Wed Feb 11, 2009 1:49 am

Re: Intel QSV x265 quality setting

Post by rcrh » 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.

User avatar
Rodeo
HandBrake Team
Posts: 12102
Joined: Tue Mar 03, 2009 8:55 pm

Re: Intel QSV x265 quality setting

Post by Rodeo » Sun Jun 02, 2019 4:15 pm

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)…

User avatar
Rodeo
HandBrake Team
Posts: 12102
Joined: Tue Mar 03, 2009 8:55 pm

Re: Intel QSV x265 quality setting

Post by Rodeo » Sun Jun 02, 2019 4:20 pm

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…

watchdoc
Posts: 5
Joined: Tue Jun 11, 2019 6:15 pm

Re: Intel QSV x265 quality setting

Post by watchdoc » Wed Jun 12, 2019 2:06 pm

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.

User avatar
Rodeo
HandBrake Team
Posts: 12102
Joined: Tue Mar 03, 2009 8:55 pm

Re: Intel QSV x265 quality setting

Post by Rodeo » Thu Jun 13, 2019 4:33 pm

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.

User avatar
Rodeo
HandBrake Team
Posts: 12102
Joined: Tue Mar 03, 2009 8:55 pm

Re: Intel QSV x265 quality setting

Post by Rodeo » Thu Jun 13, 2019 4:35 pm

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.

User avatar
BradleyS
Moderator
Posts: 1553
Joined: Thu Aug 09, 2007 12:16 pm

Re: Intel QSV x265 quality setting

Post by BradleyS » 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

watchdoc
Posts: 5
Joined: Tue Jun 11, 2019 6:15 pm

Re: Intel QSV x265 quality setting

Post by watchdoc » Fri Jun 14, 2019 2:19 pm

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.

Post Reply