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
On Jan 17, 2014, at 2:19 PM, Benjamin Schwartz wrote:> 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.I see. Thanks for the info. Any idea about the other Matroska tags? I guess CodecDelay will be the value you get from OPUS_GET_LOOKAHEAD() converted to nanoseconds? DiscardPadding seems to assume that you might top off an opus frame with empty samples when the frame would spill onto the next matroska timestamp. So rather than have continuous opus that could be decoded one after another, you'd have to jump over these little gaps? The document says it would be useful for Vorbis too, but Vorbis seems to just emit packets as it wants and you don't really have any control over the boundaries. I assumed we would just do the same with Opus, even it it can be controlled better. Brendan
Brendan Bolles wrote:> DiscardPadding seems to assume that you might top off an opus > frame with empty samples when the frame would spill onto the next > matroska timestamp. So rather than have continuous opus that > could be decoded one after another, you'd have to jump over these > little gaps?The intent was not to allow gaps in the file like this (that would confuse the encoder, compress badly, and complicate decoders, plus be unrepresentable in Ogg). The intent was to allow trimming from the _last_ frame in a stream to allow sample-accurate total duration. If there's some way to say that it cannot be used anywhere else in the spec, we should do so.> The document says it would be useful for Vorbis too, but Vorbis > seems to just emit packets as it wants and you don't really have > any control over the boundaries. I assumed we would just do the > same with Opus, even it it can be controlled better.Like Opus, the idea was to use it in the last frame only, for sample accurate duration. Right now if you mux a Vorbis file into MKV and then back into Ogg, the duration changes.
On Jan 17, 2014, at 2:19 PM, Benjamin Schwartz wrote:> 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.Do you happen to know if Vorbis has a similar need to do a SeekPreRoll? Brendan
It does not; Vorbis needs only lap consecutive frames, and the timing was constructed so that the 'timestamp' of a vorbis frame actually points to the middle of the frame data. When you combine a starting frame with the subsequent frame, the data you get back is from the starting timestamp forward. Because Opus needs to preroll a larger amount, that trick wouldn't work with Opus. Monty On Tue, Jan 21, 2014 at 1:00 PM, Brendan Bolles <brendan at fnordware.com>wrote:> On Jan 17, 2014, at 2:19 PM, Benjamin Schwartz wrote: > > > 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. > > > Do you happen to know if Vorbis has a similar need to do a SeekPreRoll? > > > 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/20140121/645af36f/attachment.htm