Enable live captions for RTMP live streams

Enhance accessibility, and inclusivity by adding closed captions to RTMP live streams.

Live closed captions enhance accessibility by displaying spoken audio as text in real time. FastPix allows you to natively add these captions to your RTMP livestreams without extra tools. This feature is crucial for events like lectures, news broadcasts, and sports where clarity and accessibility are paramount.

FastPix supports closed captions only for RTMP-based livestreams. The RTMP protocol embeds captions in the HLS (HTTP Live Streaming) manifest, distinguishing it from other protocols like SRT that do not support this feature.


What are live closed captions?

Live closed captions provide real-time transcription of spoken content in video streams. They increase accessibility for viewers by converting speech to on-screen text, which can be toggled on or off by users.


How FastPix live captions work

FastPix uses AI speech-to-text technology to generate captions that are inserted into the HLS manifest during RTMP streaming. Captions are carried in WebVTT (Web Video Text Tracks) format, enriching the HLS playback experience.


Prerequisites

Before enabling live captions, ensure you:

  • Have a FastPix account with access to livestreaming features.
  • Use an RTMP-compatible encoding tool like OBS Studio or vMix.
  • Understand the basic configuration of FastPix API.

Create a livestream with captions enabled

  1. Use the FastPix Dashboard or the Live Streaming API to create a livestream.
  2. Include closedCaptions: true in the inputMediaSettings of your API request to enable caption tracks.
{
  "playbackSettings": {
    "accessPolicy": "public"
  },
  "inputMediaSettings": {
    "maxResolution": "1080p",
    "reconnectWindow": 60,
    "mediaPolicy": "public",
    "closedCaptions": true,
    "metadata": {
      "livestream_name": "fastpix_livestream"
    }
  }
}

NOTE:
If you don't use the captions parameter, no caption track will be generated, and captions cannot be retroactively added after the stream has started.


Broadcast using RTMP

Broadcast your video by:

  1. Obtaining the RTMP ingest URL and stream key from FastPix.
  2. Using your preferred encoder (for example, OBS Studio, Wirecast, vMix, ffmpeg) to publish video to the RTMP endpoint.
  3. Expect a caption delay of 20–30 seconds, allowing the system to stabilize. This is normal and expected.

Supported languages

FastPix supports multiple languages for live generated captions. See our language support documentation for the latest supported languages list.


Verify captions in playback

  1. Check the stream preview in the FastPix Dashboard for the CC button.
Using Google Drive link to upload
  1. Use a compatible player like hls.js, Video.js, or Shaka Player. Toggle the CC button to show or hide captions.

Player integration

FastPix captions integrate seamlessly with players like:

  • hls.js
  • Video.js
  • Shaka Player

Refer to each player's documentation to configure captions if needed.



Operational states and captions behavior

  • idle: The Live Stream is created but not receiving media. No captions are available.
  • connected: Your encoder authenticated to ingest. The stream is not yet playable, and captions are not yet visible.
  • active: The stream is playable. After a short warm-up, captions appear in the CC menu.
  • disconnected: The encoder stopped or lost network. If you reconnect within the window, captions resume when active.

Limitations and constraints

  • Protocol: Captions only work with RTMP ingest at this time. SRT ingest does not support this captions path. See using srt to live stream
  • Creation-time only: You must enable closedCaptions at Live Stream creation. You cannot add or remove captions mid-stream.
  • Player support: Captions require an HLS player that supports subtitle renditions. Custom players may need configuration.
  • Startup delay: Expect a 20–30 second delay before the CC track appears after the stream becomes active.
  • Simulcast: Simulcast outputs to third-party RTMP/SRT platforms do not include FastPix-inserted HLS caption tracks; provide captions on the destination platform separately.
  • Key rotation: Changing the stream key mid-event disconnects the encoder and interrupts captions.

Security considerations

  • Treat your FastPix stream_key as a secret, rotate it immediately if exposed.
  • Restrict access to playback by using signed or tokenized playback where applicable.
  • Captions may include user-identifying content, follow your data retention and compliance policies.
  • Limit write access to the FastPix Video API to server-side processes.

Troubleshooting checklist

  • Confirm the Live Stream was created with inputMediaSettings.closedCaptions: true.
  • Verify you are broadcasting over RTMP, not SRT.
  • Check that the Live Stream is active and wait 20–30 seconds for the CC track.
  • Test with a known-compatible HLS player and toggle the CC button.
  • Review Live Stream Health Stats for ingest warnings or segment errors.
  • Inspect webhooks for state transitions that affect availability.
  • If simulcasting, test captions only on the FastPix HLS output, not on third-party platforms.

Best practices

  • Create and test a caption-enabled Live Stream in a staging environment before production. See get started with live streaming
  • Keep encoder keyframe interval at 2 seconds and avoid sudden bitrate spikes.
  • Do not change encoder protocols mid-event, stay on RTMP if captions are required.
  • If you must use SRT for network resilience, document that captions will not be available to viewers.
  • For multi-destination events, publish captions natively on each third-party platform as needed.
  • Maintain operational observability with webhooks and health Stats throughout the event.

FAQs

Can I enable captions on an existing Live Stream?**

No. You must set inputMediaSettings.closedCaptions: true when you create the Live Stream.

Do captions work with DVR and recordings?**

Yes. DVR playback and on-demand recordings can include the captions track. Use the recording’s playback ID for DVR/rewind.

Will simulcast outputs (for example, YouTube, Facebook, Twitch) include my FastPix captions?**

No. FastPix-inserted HLS caption tracks do not propagate to third-party RTMP/SRT outputs. Configure captions on the destination platform.

How long before captions appear after I go live?**

Typically 20–30 seconds after the stream becomes active.

Is my content suitable for auto-generated live closed captions?

FastPix auto-generates captions suitable for most speech content. Audio clarity enhances caption accuracy.

What languages are supported for live generated captions?

Visit our language support guide to see all languages currently supported for captions.