New upstream version 21.1.2+dfsg1

This commit is contained in:
Sebastian Ramacher 2018-05-29 21:13:02 +02:00
parent baafb6325b
commit 665f64a933
152 changed files with 3957 additions and 356 deletions

View file

@ -20,6 +20,7 @@
#include <util/darray.h>
#include <obs-module.h>
#include <libavutil/opt.h>
#include <libavformat/avformat.h>
#include "obs-ffmpeg-formats.h"
@ -229,17 +230,8 @@ static void *enc_create(obs_data_t *settings, obs_encoder_t *encoder,
enc->context->sample_rate = closest;
}
/* if using FFmpeg's AAC encoder, at least set a cutoff value
* (recommended by konverter) */
if (strcmp(enc->codec->name, "aac") == 0) {
int cutoff1 = 4000 + (int)enc->context->bit_rate / 8;
int cutoff2 = 12000 + (int)enc->context->bit_rate / 8;
int cutoff3 = enc->context->sample_rate / 2;
int cutoff;
cutoff = MIN(cutoff1, cutoff2);
cutoff = MIN(cutoff, cutoff3);
enc->context->cutoff = cutoff;
av_opt_set(enc->context->priv_data, "aac_coder", "fast", 0);
}
info("bitrate: %" PRId64 ", channels: %d, channel_layout: %x\n",