Skip to content
Snippets Groups Projects
Commit 86797dd7 authored by Kateryna Kostiuk's avatar Kateryna Kostiuk
Browse files

video: increase quality

Increase quality when using VideoToolbox acceleration

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