|
|
@ -197,7 +197,7 @@ srs_error_t SrsAudioTranscoder::init_enc(SrsAudioCodecId dst_codec, int dst_chan
|
|
|
|
enc_->channel_layout = av_get_default_channel_layout(dst_channels);
|
|
|
|
enc_->channel_layout = av_get_default_channel_layout(dst_channels);
|
|
|
|
enc_->bit_rate = dst_bit_rate;
|
|
|
|
enc_->bit_rate = dst_bit_rate;
|
|
|
|
enc_->sample_fmt = codec->sample_fmts[0];
|
|
|
|
enc_->sample_fmt = codec->sample_fmts[0];
|
|
|
|
enc_->time_base = {1, 1000};
|
|
|
|
enc_->time_base.num = 1; enc_->time_base.den = 1000; // {1, 1000}
|
|
|
|
if (dst_codec == SrsAudioCodecIdOpus) {
|
|
|
|
if (dst_codec == SrsAudioCodecIdOpus) {
|
|
|
|
//TODO: for more level setting
|
|
|
|
//TODO: for more level setting
|
|
|
|
enc_->compression_level = 1;
|
|
|
|
enc_->compression_level = 1;
|
|
|
|