Captions come in two varieties, based on their relationship to the
video. Typically on the web, captions are delivered as a separate file
and associated with a video through the <track>
element. This type
of captions are sometimes referred to as out-of-band.
The alternative method involves embedding the caption data directly into the video content and is sometimes called in-band captions. In-band captions exist in many videos today that were originally encoded for broadcast and they are also a standard method used to provide captions for live events. In-band HLS captions follow the CEA-708 standard.
In this project, in-band captions are parsed using a CaptionStream. For MPEG2-TS sources, the CaptionStream is used as part of the Transmuxer TS Pipeline. For ISOBMFF sources, the CaptionStream is used as part of the MP4 CaptionParser.
If you are having difficulties getting caption data as you expect out of Mux.js, take a look at our Troubleshooting Guide to ensure your content is compatible.