kVTEncodeFrameOptionKey_BaseFrameQP

Static kVTEncodeFrameOptionKey_BaseFrameQP 

Source
pub unsafe static kVTEncodeFrameOptionKey_BaseFrameQP: &'static CFString
Available on crate feature VTCompressionProperties only.
Expand description

CFNumberRef requesting the current frame to use the provided base frame QP.

This value is set in the frameProperties CFDictionary passed to VTCompressionSessionEncodeFrame to force the QP value for the current frame. This is an optional parameter. Use it only when you have a specific requirement for the video quality and you are familiar with frame QP and are prepared to assume full responsibility for rate control. Otherwise it is strongly encouraged to rely on the encoder’s rate control for adjusting frame QP.

Setting BaseFrameQP turns off standard rate control and will cause the following properties to be ignored:: kVTCompressionPropertyKey_DataRateLimits kVTCompressionPropertyKey_AverageBitRate kVTCompressionPropertyKey_BaseLayerBitRateFraction kVTCompressionPropertyKey_Quality kVTCompressionPropertyKey_MaxAllowedFrameQP kVTCompressionPropertyKey_MinAllowedFrameQP

If kVTEncodeFrameOptionKey_BaseFrameQP is used, it must be set for all frames in a session. The QP value specified is frame-level but macro-block level QP may be modulated inside a frame. There will be no rate-control related frame dropping if kVTEncodeFrameOptionKey_BaseFrameQP is used.

kVTEncodeFrameOptionKey_BaseFrameQP is only supported if the encoder returns kCFBooleanTrue when the kVTCompressionPropertyKey_SupportsBaseFrameQP is queried. If this FrameOptionKey is set for encoder which does not support it, it will be ignored.

Note that it may not be possible for the encoder to accommodate all requests.

See also Apple’s documentation