[Matroska-devel] Control tracks

Steve Lhomme steve.lhomme at free.fr
Sat Aug 14 11:27:47 CEST 2004

Mike Matsnev wrote:

> Hi!
> As I almost finished the DShow splitter implementation, I'm ready to
> move to more interesting stuff like control tracks.

Cool. Well, there is some stuff to resolve like the VSFilter issue (no 
autoloading). Hopefully Gabest will officially integrate Toff's changes. 
It would be nice to have a place to put all kinds of "complex" files 
with different codec and/or chapters combinations to test it and other 
playback softwares.

I think we should check with all playback software devs to know what 
kind of files are/were a problem. Then we can make a few test files out 
of that. That would save anyone's time trying to figure out if a 
software works or not as expected in all known cases...

> So I'm asking for ideas about what control tracks should do and how.
> E.g. consider the case of several anime episodes in the same file
> with shared credits, how would the control track look in such
> file?

Ah, this is a very good+simple example ! So far a control track was 
designed with a few things in mind like change the chapter edition, jump 
to a location and not much out of that. Of course this may not be enough 
in your case.

It is probably enough because at the end of each episode you can "jump 
to the credits and use Control Track X" (ie disable the current control 
track and use another one from the jump point). So each credits played 
would use another Control Track that would know where to jump afterwards 
(next episode). The same can be used for an intro too.

But IMO it's not a clean way. It should not be needed to create more 
than one Control Track for such a simple case. So what we need here is 
to be able to jump to a point (start of the credit) and at the end jump 
to another location in the file, that depends on where we jumped from. 
What kind of possibilities is there to do that ? I can think of one : 
use variables in the Control Track that could be used whenever needed by 
the Control Track. I think that's what is used in DVD menus. In this 
case there could be different scenarii :

- before jumping the control track sets a variable to the timecode to 
use for the next episode
- before jumping the control track sets a variable to the chapter UID to 
use for the next episode
- before jumping the control track sets a variable to the chapter UID 
where the jump comes from
- before jumping the control track sets a variable to the timecode where 
the jump comes from

IMO we shouldn't define strict rules for that, letting the Control Track 
devs do what they prefer. That means variable should not have a fixed 
meaning. But IMO they should have both a name and a value.

Such variables could also be used for conditional statements : 
if(counter != 0) then loop this chapter otherwise jump to location X.

And the Control Track should also have access to variables from the 
"player" like : chapter playing, edition selected, language selected, 
tracks playing, tracks enabled, etc. The name of such variables may be 
defined in a specification for everyone to use the same and have control 
track use these names safely.

As you see, it implies almost a programing language and a common 
interface with the "rest of the world". So it requires a bit more 

BTW, as Mosu is working to build 1.0 with a fixed number of features, 
building files with control tracks may be added to mkvtoolnix only after 
  1.0 is done, or on another source branch, or kept hidden to the user. 
Or maybe the format of our Control Track will not be defined by that time ;)

Any comment and/or suggestion is highly welcome !

More information about the Matroska-devel mailing list