1
0
Fork 0
mirror of https://github.com/ossrs/srs.git synced 2025-03-09 15:49:59 +00:00

Fix opus delay options, use ffmpeg-opus in docker test. v6.0.102 (#3883)

The `ffmpeg-opus` tool allows you to control the delay using the
`opus_delay` option. The minimum delay can be set to 2.5ms. However, in
practice, you cannot set it this low. You need to set at least 10 frames
to allow the audio encoder to lookahead. Otherwise, the sound will be
distorted.

---------

Co-authored-by: chundonglinlin <chundonglinlin@163.com>
This commit is contained in:
john 2023-11-22 14:58:30 +08:00 committed by GitHub
parent 470a373a68
commit 3e463a8e56
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
7 changed files with 9 additions and 7 deletions

View file

@ -249,7 +249,7 @@ srs_error_t SrsAudioTranscoder::init_enc(SrsAudioCodecId dst_codec, int dst_chan
enc_->strict_std_compliance = FF_COMPLIANCE_EXPERIMENTAL;
#ifdef SRS_FFMPEG_OPUS
av_opt_set(enc_->priv_data, "opus_delay", "2.5", 0);
av_opt_set(enc_->priv_data, "opus_delay", "25", 0);
#endif
} else if (dst_codec == SrsAudioCodecIdAAC) {
enc_->strict_std_compliance = FF_COMPLIANCE_EXPERIMENTAL;