1
0
Эх сурвалжийг харах

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.
gxalpha 2 жил өмнө
parent
commit
6ed2e13974

+ 0 - 12
plugins/mac-videotoolbox/encoder.c

@@ -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,