The WebVTT subtitles look and feel is configured by /etc/webvtt_config.xml.
The size and margin of render buffer is defined. And also fonts customization
is associated with specific languages to get better display effect.
| Element Name |
Comment |
Value |
RenderBufferConfig |
Defines the global configuration of WebVTT subtitles render buffer. |
- |
ScreenWidth |
Defines the width of render buffer screen in pixels. |
Should > 0. e.g. 1920.
|
ScreenHeight |
Defines the height of render buffer screen in pixels. |
Should > 0. e.g. 1080.
|
XMargin |
Defines the margin to the left / right border of the screen in pixels
or in proportion of ScreenWidth. |
Should >= 0 in pixels.
e.g. <Pixels>20</Pixels>, <Proportion>0.01</Proportion>.
|
YMargin |
Defines the margin to the top / bottom border of the screen in pixels
or in proportion of ScreenHeight. |
Should >= 0 in pixels.
e.g. <Pixels>80</Pixels>, <Proportion>0.08</Proportion>.
|
FontConfig |
Defines the font configuration in a mapping of languages and fonts.
Can occur many times. |
- |
Language |
Defines specific subtitle language for font configuration. Can occur many times.
default is a must for the case unspecified languages are used. |
e.g. default, en, ar.
|
RegularFontFile |
Defines regular font file name in /usr/share/fonts/. |
e.g. DejaVuSans.ttf.
|
BoldFontFile |
Defines bold font file name in /usr/share/fonts/. |
e.g. DejaVuSans-Bold.ttf.
|
ItalicFontFile |
Defines italic font file name in /usr/share/fonts/. |
e.g. DejaVuSans-Oblique.ttf.
|
BoldItalicFontFile |
Defines bold italic font file name in /usr/share/fonts/. |
e.g. DejaVuSans-BoldOblique.ttf.
|
FontSize |
Defines the font size in pixels or in proportion of ScreenHeight. |
Should > 0 in pixels.
e.g. <Pixels>48</Pixels>, <Proportion>0.045</Proportion>.
|
HorizontalSpacing |
Defines the horizontal spacing of subtitle lines in pixels
or in proportion of ScreenWidth. |
Should >= 0 in pixels. e.g. <Pixels>2</Pixels>.
|
LetterSpacing |
Defines the horizontal spacing between the subtitle letters in pixels
or in proportion of ScreenWidth. |
Should >= 0 in pixels. e.g. <Pixels>1</Pixels>.
|
VerticalSpacing |
Defines the vertical spacing of subtitle lines in pixels
or in proportion of ScreenHeight. |
Should >= 0 in pixels. e.g. <Pixels>4</Pixels>.
|
FontColor |
Defines the subtitles font color in ARGB format. |
e.g. 0xFFFFFFFF (white).
|
BackgroundColor |
Defines the subtitles background color in ARGB format. |
e.g. 0x80000000 (semi-transparent).
|
Shadowed |
Defines whether subtitles font has outline.
If true or 1, font will be rendered with shadow. |
e.g. true, false.
|
The WebVTT configuration XML example below shows a configuration of English
and Arabic languages.