xiph / opus-tools

A set of tools to encode, inspect, and decode audio in the Opus format.
https://opus-codec.org/
Other
212 stars 78 forks source link

Option for opusenc to omit DTX/silence frames from output completely and provide options for controlling aggressivity of silence detection #89

Open vadimkantorov opened 7 months ago

vadimkantorov commented 7 months ago

Hi @mark4o!

In https://stackoverflow.com/a/40699361/445810 you suggest to benefit from DTX-enabled smaller output size by omitting 2-byte-or-less packets from opusenc output as they encode exact silence.

I propose to graduate this feature from https://github.com/xiph/opus/blob/master/src/opus_demo.c to mainline opusenc. It's very useful to encode two-channel call recordings + in --channels discrete mode, where every channel contains a lot of silence. It would also be nice to be able to configure the silence detection and pass a speech-detection / silence threshold. It's nice to have an option to omit representing the sound of breath/sighs.