[Draft] Caption formats and examples

Last updated: $Date: 2017/05/12 05:01:43 $

Caption formats

Nearly all modern user agents (browsers, media players) on both desktop and mobile platforms provide support for the display of closed captions, but not all support the same caption-delivery formats. The two most common formats used for online media are listed below.

The table below shows which formats are supported by which browsers.

Browser OS Supported caption format(s)
Firefox Windows, OS X, Android, iOS WebVTT
IE 10, 11; Edge Windows TTML, WebVTT
Safari OS X; iOS WebVTT
Chrome Windows, OS X, Chrome OS, Android, iOS WebVTT

SRT is not supported natively by any browser, but is supported by most other types of media players including those provided by popular video-hosting services, some social-media platforms and by custom players.

WebVTT, TTML and SRT are "sidecar" files, which is to say they are transmitted separately from their corresponding video files (riding alongside the video data in the delivery stream, rather than being embedded directly into the video file), and are synchronized and displayed by the user agent at the time of playback.

Delivering captions to viewers

Captions are delivered to viewers using HTML5's track element, which was created specifically for carrying text tracks, such as captions, subtitles and text-based audio descriptions. track is used as a child element of the video element:

Code snippet:

<video controls>
    <source src="myvideo.mp4" type="video/mp4" />
		<track kind="captions" src="myvideo_captions.vtt" srclang="en" label="Captions" default />
</video>

Related WCAG 2.0 resources

These tutorials provide best-practice guidance on implementing accessibility in different situations. This page combined the following WCAG 2.0 success criteria and techniques from different conformance levels:

These tutorials provide best-practice guidance on implementing accessibility in different situations. This page combined the following WCAG 2.0 success criteria and techniques from different conformance levels:

Success criteria:

  • 1.2.2 Captions (Prerecorded): Captions are provided for all prerecorded audio content in synchronized media, except when the media is a media alternative for text and is clearly labeled as such. (Level A)

Techniques

Advisory techniques