Re: Streaming of WebVTT

On Wed, Jul 25, 2012 at 9:18 AM, Cyril Concolato <
cyril.concolato@telecom-paristech.fr> wrote:

> Aside from the problem of random access points that I mentionned in my
> previous email [1]
> [1]
> http://lists.w3.org/Archives/Public/public-texttracks/2012Jul/0000.html
>

By the way, this mail doesn't seem to talk about random access.


On Thu, Jul 26, 2012 at 5:59 PM, Silvia Pfeiffer
<silviapfeiffer1@gmail.com>wrote:

> That's the Syntax definition. In step 11 in the parser, thought it says:
> http://dev.w3.org/html5/webvtt/#parsing
>
> "Header: Collect a sequence of characters that are not U+000A LINE
> FEED (LF) characters. Let line be those characters, if any."
>
> The way I read this is that while we haven't defined in the Syntax
> that there should be a header, the parser allows putting extra
> characters beyond the identifier line and skips everything until it
> finds the two line terminators it requires (i.e. the empty line).
>

Right.  The "WEBVTT" line is the signature, not the header.  The file
format doesn't yet define a header format, but the parser is defined in a
way that allows it to be added later without breaking compatibility (as
long as people follow the spec, of course).

When writing something that reads WebVTT files, be very sure to parse it as
specified by the parser--*not* by reading the syntax and coming up with
your own parsing algorithm.

> Right. So what about the Random Access Point problem that I mentionned in
> a
> > my previous email? Don't you think it should possible to rewrite any
> WebVTT
> > file such that any (or some) cue doesn't need information from previous
> cues
> > to be processed? Just like you can re-encode a video to have all (or
> some)
> > frames to be an I frame?
>

If you want to send a stream of WebVTT data, but discard captiosn which
were shown before the user joined (eg. the user joins an hour into a
stream), simply discard all cues with an end time less than the current
time.  Retain all other data, including headers (pass these through
verbatim) and the signature, and don't modify the cues or cue timings (eg.
do not adjust them to a new zero point--that's the timeline offset's job).

-- 
Glenn Maynard

Received on Thursday, 26 July 2012 23:20:11 UTC