[opus] Opus in WebM

Brendan Bolles brendan at fnordware.com
Fri Jan 17 15:19:12 PST 2014


On Jan 17, 2014, at 3:00 PM, Timothy B. Terriberry wrote:

> 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.


Ahhh, that makes sense.  So you'd add some samples at the very end just to complete that last Opus frame?


> 
> 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.


I guess you mean if you put Vorbis into a Matroska without video?  With video I'd think you'd want the Vorbis audio duration to always match the video.  I don't think Vorbis has the fixed-frame issue of Opus where audio frames might not align with Matroska timestamps.

Because you can't really control how many samples libvorbis emits at a time, I've just assumed vorbis packets don't necessarily align with timestamps in Matroska.  You can't calculate the precise granulepos for a Vorbis packet unless you march through the entire stream from the beginning and there can't be any sample-accurate audio seeking in Matroska the way you can in Ogg.  Am I right about that?


Brendan



More information about the opus mailing list