Skip to main content
Live streams can show captions in two ways: captions that the source already embeds, which Gcore passes through to viewers, and captions that AI generates while the stream runs.

Embedded captions

Pass-through requires a live stream whose source already carries CEA-608 captions. CEA-608 captions travel inside the H.264 video data as SEI messages, not in the transport, so RTMP and SRT pushes carry them in the same way. Gcore does not read, edit, or create the caption text. When the flag is on, the transcoder adds a caption track to the HLS MPEG-TS master playlist, and the text itself stays in the H.264 video of each segment.
Turn the flag on only for streams whose source is confirmed to carry captions. Without caption data in the video, the player shows a captions menu that selects and renders nothing.

CEA-608 input and output

The captions must be present in the stream that the encoder pushes to Gcore. These are the supported inputs: Captions on the CC2, CC3, and CC4 channels are not supported, so the source must put its captions on CC1. Captions appear only in HLS MPEG-TS, the hls_mpegts_url output of the stream, which is H.264. MPEG-DASH and HLS CMAF outputs do not change when the flag is on, so they carry no caption track. With the flag on, master_mpegts.m3u8 gets one #EXT-X-MEDIA line for the caption track, and every video variant points to it. This is the master playlist of a stream with captions enabled:
These are the tags the player reads: Only one caption language is available: the track is always labeled English (en) for every stream, and the label cannot be changed, so a source with captions in another language is still announced as en.

Enable CEA-608 captions

The flag is set per stream and is off by default, so existing streams keep producing the same playlists. Four steps turn captions on and check them in a player.
1

Check that the source carries captions

Play the source file or stream locally and confirm that the captions display. The captions must be CEA-608 data inside the H.264 video.
2

Set hls_mpegts_cc_tag to true

Send the flag with the stream update request. The stream object returned by GET /streaming/streams/{stream_id} includes the field, and POST /streaming/streams accepts it on creation.
3

Restart the push

The flag applies at the start of the next transcoding session. Stop the encoder and start it again, because a change made during a live session takes effect only after the restart.
4

Open the HLS MPEG-TS URL in a player

Load the hls_mpegts_url value of the stream (the master_mpegts.m3u8 link) in a player that supports closed captions, then open the captions menu and select CC1. The hls.js demo player shows the CC1 captions track with the text rendered over the video.

Push CEA-608 captions from FFmpeg

FFmpeg keeps the captions of a source file in the H.264 output when -a53cc 1 is set. The command below was tested with FFmpeg 9.0 and a transport stream recording that contains CEA-608 captions on CC1:
{RTMP_URL} is the server URL with the stream key appended, as described in the FFmpeg guide. The rest of the options are the usual H.264 and AAC settings for live ingest.

Check captions in a segment

The caption text can be read back out of the transcoded output, which confirms that the captions reach the playlist. Download a .ts segment listed in a media playlist such as media_mpegts_0.m3u8, then extract its captions with CCExtractor:
CCExtractor 0.96.5 detects the CEA-608 data in the H.264 video and writes the captions to an SRT file:
An empty SRT file means that the segment carries no caption data.

AI-generated captions

Gcore plans to generate captions with AI while a live stream runs, so streams without embedded captions get a caption track too. This feature is coming soon. Captions for recorded videos are already available as VOD subtitles.