mirror of
https://github.com/obsproject/obs-studio.git
synced 2024-09-20 04:42:18 +02:00
mac-videotoolbox: Remove CRF 0 second keyint override
The previous commit sets the default configuration to 2 seconds, meaning that the 0 second default interval no longer happens per default. If someone explicitly sets the interval to 0 seconds ("auto"), we should allow them to do that.
This commit is contained in:
parent
5cd30d6a86
commit
6ed2e13974
@ -588,18 +588,6 @@ static bool create_encoder(struct vt_encoder *enc)
|
||||
|
||||
if (enc->codec_type == kCMVideoCodecType_H264 ||
|
||||
enc->codec_type == kCMVideoCodecType_HEVC) {
|
||||
/* Apple's documentation states that a keyframe interval of 0 will result in
|
||||
* the encoder automatically picking times to insert them; However, Apple's
|
||||
* encoder, when in CRF mode, will never actually insert any keyframes past
|
||||
* the very first one, rendering the files near-unusable in editors or
|
||||
* video players. So to avoid that happening, enforce a reasonable default
|
||||
* of 10 seconds in CRF mode. */
|
||||
if (enc->keyint == 0 && strcmp(enc->rate_control, "CRF") == 0) {
|
||||
VT_BLOG(LOG_INFO,
|
||||
"Enforcing non-zero keyframe interval in CRF mode");
|
||||
enc->keyint = 10;
|
||||
}
|
||||
|
||||
// This can fail when using GPU hardware encoding
|
||||
code = session_set_prop_int(
|
||||
s,
|
||||
|
Loading…
Reference in New Issue
Block a user