浏览代码

mac-vth264: Set RealTime property to False

While the Apple documentation currently seems to indicate that we should
set RealTime to True, it appears that this may be causing issues with
the encoder not being able to meet the target frame rate. Both FFmpeg
and Handbrake have recently explicitly set this value to False, and
preliminary tests seem to indicate that setting this to false in OBS has
favorable results.
Ryan Foster 3 年之前
父节点
当前提交
5bbb36acf8
共有 1 个文件被更改,包括 6 次插入6 次删除
  1. 6 6
      plugins/mac-vth264/encoder.c

+ 6 - 6
plugins/mac-vth264/encoder.c

@@ -319,13 +319,13 @@ static bool create_encoder(struct vt_h264_encoder *enc)
 
 	// This can fail depending on hardware configuration
 	code = session_set_prop(s, kVTCompressionPropertyKey_RealTime,
-				kCFBooleanTrue);
+				kCFBooleanFalse);
 	if (code != noErr)
-		log_osstatus(LOG_WARNING, enc,
-			     "setting "
-			     "kVTCompressionPropertyKey_RealTime, "
-			     "frame delay might be increased",
-			     code);
+		log_osstatus(
+			LOG_WARNING, enc,
+			"setting kVTCompressionPropertyKey_RealTime failed, "
+			"frame delay might be increased",
+			code);
 
 	STATUS_CHECK(session_set_prop(s, kVTCompressionPropertyKey_ProfileLevel,
 				      obs_to_vt_profile(enc->profile)));