Learn how to add your own closed captions to your live stream for accessibility.
Closed captions refers to the visual display of the audio in a program. Closed captions make video more accessible to people who are deaf or hard of hearing, but the benefits go beyond accessibility. Closed captions empower your viewers to consume video content in whichever way is best for them, whether it be audio, text, or a combination.
There are many types of closed caption sources, and each streaming standard may use a different format for embedding captions on the output. Mux supports receiving closed captions embedded in the H.264 video stream using the CEA-608 standard for a single language.
CEA-608 stems from the analog era where closed captions data was carried directly in the transmission in a line of the video content that wasn’t displayed unless the decoder was told to look for it. These were often referred to as “Line 21” captions. CEA-608 is still the primary standard for transmitting closed captions within the same stream as audio/video content.
Most major live caption providers (e.g. AI-Media, EEG Falcon, 3Play, Verbit) will support the CEA-608 standard. Mux will translate the CEA-608 captions into WebVTT that will be delivered as part of the HLS stream/manifest, in a standard HLS-supported manner. We will continue to evaluate demand for supporting captions for multiple languages and other caption formats.
Add the embedded_subtitles
array at time of stream creation or to an existing live stream. Closed captions are a type of subtitle. The resulting Asset's subtitle text track will have closed_captions: true
set.
Input Parameters | Type | Description |
---|---|---|
name | string | The name of the track containing a human-readable description. This value must be unique across all the text type and subtitles text type tracks. Defaults to language_code if not provided. |
passthrough | string | Arbitrary metadata set for the live closed caption track. Max 255 characters. |
language_code | string | The language of the closed caption stream. Value must be BCP 47 compliant. Defaults to en if not provided |
language_channel | string | CEA-608 caption channel to read caption data from. Possible values: "cc1" |
Create a live stream using the Live Stream Creation API. Let Mux know that closed captions will be embedded in the RTMP stream at time of live stream creation.
POST /video/v1/live-streams
Request Body
{
"playback_policy" : [
"public"
],
"embedded_subtitles" : [
{
"name": "English CC",
"passthrough": "English closed captions",
"language_code": "en-US",
"language_channel" : "cc1"
}
],
"new_asset_settings" : {
"playback_policy" : [
"public"
]
}
}
{
"data": {
"stream_key": "5bd28537-7491-7ffa-050b-bbb506401234",
"playback_ids": [
{
"policy": "public",
"id": "U00gVu02hfLPdaGnlG1dFZ00ZkBUm2m0"
}
],
"new_asset_settings": {
"playback_policies": [
"public"
]
},
"embedded_subtitles" : [
{
"name": "English CC",
"passthrough": "English closed captions",
"language_code": "en-US",
"language_channel": "cc1"
}
],
"id": "e00Ed01C9ws015d5SLU00ZsaUZzh5nYt02u",
"created_at": "1624489336"
}
}
Use the Live Stream Closed Captions API to configure closed captions to an existing live stream. Live closed captions can not be configured to an active live stream.
PUT / video/v1/live-streams/{live_stream_id}/embedded-subtitles
Request Body
{
"embedded_subtitles": [
{
"name": "en-US",
"language_code": "en-US",
"language_channel": "cc1"
}
]
}
Response
{
"data": {
"stream_key": "5bd28537-7491-7ffa-050b-bbb506401234",
"playback_ids": [
{
"policy": "public",
"id": "U00gVu02hfLPdaGnlG1dFZ00ZkBUm2m0"
}
],
"new_asset_settings": {
"playback_policies": [
"public"
]
},
"embedded_subtitles" : [
{
"name": "English",
"language_code": "en-US",
"language_channel": "cc1"
}
],
"id": "e00Ed01C9ws015d5SLU00ZsaUZzh5nYt02u",
"created_at": "1624489336"
}
}
Log into your preferred closed caption provider account (e.g. AI-Media, 3Play, Verbit) and create an event that needs to be captioned. To create an event, you will need to provide the following inputs
RTMP Server URL | Description | Common Applications |
---|---|---|
rtmp://global-live.mux.com:5222/app | Mux's standard RTMP entry point. Compatible with the majority of streaming applications and services. | Open Source RTMP SDKs, most app-store streaming applications. |
rtmps://global-live.mux.com:443/app | Mux's secure RTMPS entry point. Compatible with fewer streaming applications, but offers a higher level of security. | OBS, Wirecast, Streamaxia RTMP SDKs |
Upon successful event creation, the closed caption provider will provide the following
Learn more about:
Configure your video encoder with the Stream URL and Stream Key provided by the closed caption provider in Step 2.
When the stream goes live, a new live asset is created and tracks will be created for the corresponding captions.
When your stream is live, visit the Live Health Dashboard to monitor closed caption stream health. The dashboard will show whether Mux is receiving closed captions. More details can be found at Debug live stream issues
Let Mux know to not expect closed captions when the live stream starts again. This can be done by configuring your live stream to not have any captions. This request can only be made while the live stream is idle.
PUT /video/v1/live-streams/{live_stream_id}/embedded-subtitles
Request Body
{
"embedded_subtitles" : []
}
Yes. The 608 standard only supports the following languages: English, Spanish, French, German, Dutch, and Portuguese, or Italian. We currently only support live closed captions for a single language. We will evaluate supporting multiple languages based off of customer feedback.
Caption vendors known to support the 608 captions: 3Play, AI-Media EEG Falcon, Verbit
Caption vendors known to not support 608 captions: Rev.ai
You can only edit your live caption configuration while the live stream is idle; you cannot make any changes while the live stream is active.
Mux will translate the CEA-608 captions into WebVTT. Though Mux attempts to preserve the caption formatting, some formatting may be lost.
No. If you have a use case for this, please let us know.
https://stream.mux.com/{PLAYBACK_ID}/text/{TRACK_ID}.vtt
More details can be found at Advanced Playback features
Not at this time. If you have a use case for this, please let us know.