Page 1 of 1

Subtitle VTT support

Posted: 19 May 2020 11:08
by BlueKnight68
Hi,

i wanted to do Karaoke-sessions and therefore would like to add (web)VTT subtitle files.
It works partially, i see the text correctly and in time, but
the colors are not display, all is white or whatever color i decided to give it in the settings,
but the color of the VTT-Files are obviously ignored.

Does VLC now support full VTT specs (with Style-sections, ::cue etc.) or what part of VTT is supported
Is there any other way of making the subtitles in VTT colored (i.e. only the current word or group of
words is colored, which i havent found yet) to play it in VLC ?

in VTT-File i use for example
STYLE
::cue { background-image: linear-gradient(to bottom, dimgray, lightgray) }
::cue(c.captions-curr-word) { color: cyan }

(... and then refer to it in the lyrics of course)

Best regards

Re: Subtitle VTT support

Posted: 20 May 2020 11:17
by BlueKnight68
well in the meantime i found the answer myself:
(Web)VTT (current uptodate and HTML5) is not explicitly mentioned in the Documentation and seems officially not even be supported,
(though works to an extend)

whereas the very similar (older but more common) format .srt ("SubRip", organisation hosting it is not working anymore, people dead i guess)
see https://wiki.videolan.org/Subtitles/

is supported but allows not for any styling / css except for simple (bold, underline, ... and maybe color, which i havent tested yet)
see https://wiki.videolan.org/SubRip/

Re: Subtitle VTT support

Posted: 20 May 2020 11:50
by InTheWings
VLC supports CSS. But but complex styling, it's not a web browser.

Re: Subtitle VTT support

Posted: 20 May 2020 12:02
by BlueKnight68
SRT: Simple format like <b> bold, <i> italics, <u> underline, <font color="color name or #code"> WORK, tested on VLC version 3.0.8

@InTheWings: CSS in a subtitle File of VTT format you mean ? (included or separate, and if separate how to refer to it ?)
I would be curious of an example VTT File with CSS styles (probably make one word "cyan")

Re: Subtitle VTT support

Posted: 20 May 2020 13:40
by InTheWings
http://git.videolan.org/?p=vlc.git;a=blob;f=NEWS;h=b100d9e1d8f6802894b729dcc80a3583f023a07d;hb=HEAD#l164

Re: Subtitle VTT support

Posted: 20 May 2020 19:56
by BlueKnight68
Thanks and sorry for bothering, i was really on Version 3.0.8 (error was obviously fixed with 3.0.9).
Updating to 3.0.10 i can confirm that STYLE sections now work for VTT (tested for coloring text, words and background).

I havent tested for more complicated things like
::cue { background-image: linear-gradient(to bottom, dimgray, lightgray) }

but color is enough for me ... will work
Thanks again !

Re: Subtitle VTT support

Posted: 06 Jun 2021 13:01
by arnabanimesh
I am using VLC 3.0.12 in Win10x64 it still shows <i> instead of italics