[opus] Multithreaded encoding?

Jesus Cea jcea at jcea.es
Tue Mar 31 02:22:19 UTC 2020


On 30/3/20 23:17, Ralph Giles wrote:
> I'm not aware of any other attempts, and there have never been official
> plans. It's difficult to partition input for opus at anything other than
> the track level, because of the way the decoder derives its adaptive
> state from recently-seen audio. I guess cutting together streams with at
> least an 80ms overlap wouldn't glitch too much?

According to the Opus standard, after 80 ms the encoding would converge.
That is, only the previous 80 ms of audio would be needed to get a
perfectly merged stream. You could play safe and do, lets say, 200 ms
overlapping.

For example, read https://wiki.xiph.org/OggOpus .

Efficiency is quite nice:

1 second fragments: 92%
10 seconds fragments: 99.2%

> Most people just encode multiple streams simultaneously if they want
> better throughput.

I agree, and that would be my usual approach. But in this particular
case I only have a stream that needs to be processed as fast as
possible. Seeing three idle CPU cores hurts my engineer brain :).

-- 
Jesús Cea Avión                         _/_/      _/_/_/        _/_/_/
jcea at jcea.es - https://www.jcea.es/    _/_/    _/_/  _/_/    _/_/  _/_/
Twitter: @jcea                        _/_/    _/_/          _/_/_/_/_/
jabber / xmpp:jcea at jabber.org  _/_/  _/_/    _/_/          _/_/  _/_/
"Things are not so easy"      _/_/  _/_/    _/_/  _/_/    _/_/  _/_/
"My name is Dump, Core Dump"   _/_/_/        _/_/_/      _/_/  _/_/
"El amor es poner tu felicidad en la felicidad de otro" - Leibniz

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 488 bytes
Desc: OpenPGP digital signature
URL: <http://lists.xiph.org/pipermail/opus/attachments/20200331/b3e64645/attachment.sig>


More information about the opus mailing list