[Matroska-devel] Opus in Matroksa Cont.

Ralph Giles giles at thaumas.net
Wed Apr 10 01:56:08 CEST 2013

On 13-03-27 4:22 PM, Frank Galligan wrote:

> Ogg Opus says muxers MUST give a duration to pre-skip data. But does
> pre-skip data really have a duration? Does any data that should not be
> rendered really have a duration? I think no. 

The word "muxers" is important here. What we are trying to do in the Ogg
Opus draft is to maintain a layer separation. The 'granulepos' field
counts samples which must be read out of the decoder. Like a decode
timestamp, this is what the demuxer should care about. The 'PCM sample
position' which is offset from the granulepos by the pre-skip value, is
the actual presentation timestamp of the decoded data, which is what the
player cares about. The PCM sample position is the value
which is sync'd with video, etc.

It doesn't have a duration as far as the player is concerned, but it
_does_ as far as the muxer and decoder are concerned. It depends what
layer you're talking about.

>> I think the codec should not output the pre-skip samples, ie samples
>> before 0.
> I agree, but unless we change the Opus decoder (Opus experts, does
> the Opus decoder know it is decoding pre-skip data?).

No, the opus decoder doesn't know it's decoding pre-skip data. There's
no flag for it in the data stream, so the only way the decoder would
know is if the playback application told it. Currently the libopus
doesn't provide a call for this either, assuming the caller can discard
samples as easily as it can ask the decoder to.


More information about the Matroska-devel mailing list