obs-ffmpeg: Use FFmpeg's "fast" AAC encoder by default
FFmpeg has recently made their "fast" AAC encoder the default, which uses less CPU and sounds better at common bitrates.master
parent
a89470d2ea
commit
aa58b9cf5f
|
@ -20,6 +20,7 @@
|
||||||
#include <util/darray.h>
|
#include <util/darray.h>
|
||||||
#include <obs-module.h>
|
#include <obs-module.h>
|
||||||
|
|
||||||
|
#include <libavutil/opt.h>
|
||||||
#include <libavformat/avformat.h>
|
#include <libavformat/avformat.h>
|
||||||
|
|
||||||
#include "obs-ffmpeg-formats.h"
|
#include "obs-ffmpeg-formats.h"
|
||||||
|
@ -230,6 +231,7 @@ static void *enc_create(obs_data_t *settings, obs_encoder_t *encoder,
|
||||||
}
|
}
|
||||||
|
|
||||||
if (strcmp(enc->codec->name, "aac") == 0) {
|
if (strcmp(enc->codec->name, "aac") == 0) {
|
||||||
|
av_opt_set(enc->context->priv_data, "aac_coder", "fast", 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
info("bitrate: %" PRId64 ", channels: %d, channel_layout: %x\n",
|
info("bitrate: %" PRId64 ", channels: %d, channel_layout: %x\n",
|
||||||
|
|
Loading…
Reference in New Issue