[FFmpeg-cvslog] doc/encoders/libopus: clarify lowdelay and cutoff options

Stefano Sabatini git at videolan.org
Fri Oct 6 10:53:35 EEST 2023


ffmpeg | branch: master | Stefano Sabatini <stefasab at gmail.com> | Sat Aug 26 15:45:33 2023 +0200| [00eb4966aa8a71a70c4758254027fdc6925f8f86] | committer: Stefano Sabatini

doc/encoders/libopus: clarify lowdelay and cutoff options

Extend descriptions for the application=lowdelay and cutoff options.
Based on notes by Mingye Wang.

Address issues:
http://trac.ffmpeg.org/ticket/10330
http://trac.ffmpeg.org/ticket/10343

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=00eb4966aa8a71a70c4758254027fdc6925f8f86
---

 doc/encoders.texi       | 7 +++++--
 libavcodec/libopusenc.c | 2 +-
 2 files changed, 6 insertions(+), 3 deletions(-)

diff --git a/doc/encoders.texi b/doc/encoders.texi
index a6fef8a8f4..8b2ab937d1 100644
--- a/doc/encoders.texi
+++ b/doc/encoders.texi
@@ -977,14 +977,17 @@ Favor improved speech intelligibility.
 @item audio
 Favor faithfulness to the input (the default).
 @item lowdelay
-Restrict to only the lowest delay modes.
+Restrict to only the lowest delay modes by disabling voice-optimized
+modes.
 @end table
 
 @item cutoff (N.A.)
 Set cutoff bandwidth in Hz. The argument must be exactly one of the
 following: 4000, 6000, 8000, 12000, or 20000, corresponding to
 narrowband, mediumband, wideband, super wideband, and fullband
-respectively. The default is 0 (cutoff disabled).
+respectively. The default is 0 (cutoff disabled). Note that libopus
+forces a wideband cutoff for bitrates < 15 kbps, unless CELT-only
+(@option{application} set to @samp{lowdelay}) mode is used.
 
 @item mapping_family (@emph{mapping_family})
 Set channel mapping family to be used by the encoder. The default value of -1
diff --git a/libavcodec/libopusenc.c b/libavcodec/libopusenc.c
index 5a0786f32f..f395d84af5 100644
--- a/libavcodec/libopusenc.c
+++ b/libavcodec/libopusenc.c
@@ -547,7 +547,7 @@ static const AVOption libopus_options[] = {
     { "application",    "Intended application type",           OFFSET(application),    AV_OPT_TYPE_INT,   { .i64 = OPUS_APPLICATION_AUDIO }, OPUS_APPLICATION_VOIP, OPUS_APPLICATION_RESTRICTED_LOWDELAY, FLAGS, "application" },
         { "voip",           "Favor improved speech intelligibility",   0, AV_OPT_TYPE_CONST, { .i64 = OPUS_APPLICATION_VOIP },                0, 0, FLAGS, "application" },
         { "audio",          "Favor faithfulness to the input",         0, AV_OPT_TYPE_CONST, { .i64 = OPUS_APPLICATION_AUDIO },               0, 0, FLAGS, "application" },
-        { "lowdelay",       "Restrict to only the lowest delay modes", 0, AV_OPT_TYPE_CONST, { .i64 = OPUS_APPLICATION_RESTRICTED_LOWDELAY }, 0, 0, FLAGS, "application" },
+        { "lowdelay",       "Restrict to only the lowest delay modes, disable voice-optimized modes", 0, AV_OPT_TYPE_CONST, { .i64 = OPUS_APPLICATION_RESTRICTED_LOWDELAY }, 0, 0, FLAGS, "application" },
     { "frame_duration", "Duration of a frame in milliseconds", OFFSET(frame_duration), AV_OPT_TYPE_FLOAT, { .dbl = 20.0 }, 2.5, 120.0, FLAGS },
     { "packet_loss",    "Expected packet loss percentage",     OFFSET(packet_loss),    AV_OPT_TYPE_INT,   { .i64 = 0 },    0,   100,  FLAGS },
     { "fec",             "Enable inband FEC. Expected packet loss must be non-zero",     OFFSET(fec),    AV_OPT_TYPE_BOOL,   { .i64 = 0 }, 0, 1, FLAGS },



More information about the ffmpeg-cvslog mailing list