Commit 86797dd7 authored by Kateryna Kostiuk's avatar Kateryna Kostiuk

video: increase quality

Increase quality when using VideoToolbox acceleration

Change-Id: I6f36bdc18860f671764cf3eda3f93009b45f3517
parent 4bbf2ef2
......@@ -236,6 +236,13 @@ MediaEncoder::initStream(const SystemCodecInfo& systemCodecInfo, AVBufferRef* fr
auto profileLevelId = libav_utils::getDictValue(options_, "parameters");
extractProfileLevelID(profileLevelId, encoderCtx);
if (accel_) {
maxBitrate = 2000 * std::atoi(libav_utils::getDictValue(options_, "max_rate"));
bufSize = 2 * maxBitrate;
crf = 20;
if (accel_)
// limit the bitrate else it will easily go up to a few MiB/s
encoderCtx->bit_rate = maxBitrate;
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment