Re: Several (minor) issues or underspecified areas in the MKV spec
Michael Bradshaw <[email protected]> Mon, 5 Oct 2015 09:07:16 -0700
| Newsgroups | gmane.comp.multimedia.matroska.devel |
|---|---|
| Message-ID | <CAHUoET+p071A8cE5FnM3E8Ye7Fkai__2ubao7vG1gZ8=AkEWOg@mail.gmail.com> |
On Sun, Oct 4, 2015 at 6:43 AM, Steve Lhomme <[email protected]> wrote: > On Sep 29, 2015 03:04, "Michael Bradshaw" <[email protected]> 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. [1]: https://github.com/FFmpeg/FFmpeg/blob/master/libavformat/matroskadec.c#L2888 _______________________________________________ Matroska-devel mailing list [email protected] http://lists.matroska.org/cgi-bin/mailman/listinfo/matroska-devel Read Matroska-Devel on GMane: http://dir.gmane.org/gmane.comp.multimedia.matroska.devel