Re: What's the best way to find the desired cue point?
Steve Lhomme <slhomme <at> matroska.org>
2012-02-25 08:15:42 GMT
On Fri, Feb 17, 2012 at 3:20 AM, Makoto Oshita <12makoto28 <at> gmail.com> wrote:
> Hello,
>
> When I merged multiple video streams into one mkv by using mkvmerge,
> the output file has multiple cue point which have the same cue time in
> it, in the Cues section.
That sounds like a bug. Or did you mean chapters entries ?
http://www.matroska.org/technical/specs/index.html#Cues
vs
http://www.matroska.org/technical/specs/index.html#Chapters
> Cue time 0.000s would be the most common (and could be the only) case,
> technically it should be able to be stored into one cue point,
> correct?
Yes
> So is it ok to have multiple cue points for one cue time?
No
> Also, from the parsing view point, is there any recommended way to
> find cue information for the specified track and time?
They should be sorted (they normally are) and then a simple dichotomy
or iteration through the elements to find the one surrounding the
timecode you want.
> There might be no cue information for the specified track, like most
> of audio streams. Subtitles? I don't know but cues might work well
> with subtitles.
Usually it's not necessary to have Cue info for all tracks. Only the
ones corresponding to seek points in the video are enough, unless
there is no video track.
> I don't want to parse and cache all cue points prior to playback, but
> if it seems to be the way to go, I'll consider that...
You don't even need to read the Cue points before playback starts. But
when the user wants to seek in the file, you will need to read up to
the timecode you want (+1 element if it's not the last). You can just
read and not cache the values. It will be slower but saves memory.
> Any comments would be appreciated, thanks in advance!
>
> Thanks,
> Makoto
> _______________________________________________
> Matroska-devel mailing list
> Matroska-devel <at> lists.matroska.org
> http://lists.matroska.org/cgi-bin/mailman/listinfo/matroska-devel
> Read Matroska-Devel on GMane: http://dir.gmane.org/gmane.comp.multimedia.matroska.devel
--
--
Steve Lhomme
Matroska association Chairman
_______________________________________________
Matroska-devel mailing list
Matroska-devel <at> lists.matroska.org
http://lists.matroska.org/cgi-bin/mailman/listinfo/matroska-devel
Read Matroska-Devel on GMane: http://dir.gmane.org/gmane.comp.multimedia.matroska.devel