A region is a box on the video, a few lines high, that cues can be shown in. Its main
use is roll-up captions, as on television, where each new line pushes the older ones
up. Regions are defined in REGION blocks before the first cue.
Region settings
The block is the word REGION on its own line, then settings written
name:value, separated by spaces, tabs or single line breaks. Each may
appear once.
| Setting | Value | Default | Meaning |
|---|---|---|---|
id | text without spaces or --> | empty | The name that cues use in their region setting. Unique in the file. |
width | a percentage | 100% | The width of the region, as a share of the video’s width. |
lines | a whole number | 3 | How many lines of text it holds. The height is 6% of the video’s height per line. |
regionanchor | x%,y% | 0%,100% | A point within the region, as a share of its width and height… |
viewportanchor | x%,y% | 0%,100% | …and the point on the video where that point is placed. The defaults put the bottom-left corner of the region at the bottom-left corner of the video. |
scroll | up | none | New lines appear at the bottom and push older ones up, moving over 0.433 seconds. Any other value means no scrolling. |
Cues in a region
A cue joins a region with region:id. It leaves the region again if it
also has vertical, a line setting, or a size
other than 100%, because there are no vertical regions and a cue placed or sized by
itself is outside any region. Inside a region, a cue’s position is a
share of the region’s width, and its align still applies. When more lines
are showing than the region holds, the oldest are hidden above its top edge.
Worked example
WEBVTT
REGION
id:rollup
width:80%
lines:2
regionanchor:50%,100%
viewportanchor:50%,90%
scroll:up
00:00.000 --> 00:04.000 region:rollup
Good evening and welcome.
00:02.000 --> 00:06.000 region:rollup
Tonight's top story: