[Matroska-devel] last frame duration

wm4 nfxjfg at googlemail.com
Sat Feb 25 15:11:30 CET 2017

On Fri, 24 Feb 2017 20:44:17 +0100
Moritz Bunkus <moritz at bunkus.org> wrote:

> Hey,
> > Could anyone help to check if the file is 100% spec-compliant ? If default
> > duration is 0, do I need to set last frame duration?  
> Yes.
> > or should it be calculated by whole duration - last frame position?  
> No. The file duration is calculated from the frame timestamps &
> duration, not the other way around. Additionally, the file duration
> doesn't have to refer to a certain track at all; it can easily be the
> difference between the first audio frame's timestamp and the last
> subtitle frame's timestamp+duration if that is the biggest
> timestamp+duration in the file.

That's why proper per-track durations would probably be nice.

I know Haali circumvents this issue by probing the last video
timestamps (and mpv also has this, which can be enabled by an option),
but should it really be this way?

More information about the Matroska-devel mailing list