Flussonic Media Server Documentation

Teletext and Closed Captions

Passing teletext to HLS and DASH

Flussonic allows passing DVB teletext from MPEG-TS:

  • To HLS — teletext in the WebVTT format
  • To DASH — teletext in the WebVTT and TTML format.

No additional options are needed to configure the conversion. If there is teletext in the input stream, then Flussonic will automatically convert it.

Configuration example:

stream example_stream {
  url tshttp://HOST/STREAM/mpegts;
}

To check for dvb_teletext in the input stream, you can use the following command:

ffmpeg -i http://HOST/STREAM/mpegts

Stream #0:0[0x447]: Video: h264 (Main) ([27][0][0][0] / 0x001B), yuv420p(tv, bt470bg, top first), 704x576 [SAR 16:11 DAR 16:9], 25 fps, 25 tbr, 90k tbn, 50 tbc
Stream #0:1[0xc12](eng): Audio: mp2 ([4][0][0][0] / 0x0004), 48000 Hz, stereo, fltp, 192 kb/s
Stream #0:2[0x17e2](swe,nor,dan,fin): Subtitle: dvb_teletext ([6][0][0][0] / 0x0006)

After the conversion, an output stream has teletext:

Flussonic teletext

Passing closed captions in HLS and DASH

Flussonic allows passing CEA-608/708 closed captions from MPEG-TS:

  • in the WebVTT format — to HLS
  • in the WebVTT and TTML formats — to DASH.

After transcoding a stream that has closed captions, Flussonic keeps the closed captions in the output stream.

To use this feature, add the option closed_captions=PID to the stream's URL.

For MPEG-TS streams:

stream example_stream {
  url tshttps://HOST/STREAM/mpegts closed_captions=211;
}

For HLS streams:

stream example_stream {
  url hlss://HOST/STREAM/index.m3u8 closed_captions=211;
}

To position subtitles on the video, use the option substyle valign=top|middle|bottom align=left|center|right, for example:

stream example_stream {
  url tshttps://HOST/STREAM/mpegts closed_captions=211;
  substyle valign=top align=left;
}

After the conversion, an output stream has closed captions:

Flussonic closed captions

Choosing subtitles format for DASH playback

As two formats of subtitles are included in a DASH manifest, you can choose one of them when playing an output stream:

https://HOST/STREAM/index.mpd?text=wvtt

or

https://HOST/STREAM/index.mpd?text=ttml (TTML is the default format, though)

Passing subtitles to MSS

Flussonic passes any type of subtitles (subtitles, closed captions, or teletext) in the TTML format to output MSS streams. No special configuration is required, the only requirement is that the incoming streams must have TTML subtitles.

You can configure the position of subtitles by adding substyle valign=top|middle|bottom align=left|center|right in the incoming stream settings:

stream origin {
  url file://vod/subs.ts;
}
stream example_stream {
  url tshttp://localhost:8080/origin/mpegts closed_captions=256;
  substyle valign=top align=left ;
}

About TTML subtitles

TTML (Timed Text Markup Language) is a standard for closed captioning and subtitling that is widely supported by media players, streaming platforms and other software, and also used in the television industry. The TTML standard offers rich features for positioning, alignment, styling, multiple languages, and so on. TTML subtitles are passed as an XML-based text file with the .ttml or .xml file extension.

Flussonic passes TTML subtitles to MSS and DASH streams.