[opus] OPUS_APPLICATION_AUDIO v. OPUS_SIGNAL_MUSIC

Ralph Giles giles at thaumas.net
Wed Feb 8 01:25:47 UTC 2017


On 2017-02-07 4:20 PM, Sean Darcy wrote:
> I'm using opus to encode some music (classical lute, if it makes a
> difference). How do I use these encoder ctl's ? They seem to be doing
> the same thing. How are they different ?  Are they different ? Should
> they both be set ? What happens if just one or the other is set ?

I'm not an expert, but I believe they do slightly different things.

OPUS_SET_APPLICATION() tells the encoder whether you want faithful audio
reproduction, or something more specialized. For music recording, you
should always set this to OPUS_APPLICATION_AUDIO.

Even within that set of configurations, the encoder still makes many
decisions about how to code each piece of audio. OPUS_SET_SIGNAL()
controls some of the basic bias there, between linear prediction or
fourier transform modes. The default is OPUS_AUTO where it makes its own
decision based on the input audio and the requested bitrate. That
usually works pretty well, so I don't think you need to set this.

If you want to experiment with it, setting OPUS_SIGNAL_MUSIC will prefer
the fourier transform modes, which usually do a better job on music, or
other full-band audio signals.

Setting OPUS_SIGNAL_VOICE will prefer the linear prediction modes, which
help preserve intelligibility and naturalness of speech at low bitrates.
That's generally not what you want for music.

I said experiment, though, because tonal signals with strong transients,
like you get from plucked instruments, are things that fourier transform
modes find harder to represent than a lot of other things in music. At
high bitrates, the encoder will use the MUSIC modes no matter what you
do, because they're more general. But if you're going for small size
over accurate reproduction, it is possible that the VOICE signal mode
could do a better job in your particular application. Maybe. :)

HTH,
 -r


More information about the opus mailing list