Skip to content
Snippets Groups Projects
Commit c9378ff2 authored by Philippe Gorley's avatar Philippe Gorley
Browse files

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
parent 102dabcf
Branches
No related tags found
No related merge requests found
......@@ -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;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment