Fix issue when using multiple video encoders
- Fix an issue that could occur when using more than one video encoder. Audio/video would not sync up correctly because they were expected to be paired with a particular encoder. This simply adds a little helper variable to encoder packets that specifies the system time in microseconds. We then use that system time to sync - Fix an issue with x264 with fractional FPS rates (29.97 and 59.94 particularly) where it would create ridiculously large stream outputs. The problem was that you shouldn't set the timebase_* variables in the x264 params manually, let x264 handle the default values for it and leave them at 0. - Make x264 use CFR output, because there's no reason to ever use VFR in this case.
This commit is contained in:
@@ -226,6 +226,7 @@ static void update_params(struct obs_x264 *obsx264, obs_data_t settings,
|
||||
obsx264->params.i_keyint_max =
|
||||
keyint_sec * voi->fps_num / voi->fps_den;
|
||||
|
||||
obsx264->params.b_vfr_input = false;
|
||||
obsx264->params.rc.i_vbv_max_bitrate = bitrate;
|
||||
obsx264->params.rc.i_vbv_buffer_size = buffer_size;
|
||||
obsx264->params.rc.i_bitrate = bitrate;
|
||||
@@ -233,8 +234,6 @@ static void update_params(struct obs_x264 *obsx264, obs_data_t settings,
|
||||
obsx264->params.i_height = voi->height;
|
||||
obsx264->params.i_fps_num = voi->fps_num;
|
||||
obsx264->params.i_fps_den = voi->fps_den;
|
||||
obsx264->params.i_timebase_num = voi->fps_den;
|
||||
obsx264->params.i_timebase_den = voi->fps_num;
|
||||
obsx264->params.pf_log = log_x264;
|
||||
obsx264->params.i_log_level = X264_LOG_WARNING;
|
||||
|
||||
|
Reference in New Issue
Block a user