Page 1 of 1

Inline WebVTT styling not working

Posted: 18 Feb 2018 07:16
by motbob
Windows, 3.0.0.

When I saw "Rewrite of webVTT subtitles support, including CSS style support" in the 3.0.0 changelog, I was very excited. However, I can't get the styling to work even though I am (I think) following the spec. There's no documentation for VLC's implementation of the standard so I'm not really sure where to start solving this problem.

WebVTT lets you style the subtitles right in the subtitles file (see Example 5) instead of with an external css file. So I whipped up a very simple .vtt that should display totally black subtitles:

WEBVTT

STYLE
::cue {
color: black;
}

00:00:11.250 --> 00:00:14.416
Wh-wh-what on Earth is going on here?!

This seems to match the linked spec exactly. But no matter what I do, the subtitle line remains while. I've tried other CSS properties, and I've also tried the more complicated ways of modifying subtitle styles in the spec (e.g. identifiers as in Example 6). Nothing changes the subtitles (although things like appending "line:84%" to the end of the timecodes do work). Do I need to give up on inline styling and attach an external css file somehow?

Re: Inline WebVTT styling not working

Posted: 19 Feb 2018 10:39
by InTheWings
Try this one. If that does not work that's a problem with the build
https://streams.videolan.org/samples/su ... T/Bill.vtt

Re: Inline WebVTT styling not working

Posted: 20 Feb 2018 00:23
by motbob
Oh, thank you, the link to https://streams.videolan.org/samples/sub/WebVTT/ was pretty much what I needed to get started. Thanks!

Re: Inline WebVTT styling not working

Posted: 20 Feb 2018 11:14
by InTheWings
I've just tested, your previous code really does show as black. There's no issue.