[FFmpeg-devel] [PATCH] opus encoder using libopus

Gregory Maxwell gmaxwell at gmail.com
Fri Sep 21 21:17:54 CEST 2012

On Wed, Sep 19, 2012 at 11:14 PM, Lou Logan <lou at lrcd.com> wrote:
>> +    if (avctx->cutoff) {
>> +        ret = opus_multistream_encoder_ctl(enc, OPUS_SET_MAX_BANDWIDTH(avctx->cutoff));
>> +        if (ret != OPUS_OK)
>> +            av_log(avctx, AV_LOG_WARNING, "Unable to set maximum bandwidth: %s\n", opus_strerror(ret));
>> +    }

OPUS_SET_MAX_BANDWIDTH is enumish, it doesn't take a frequency. If the
documentation was hard to understand please help me figure out where
it needs to be improved.


The way the codec is invoked in this patch is going to cause every
decoded file to be offset by some number of samples, depending on the
coding mode, as it never asks the encoder for its latency and sets the
skip accordingly; at least as far as I can see.


+    { "lowdelay", "Favor minimum possible coding delay",   0,
0, FLAGS, "application" },

will remove a piddly 2.5ms of delay, but it also inhibits the mode
selection substantially, resulting in cruddy results for low rate
speech. (this is also covered in the documentation)

As an aside, I also see there are some comments copied near verbatim
from my BSD licensed opus-tools package; I don't mind, and would
prefer to not have any credit on this work (nor do I think any is
required legally or otherwise);  I bring it up because the unmentioned
derivation suggests poor copyright control management, and other BSD
license may be more strict with respect to enforcement of the license
requirements.  Some increased care may be warranted.

More information about the ffmpeg-devel mailing list