obs中设置gop

x264 相关参数设置在 obs-x264.c 文件中


gop_size 对应于x264的i_keyint_max

默认大小为250 ,在这个函数中获得

static bool reset_x264_params(struct obs_x264 *obsx264,
		const char *preset, const char *tune)
{
	int ret = x264_param_default_preset(&obsx264->params,
			validate_preset(obsx264, preset),
			validate(obsx264, tune, "tune", x264_tune_names));
	return ret == 0;
}



static void update_params(struct obs_x264 *obsx264, obs_data_t *settings,
		char **params)
{
	video_t *video = obs_encoder_video(obsx264->encoder);
	const struct video_output_info *voi = video_output_get_info(video);
	struct video_scale_info info;

	info.format = voi->format;
	info.colorspace = voi->colorspace;
	info.range = voi->range;

	obs_x264_video_info(obsx264, &info);

	const char *rate_control = obs_data_get_string(settings, "rate_cont

你可能感兴趣的:(obs-studio)