Closed Captioning for Web Video Support with SRT and VTT Files
Looking for streaming solutions to add subtitles or closed captions to your video project? You’ve come to the right place! This article will cover how to do closed captioning for web videos.
Closed Captions (often abbreviated “CC”) can convey text information during a video. For example, captions include text and dialogue.
Moreover, they can also provide contextual info about music playing and other important sounds.
After reading this post, you can create your own captions and caption files. Closed captions can be stored on a .srt or .vtt file extension, and this caption file can make your content more accessible to people with hearing disabilities.
Captions are key for reaching deaf, hard of hearing, and language-learning populations. Including captions with your video is a legal requirement in some situations. Another advantage of adding support text tracks is increasing your content’s visibility on search engines. With that context in mind, here’s a breakdown of the topics we’ll cover on closed captioning for web videos:
Table of Contents
- How to add closed captions to your video
- Different types of closed captions
- CEA 608 (“Line 21”) vs. CEA-708 captions
- How to generate closed captions for your video
- How to Convert Text Files Into VTT Files
- How viewers activate closed captions
- Captions for live streams
How to do closed captioning for web video
We’ll begin this article by describing how to add closed captions to a video-on-demand (VOD) hosted on our video streaming platform.
First, log in to your Dacast account. Next, navigate to your video-on-demand section. Once there, select the video to which you want to add the captions. Lastly, click over to the “Publish Settings” tab.
On this page, you’ll see a button labeled “Add subtitles”. Click that button, and you can now upload your subtitle files. After uploading, click on SAVE, and that’s it! You should be able to select your subtitles directly within the player.
Next, let’s discuss what types of files to upload.
Different types of closed captions
At this point, the question becomes: what exactly should you upload? First, Dacast’s supported caption files include SRT (SubRip Text, aka SubRip Title) and VTT (Video Text Tracks, aka WebVTT) files.
VTT file captions are preferable of the two, as they are part of the HTML5 standard. However, modern HTML5 live streaming supports both protocols.
Both VTT file formats and SRT files also support multi-language subtitles. For example, you can caption the same video in English, Spanish, Portuguese, and Arabic. We recommend choosing the VTT file format if you have the option.
CEA-608 (“Line 21”) vs. CEA-708 captions
CEA-608 and CEA-708 are legal standards for closed captioning of TV broadcasts. CEA-608 (sometimes called EIA-608 or “Line 21” captions) is an older standard. This standard came on the scene following lawsuits and legislation aimed at making TV programs accessible to people who are deaf and hard of hearing.
CEA-708 is the updated standard, which includes a broader array of features and options. These include support for various alphabets, multiple simultaneous languages, custom positioning, fonts, and text size and color.
Dacast supports both CEA-608 and CEA-708. When you add a VTT file or SRT file to your Dacast video, it is automatically compatible with CEA-708 caption standards.
How to generate closed captions for your video
Regarding captioning file formats, SRT and VTT files are the most popular subtitle formats. What was formally known as WebSRT, or web subtitle resource tracks was renamed webVTT, or web video text track, in 2010.
VTT and SRT are simply plain text files containing information about the video. The WEBVTT (Web Video Text Tracks) format is popular because of its adaptability with all major online video players. VTT file format is also widely accepted by social media platforms and most editing software. As such, the information these VTT files incorporate can include:
- Subtitles (translation)
- Captions (subtitles along with sound/audio information)
- Description (describing the video with a screen reader)
- Chapters (like presentations to help the user navigate through the video)
Therefore, it’s possible to manually create your captions in a text editor using VTT files or SRT files. However, some free tools, such as Amara, make creating subtitle files easier. Amara and similar platforms also include a marketplace where you can pay someone to caption your videos for a reasonable fee. This market includes translation services as well.
However, editing the text still is valuable in some cases. With that in mind, let’s look at how SRT files and VTT files look in text format.
SRT File Format
First, let’s consider SRT. SRT is one of the most useful and widely used formats in the subtitling industry. The format is straightforward and easy to create. It originates from the SubRip software program, which uses optical character recognition to extract subtitles and their timings from video files. It then saves them into a text file that broadcasters can access later. Having an external file of the text makes it easy for broadcasters to make any future changes to their videos.
SRT Subtitle File Example:
SRT files have an easy-to-follow layout with some simple structural rules:
StartTime –> EndTime
00100:05:25.000 –> 00:05:29.000
This is a test subtitle A
00200:05:29.000 –> 00:05:32.000
This is a test subtitle B
The example above would make the first subtitle (test subtitle A) appear in the video at 5 minutes and 25 seconds. It would disappear at 5 minutes and 29 seconds exactly. The second subtitle (test subtitle B) would appear at 5 minutes, 29 seconds, and 12 frames and then disappear exactly at 5 minutes and 38 seconds.
VTT File Format
WebVTT, or web video text tracks, is often shortened to VTT. A WebVTT file is another standard for online video subtitles. The .vtt file format is ideal for displaying timed text tracks and overlay text in videos. Like SRT, users can easily format VTT files in a simple text editor.
Text files saved in the web VTT or web video text tracks format are VTT files. WebVTT is made up of optional components, headers, and cues. It includes several elements such as an optional byte order mark or (BOM) and an optional text header added to the right of the webVTT. Zero or more cues or comments are added to the end of the sequence to end it.
A webVTT file or VTT file must include the word ‘webVTT’ at the start of captions and blank lines between each subtitle track and caption sequence. Each timed text track is made up of either separate lines or multiple lines, which are known as cues.
The first line of each cue starts with a time, indicating when specific text overlays will appear in the video. It’s important to ensure no extra blank line has been added to the cue or the same line added twice, as a blank line can close the cue.
In the VTT file, there might be an optimal cue setting you can alter to change the styling or placement of the text. Making your font bold, underlined, or adding punctuation is also done using the proper cue settings in the VTT file. Each cue in the VTT file consists of three things:
- Optional cue identifiers
- Time code to help manage cue settings
- The text you want to add.
Here’s an example of a cue in the VTT file where three texts are lined for the video:
WEBVTT Kind: captions; Language: en
00:11.000 --> 00:13.000
<v Roger Bingham>We are in New York City
00:13.000 --> 00:16.000
<v Roger Bingham>We’re actually at the Lucern Hotel, just down the street
00:16.000 --> 00:18.000
<v Roger Bingham>from the American Museum of Natural History
Note: Users must save VTT files using UTF8 encoding to have characters displayed properly for languages other than English.
How to Convert Text Files Into VTT Files
Learning to convert a text file into a webVTT file can come in handy when adding subtitle text to a video. Creating your own captions from start to finish can be taxing and time-consuming. Many platforms let you convert your text files into the webVTT format, such as Descript and YouTube Studio. These platforms usually require a video or audio file and a transcript. Simply import the text files to the platform to create VTT subtitles. These text files need to match, after which you can convert them into VTT files.
How viewers activate closed captions
You can manage captions directly inside the video player from the viewer’s side. Broadcasters can activate them by clicking a CC (Closed Caption) button either next to logging out (if the content is monetized through a Pay Per View or subscription) or the full-screen button.
By default, closed captions are set to “off.” As a result, turning them on requires clicking the button.
Captions for live streams
Yes, adding captions to live videos is possible. It’s something that almost every live TV broadcast adds. However, the process is different from what we’ve described above.
Usually, adding captions involves interfacing with one of two options. First, you could have an in-house captioner. They would use a dedicated machine and caption your live stream, adding a slight delay.
There are also outsourced services like AI-Live and Vitac. These platforms provide caption services for live streams for a reasonable fee. They interface with your live stream and directly add the caption to your feed.
In this post, we’ve shared several methods of generating closed captions for web videos. Surveys have shown that nearly 1 in 5 Americans are deaf or hard of hearing. Any way you slice it, this is a large potential audience you could be reaching.
As guidelines continue to become stricter on internet-streamed content, be sure you are ready to support the formats for the future if required by local or federal law.
If you’re ready for video live streaming solutions that support modern captions, we think Dacast is a great option to try. But don’t take our word for it. To test it yourself, you can try our 14-day free trial (no credit card required). We’d love to help you stream live today!
Do you have questions or comments about any of the topics introduced in this article? We’d love to hear from you in the comment section below. We’ll do our best to get back to you as soon as we can.
For exclusive offers and regular live streaming tips, you can also join our LinkedIn group. Thanks, and good luck with your broadcasts!