[opus] Opus in WebM

Brendan Bolles brendan at fnordware.com
Tue Jan 7 11:11:08 PST 2014


What got me experimenting with Opus is that I heard it's going to be a supported codec in WebM, which I also have a Premiere plug-in for:

http://github.com/fnordware/AdobeWebM


I just posted a new beta that includes Opus support.  Naturally, I *think* I'm doing it right, but I'd love for someone more knowledgeable about Opus or WebM to take a look.


The closest thing to a standards document for putting Opus into WebM is here:

http://wiki.xiph.org/MatroskaOpus


The muxing library I'm using (libwebm) doesn't seem to let me set these SeekPreRoll, CodecDelay, and DiscardPadding fields.  Are these related to Opus' pre-skip field?  SeekPreRoll is supposed to be standard, but there's no way to force the encoder to use a certain pre-skip, is there?


While granulepos in the Ogg container gives you the actual number of PCM samples (including the pre-skip), WebM uses a less-accurate timestamp.  So what I'm doing is not shifting all samples according to pre-skip, but just letting those pre-skip samples live in the first audio frame and letting all future frames lie at their proper times.  Then again, the few pre-skip samples are probably within the limited accuracy of WebM's timestamps.


Brendan


More information about the opus mailing list