Resource icon

All Versions Custom parameters of Quicksync

koala

Active Member
koala submitted a new resource:

Custom parameters of Quicksync - The custom parameters of Quicksync explained

If you just want to know how to activate Quicksync, look here.

I looked a bit into the Quicksync API documentation, and this is what I have found out about the custom parameters of the Quick Sync encoder. It may help you to determine which algorithm is best suited for your use case.

In general, you are fine if you just choose from the presets in Settings->Advanced and don't activate any of the custom settings. This...

Read more about this resource...
 

koala

Active Member
If you have any comments or corrections, please add them here. I would be happy to correct my stuff. Especially if I got something wrong with the several algorithms or my recommendations.
 

Jack0r

The Helping Squad
Thanks a lot, I couldnt find such clear information, may I ask where you found it?
 

dinksy

New Member
Well , I tried CQP method as described and the bitrate doesn't stay within the global bitrate as mentioned in the resource. Easiest way to check is to set a small buffer like 30s and then record replays while decreasing QPI, QPP, QPB parameters - you will get similar duration files with increasingly higher file size. The standard way of doing that in x264 recording is to set up custom encoder settings (e.g. crf=18 ). Maybe it works the same way here, I just cant find out any command line parameters I can use in custom QS encoder settings tab. If anyone finds out how to do it , please share ;)
 

koala

Active Member
@dinksy: the CQP mode is somewhat similar to the crf= mode from x264. The QPI, QPP and QPB parameters are somewhat equivalent to the crf= value: they determine quality and not bitrate. It's similar in spirit, not identical, since x264 with crf= still adjusts the quantizer according to motion, while Quicksync is using the fixed quantizer given in the 3 parameters.
So you don't need any additional encoder settings on a command line: it's all in the custom parameter window of OBS. OBS also dynamically activates and deactivates valid options for the corresponding encoding algorithm. If you look into the media sdk documentation, you see that the window implements the complete set of parameters that are valid for each algorithm. There are no additional (unexposed) parameters.

I will look into how the bitrate value is used in CQP mode and change the guide accordingly. I thought it was the upper limit of the bitrate, but that seems not the case.
 

koala

Active Member
Since you don't want to go over 3500, I assume you want to stream. For streaming, your settings seem almost fine. But don't use the custom parameters on that extra configuration page. The default constant bit rate is perfectly fine for streaming. The custom parameters are only good if you want to record locally, because with local recording the bitrate and its fluctuation doesn't matter.
Your downscaling is ok for streaming as well.

But if you need even better quality, use x264 as encoder. If you have the CPU power. It still produces better quality with a given bitrate than Quicksync.
 

Crazydude

New Member
Since you don't want to go over 3500, I assume you want to stream. For streaming, your settings seem almost fine. But don't use the custom parameters on that extra configuration page. The default constant bit rate is perfectly fine for streaming. The custom parameters are only good if you want to record locally, because with local recording the bitrate and its fluctuation doesn't matter.
Your downscaling is ok for streaming as well.

But if you need even better quality, use x264 as encoder. If you have the CPU power. It still produces better quality with a given bitrate than Quicksync.
Thanks alot @koala. Sadly only 1 pc, and bf4 stressing system alot alone (+ obs streaming). Yes a bit lower quality but its not even stressing my system with quicksync it seems. Thanks alot for information.
 

WhiteWolf411

New Member
sorry i am a noob, What is/are "SDK default"

CQP: constant quantization parameter algorithm
Use case: recording with a variable bit rate
Description: Video is encoded with a constant quality, regardless of motion. Bitrate is determined by the complexity of the video material. Quality is determined by QPI, QPP and QPB parameters. QPI determines intra frame quality (known as key frames), QPP determines predicted (P-) frames quality, and QPB determines h.264 B-frames (a weaker version of P-frames). You want to use the same value for all 3 parameters.
Remark: Very good for local recording for raw footage, since quality is not restricted to bitrate if you set the bitrate high enough, while not wasting disk space on low complex scenes.
Quality is determined by the 3 QP parameters (1..51). The lower the values, the better the quality. 0 uses SDK default. Sweet spot is probably around 20-25. My choice is 22 with a maximum bit rate of 50000, which results in an average bit rate of about 29000 while keeping high complex scenes at maximum quality. Lower values than 22 greatly increases the bitrate requirement.
Not available in every HD Graphics.
 
Last edited:
D

Deleted member 27089

I tried it for using QuickSync for local recording. With 50mbps max and a balanced default setting it worked quite well on my i7-4771. Then I found the advanced settings and this guide. LA ICQ with the default settings first led to a very bad framerate and artifacts. Lowering it helped, but there also seems to be the possibility of audio/video desyncs with this setting. And it seems to produce more duplicate frames.
In the API reference it also says about LA ICQ: "This method is not HRD compliant." So maybe it's not the best choice.
 

koala

Active Member
"HRD compliant" means that the data rate is within certain limits, so the buffer of the decoder is never overflowed or underflowed. This is relevant for streaming, but not for local recording and local playback. A buffer underflow happens, if data cannot arrive fast enough to keep up with the decoding, but a locally saved file can always be read with enough speed.

If LA ICQ isn't performing well, the encoder cannot probably encode fast enough for your resolution/frame rate, so it has to skip frames. It is a more recently added and more complex algorithm, perhaps it is not as stable as the older ones. You are not forced to use this variant. Try ICQ (without LA), or CQP. On my i5-3570k CQP works perfectly well with 22 as QPI/QPP/QPB values. There is only a file size difference. The quality is the same. I prefer quality-based algorithms for local recording over constant bitrate, because they do not waste space for low-motion video and take whatever bandwidth is required to encode high-motion video at the same quality.

This is still raw footage not optimized for space. If you re-encode such a video with x264 with crf=21 and preset slow, the video size is halved with no visual impact.
 

layarion

Member
wow! this is fantastic, could you update for OBS Studio? they are very similar it seems on this specific topic but still i would love to see more from this guy!
 
Top