W3C home > Mailing lists > Public > public-texttracks@w3.org > April 2012

Re: Displaying multiple lines in WebVTT

From: Glenn Maynard <glenn@zewt.org>
Date: Thu, 19 Apr 2012 08:38:52 -0500
Message-ID: <CABirCh8RHTw_sNwA4RhjYLp9X39pDraPmb_d_v3=aoZKM84jUQ@mail.gmail.com>
To: Philip Jägenstedt <philipj@opera.com>
Cc: David Singer <singer@apple.com>, Silvia Pfeiffer <silviapfeiffer1@gmail.com>, Frank Olivier <Frank.Olivier@microsoft.com>, "public-texttracks@w3.org" <public-texttracks@w3.org>
On Thu, Apr 19, 2012 at 4:11 AM, Philip Jägenstedt <philipj@opera.com>wrote:

> I strongly support spec'ing/implementing balanced line wrapping a the
> default for WebVTT. As for line-wrapping, I'm inclined to agree that
> requiring <br> will have long-term benefits and will not object to it.
> However, I expect we will initially also see some SRT content ported to
> WebVTT without manual intervention, causing some cues like this to end up
> on a single line:
>
> 00:32.000 --> 00:35.000
> - What should we do?
> - Let's go shopping!
>

People will need tools to do that conversion anyway, eg. to convert comma
fraction separators to periods.  Converters will want to give an option:
whether to treat lines in the SRT as explicitly wrapped, or to merge them.
That is, if you have an SRT file that looks like:

1
00:00:32,000 --> 00:00:35,000
We should make sure that there are tools
to convert SRT to WebVTT.

then allow the user to select whether the converted VTT output is:

00:32.000 --> 00:35.000
We should make sure that there are tools
to convert SRT to WebVTT.

or

00:32.000 --> 00:35.000
We should make sure that there are tools<br>
to convert SRT to WebVTT.

The first will result in better rendering most of the time, but because
it's impossible in the general case to tell whether a newline in SRT was
inserted for word wrapping or as a real line break, it won't always give
correct results.  The second conversion is more pessimistic (and might make
a safer default).

Heuristics could probably improve the first; for example, treat a newline
as explicit if the line ends with punctuation.

-- 
Glenn Maynard
Received on Thursday, 19 April 2012 13:39:27 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Thursday, 26 April 2012 16:57:02 GMT