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
On Jan 7, 2014, at 11:11 AM, Brendan Bolles wrote:> The closest thing to a standards document for putting Opus into WebM is here: > > http://wiki.xiph.org/MatroskaOpusI'm curious about the part there where it says SeekPreRoll should be set to 80000000. I believe those are in nanoseconds, so that's 0.08 seconds, 3840 samples at 48kHz. Here's a page explaining that it means I need to start decoding that far before the samples I actually need: http://matroska.org/technical/specs/index.html Is this a fundamental property of the Opus codec that you need to do that? Brendan
Yes, it's basically an intrinsic aspect of the mathematics. If you seek into the middle of an Opus stream, that's about how long it takes before the audio converges to be correct. On Jan 17, 2014 2:13 PM, "Brendan Bolles" <brendan at fnordware.com> wrote:> On Jan 7, 2014, at 11:11 AM, Brendan Bolles wrote: > > > The closest thing to a standards document for putting Opus into WebM is > here: > > > > http://wiki.xiph.org/MatroskaOpus > > > I'm curious about the part there where it says SeekPreRoll should be set > to 80000000. I believe those are in nanoseconds, so that's 0.08 seconds, > 3840 samples at 48kHz. Here's a page explaining that it means I need to > start decoding that far before the samples I actually need: > > http://matroska.org/technical/specs/index.html > > Is this a fundamental property of the Opus codec that you need to do that? > > > Brendan > > _______________________________________________ > opus mailing list > opus at xiph.org > http://lists.xiph.org/mailman/listinfo/opus >-------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.xiph.org/pipermail/opus/attachments/20140117/61d638cb/attachment.htm