mirror of
https://git.jami.net/savoirfairelinux/jami-daemon.git
synced 2025-08-12 22:09:25 +08:00
video: tweak vp8 encoder settings
Changes vp8 encoder settings to better suit live streaming. Source: https://www.webmproject.org/docs/encoder-parameters/#real-time-cbr-encoding-and-streaming Change-Id: Id81dd196b59e58d32b6da6617d805b4df7564bd2
This commit is contained in:
@ -179,8 +179,12 @@ MediaEncoder::openOutput(const char *filename,
|
||||
// http://www.webmproject.org/docs/encoder-parameters/
|
||||
av_opt_set(encoderCtx_->priv_data, "quality", "realtime", 0);
|
||||
av_opt_set_int(encoderCtx_->priv_data, "error-resilient", 1, 0);
|
||||
av_opt_set_int(encoderCtx_->priv_data, "cpu-used", 3, 0);
|
||||
av_opt_set_int(encoderCtx_->priv_data, "cpu-used", 7, 0); // value obtained from testing
|
||||
av_opt_set_int(encoderCtx_->priv_data, "lag-in-frames", 0, 0);
|
||||
// allow encoder to drop frames if buffers are full and
|
||||
// to undershoot target bitrate to lessen strain on resources
|
||||
av_opt_set_int(encoderCtx_->priv_data, "drop-frame", 25, 0);
|
||||
av_opt_set_int(encoderCtx_->priv_data, "undershoot-pct", 95, 0);
|
||||
// don't set encoderCtx_->gop_size: let libvpx decide when to insert a keyframe
|
||||
encoderCtx_->slices = 2; // VP8E_SET_TOKEN_PARTITIONS
|
||||
encoderCtx_->qmin = 4;
|
||||
|
Reference in New Issue
Block a user