Re: Displaying multiple lines in WebVTT

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 UTC