Subtitle Generation
video-generate-subtitles
Initiating Imgix Video
You must set fm=mp4 for Imgix Video parameters to take effect.
Processing time
Subtitle generation is processed on first request and may take a few minutes. While processing, requests to the VTT URL return a 423 status and the subtitles cannot be displayed. Once complete, the result is cached according to your source’s Video Cache TTL.
To avoid delays for end users, pre-generate subtitles by requesting the VTT URL as part of your upload or publishing workflow. This warms the cache so subtitles are ready before your player goes live.
The video-generate-subtitles parameter enables AI-powered transcription for your videos. When enabled, Imgix automatically generates a subtitle track from the video’s audio. Subtitles can be delivered embedded in an HLS or DASH manifest, or as a standalone sidecar VTT file via fm=vtt.
Enabling Transcription
Set video-generate-subtitles to true (or on) to always enable AI transcription. Use auto to transcribe only if the source video has no existing subtitle tracks — useful when you want to avoid re-transcribing videos that already have embedded subtitles. The spoken language is detected automatically.
https://assets.imgix.net/videos/girl-reading-book-in-library.mp4?fm=hls&video-generate-subtitles=trueTo disable transcription, set it to false (or off).
Forcing a Source Language
By default, Imgix auto-detects the spoken language. Use video-subtitle-lang to force a specific source language — useful when auto-detection produces inaccurate results or the audio contains a single known language. The value must be a valid ISO 639-1 or ISO 639-2 language code.
https://assets.imgix.net/videos/girl-reading-book-in-library.mp4?fm=hls&video-generate-subtitles=true&video-subtitle-lang=esRequesting a Sidecar VTT File
For native <video> elements, request an AI-transcribed subtitle file using fm=vtt combined with video-generate-subtitles=true. This returns a WebVTT file that can be loaded directly via a <track> element.
https://assets.imgix.net/videos/girl-reading-book-in-library.mp4?fm=vtt&video-generate-subtitles=trueSee the Creating a User Friendly Video Player tutorial for a complete HTML example using <track> elements.
To translate subtitles into additional languages, see Subtitle Translation.
Live Demo
The example below shows a native <video> element with an AI-generated English subtitle track loaded as a sidecar VTT file. Enable subtitles using the CC/subtitles button in the video player controls.