WebVTT subtitles in HLS — from teletext, DVB subtitles or speech
Updated 27 Oct 2026Browsers, phones and smart TVs that play HLS do not show teletext or DVB bitmap subtitles. Castreon can turn them into a WebVTT subtitle track inside the channel's HLS — the track viewers switch on with the CC button of the player — or make the text from speech when the source has no subtitles at all.
Available since Castreon 3.0.0, in all editions.
Turning it on
Channel editor → Subtitles → WebVTT in HLS (teletext, OCR, speech), then the WebVTT subtitles section:
- Text source:
- automatic (teletext, then DVB) — the teletext subtitle page if the source has one, otherwise the DVB subtitles;
- teletext — the text is read straight from the teletext page, with the accents of the broadcaster's character set: no delay, no CPU cost;
- DVB subtitles (images, read with OCR) — DVB subtitles are pictures; each one is read with text recognition (Tesseract) when it appears;
- speech (automatic recognition) — the sound is transcribed with whisper.cpp in chunks of 5–9 seconds, cut at pauses so words are not split.
- Teletext page — 100–899; empty = the first subtitle page in the stream (often 888 or 777).
- Language — an ISO 639 code (
ro,en,deu). It names the track in the player, chooses the OCR language and the speech recognition language; empty = from the stream (for speech: detected automatically).
The source's own subtitles also go out untouched on the MPEG-TS outputs (HTTP-TS, UDP, SRT…); the WebVTT track is for HLS.
In the player
The HLS master playlist gets a subtitle track with the language name written in its own language (Română, Deutsch…). The cues are timed on the same clock as the picture, also with fMP4 HLS, and the track keeps going across restarts and source switches.
On the channel page, the WebVTT subtitles card shows the state (running, waiting with the reason — for example The source has no teletext —, error), the number of cues and segments, and for speech how many chunks were skipped if the server cannot keep up.
What the server needs
- Teletext — nothing extra.
- DVB subtitles (OCR) — Tesseract with the language package:
sudo apt install tesseract-ocr tesseract-ocr-ron(Rocky / RHEL:dnf install tesseract tesseract-langpack-ronfrom EPEL). The installer does it withOCR=1(andOCR_LANGS="ron eng deu"for the languages). Without the language package, accented letters come out without accents — the editor warns you. - Speech —
whisper-clifrom whisper.cpp and a ggml model, by default at<data directory>/models/ggml-base.bin(other paths:whisperandwhisper_modelin/etc/castreon/castreon.json). Larger models are more accurate but need much more CPU; start with base and watch the channel's CPU.
If something is missing, the editor and the channel page say what, and the track stays empty until it is installed — the channel itself runs normally.
Good to know
- Speech recognition lags a few seconds behind the picture at the live edge: it suits channels without their own subtitles, not live programmes that need exact timing.
- OCR results are cached: a subtitle that stays on screen is read once.
- Burned-in subtitles (part of the picture) are not read.