ProjectsCaptions
Captions in more languages
Translate a video's captions with Workers AI, review them, and add each language to the player
Example design
- 01Choose languagesAn editor picks the languages for a video that already has captions, generated by Stream or uploaded.
- 02Fetch WebVTTThe Worker fetches the source captions and keeps every cue's timing.
- 03TranslateCues are joined into sentences, translated with m2m100, and split back across the original timings.
- 04ReviewThe editor reads each translation beside the video and corrects it.
- 05Publish the trackThe Worker uploads each approved language to Stream as a WebVTT caption track, and the player offers it straight away.
- ifA product name gets translatedMachine translation sometimes translates names, product terms and legal wording that should stay as they are. A glossary of protected terms is applied before translation, and nothing is published without an editor's approval.
The problem
A video library with captions in one language reaches only part of its audience. Paying for professional translation of every video is slow and expensive, and most internal and educational content does not need it. Machine translation gets a draft in each language within minutes. An editor then corrects it before anyone sees it.
What it uses
- Stream
- Source captions, caption tracks and the player
- Workers AI
- Translation with the m2m100 model
- Workers and D1
- Jobs, review state and the glossary
The decisions, and why
- Unit of translationSentences
- A cue often ends mid-sentence. Translating whole sentences and splitting them back across the timings reads better than translating fragments.
- PublishingAfter an editor approves
- Machine translation is a draft. Captions published under your name need a person to read them.
- GlossaryProtected terms
- Product names and fixed phrases are kept out of translation, so each one only has to be fixed once.
- TracksOne per language
- Stream allows one caption track per language, so an approved correction replaces the earlier version.
Limits to plan around
- Stream allows one caption track per language for each video.
- Caption files on Stream are limited to 10 MB.
- Translation quality varies by language pair, so plan more editing time for some languages.
What you get
- Translation Worker and job queue
- Review page beside the video
- Glossary management
- Publishing to Stream caption tracks
- Tests for timing and cue splitting
Other projects
More video work on Cloudflare.
- Serverless video platformUploads, encoding, captions and signed playback with no servers to run
- FFmpeg encoding on Cloudflare ContainersYour own ladder and packaging, started by an upload, served from R2
- Sub-second live with WHIP and WHEPLive auctions, Q&A and watch-alongs where a few seconds of delay is too much
- Searchable video archiveFind the moment in hours of recordings by what was said
- Thumbnails and previews by URLHover previews, thumbnails and storyboards for a clip library, with no batch jobs
- Instant clips from a live streamViewers clip the moment they just saw and share it while the event is still on
DRM solutions
Three corporate use cases, each with a Widevine demo that runs in your browser and checks what your device supports.
Talk about your video project
Tell us what you are building, or what is not working in the platform you have.
Registered officeVI Data Services Ltd
128 City Road, London, EC1V 2NX, United Kingdom
128 City Road, London, EC1V 2NX, United Kingdom
Telephone
Company number
17420568
Registered in England and Wales