[Matroska-devel] Mkvmerge timecode file

Steve Lhomme steve.lhomme at free.fr
Tue Oct 5 11:24:25 CEST 2004


Hi everyone and especially Mosu,

I was looking at the mkvmerge sources on how I could support the new 
elements I added recently to handle gaps in streams. I think I found the 
location where I could add the needed code in :

cluster_helper_c::render()
   cluster->Render(*out, *kax_cues);

Now the problem is to know where the gaps are for which tracks (I'll 
probably add a SetGapForTrack method in KaxCluster to make it nice in 
libmatroska). I thought it would be done with the timecode file. But it 
seems that both format v1 and v2 can't allow this  :

They both suppose that the stream is continuous and can't know when a 
long frame duration means it's a gap (it could be done this way but 
that's highly hackish). And actually the long duration is not even the 
correct one. Since, the real duration of the frame is not known and, 
especially in the case of a gap, the correct duration would be needed too.

My first question is : what about referenced frames in the case of a 
timecode file ? Is the reader aware of that and keep the correct 
references ?

My second question is : will there be a timecode file v3 to support gaps 
? And duration ?

IMO both v1 and v2 could be easily extended to support gaps :
- for v1 you could have a new comma-separated parameter :
800,1000,25,1
1500,1700,30,0

The 1 means there is a gap, 0 there is no gap at the end.

- for v2 you could have a comma-separated parameter like :
0
40
80,gap
2320
2360

or a special timecode :
0
40
80
-1
2320
2360


Opinions ?

-- 
robUx4 on blog <http://robux4.blogspot.com/>




More information about the Matroska-devel mailing list