[Matroska-devel] Several (minor) issues or underspecified areas in the MKV spec

Michael Bradshaw mjbshaw at google.com
Mon Oct 5 18:07:16 CEST 2015

On Sun, Oct 4, 2015 at 6:43 AM, Steve Lhomme <slhomme at matroska.org> wrote:

> On Sep 29, 2015 03:04, "Michael Bradshaw" <mjbshaw at google.com> wrote:
> > What’s the point of default values for non-mandatory elements in the MKV
> spec? Why not make them mandatory if they have a default value?
> You could set the element in the file if you want, but if it's the default
> value (likely a very common value) you don't have to write it, the semantic
> reader will get it.

But is there any real difference between a non-mandatory element with a
default value, and a mandatory element with a default value? The two seem
effectively equivalent. If there's no meaningful difference, why not just
make any element with a default value a mandatory element?

> Is the duration of a block always evenly distributed amongst its frames
> (for a block that has multiple laced frames in it)? I don’t see any
> explicit mention in the MKV spec as to how the block’s duration is supposed
> to be distributed to its frames, and I think that should be mentioned.
> Only the timestamp (aka timecode in the specs) of the first frame is known
> and the duration is for each frame...
The spec says BlockDuration is the duration of the block, not the duration
of each frame (average or otherwise). Additionally, if the duration must be
computed as the delta between the current block's timestamp/timecode and
the next block's, then this delta certainly refers to the duration of the
block and not each frame.

FFmpeg's demuxer evenly distributes the block's duration amongst all the
frames[1]. This distribution is logical, but not explicitly mandated in the
MKV spec, and I think it should be if it's the intended behavior.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.matroska.org/pipermail/matroska-devel/attachments/20151005/9e3a2dd4/attachment.html>

More information about the Matroska-devel mailing list