DVB subtitles (ETSI EN 300 743)
The subtitles of European digital television: pictures, sent in the broadcast's transport stream beside the picture and sound, which the receiver lays over the programme when the viewer turns them on. They have no file of their own. Subtitld reads them from a recording with an OCR add-on, and writes them into a transport stream of your video.
At a glance
| Specification | ETSI EN 300 743, from a draft of 1996; ETSI EN 300 468 for how a stream lists them |
|---|---|
| Where they travel | A stream of its own in an MPEG transport stream (.ts, .m2ts); Matroska tracks |
| Time precision | A tick of a 90 kHz clock |
| Characters | None: the words are pixels. The standard allows objects coded as characters too. |
| Styling | Whatever was drawn, in palettes of 4, 16 or 256 colours, each with a transparency |
| Positioning | Regions anywhere on a display of 720×576, or of the size the stream defines |
| Speakers | None |
| Channels | A stream can carry several services: a language each, or subtitles for the hard of hearing |
A display set
A subtitle is a display set: segments, each starting with 0F, its type, its page and its length, sent in a PES packet stamped with the time it shows. This one is what Subtitld writes for a subtitle of 400 × 60 pixels:
0F 14 0001 0005 07 077F 0437 0F 10 0001 0008 03 1B 00 FF 02F8 03C0 0F 11 0001 0010 00 1F 0190 003C 6F … 0F 12 0001 0014 00 1F 00 3F 00 80 80 FF … 0F 13 0001 0567 0000 11 02B0 02B0 … 0F 80 0001 0000
- 1 · Display
The display the subtitles are drawn for: 1920 × 1080, given as 1919 and 1079. Without it, 720 × 576.
- 2 · Page
What is shown: for 3 seconds at most, a mode change (start again, forget the rest), region 0 at 760 across and 960 down.
- 3 · Region, palette, object
The region's size and depth, 8 bits a pixel; its palette, each colour as Y, Cr, Cb and a transparency; then the picture, its even lines and its odd lines run-length coded.
- 4 · End
The display set is complete: show it.
The page with nothing on it, sent when the subtitle ends, takes it away: 0F 10 0001 0002 00 23, a page in the normal case with no regions.
The segments
| Type | Segment | What it holds |
|---|---|---|
10 |
Page composition | The regions shown and where, and for how long at most |
11 |
Region composition | A rectangle of pixels, its depth, its palette and the objects in it |
12 |
CLUT definition | A palette: 4, 16 or 256 entries |
13 |
Object data | A picture, coded in strings of 2-, 4- or 8-bit pixels, or as characters |
14 |
Display definition | The size of the display, when it is not 720 × 576 |
80 |
End of display set | Show what came since the page composition |
How a stream lists them
The transport stream's programme map names the subtitle stream with a subtitling descriptor: for each service, its language in three letters, its type, and its pages.
| Type | Subtitles |
|---|---|
10 |
For any display |
11 to 13 |
For 4:3, 16:9 and 2.21:1 displays |
14 |
For an HD display |
20 to 24 |
The same, for the hard of hearing |
A service has a composition page of its own and may share an ancillary page with the others, for the palettes and pictures they all use.
DVB or teletext?
| DVB subtitles | Teletext | |
|---|---|---|
| Holds | Pictures | Characters |
| Looks | Any font and colour, drawn by the broadcaster | The receiver's teletext font, in 8 colours |
| A stream holds | A service for each language | A page for each language: 888, 889 … |
| Carried by | DVB broadcasts | Analogue TV first, then DVB broadcasts and OP-47 in HD studios |
DVB subtitles in Subtitld
- Every subtitle, as the preview draws it: its text, line breaks, formatting, colours and place
- A service for each language: the original, and a translation each if you choose
- Each service's language
- Start and end, to the 90 kHz tick
- The text itself: a receiver shows pictures, and reading them back takes OCR
- Forced subtitles: a viewer turns a service on or off
- Colours past 256, or past 16 in a large subtitle
- Dubs, speakers' names and faces
Save a .usfx project to keep what is Subtitld's.
Reading the DVB subtitles of a video
The words are pixels, so an OCR add-on reads them: Tesseract OCR or PP-OCRv5, from the Add-ons panel.
Open the recording as the video. In the Import panel, choose the Subtitles in the video engine, then the track: each service of a stream is a track of its own, with its language, and marked when it is for the hard of hearing. Read subtitles reads it. Subtitld reads:
- the regions of the service's page, drawn into one picture, from the display set's time until the next one or its time-out;
- 2-, 4- and 8-bit regions, their palettes and the standard's default ones, and the ancillary page the service shares;
- a display set that takes several PES packets, whole;
- objects coded as characters, as their words, which need no reading;
- times from the start of the file, as FFmpeg counts them.
A transport stream is read as it is; a DVB track in another container, a packet at a time through FFmpeg.
Writing them
DVB subtitles have no file of their own: they go in a transport stream with the video. In Export, under Video, choose Transport stream (.ts), Embedded, subtitle track, and DVB subtitles, drawn as pictures as the Track format. A track for each translation as well adds a service for each.
Each subtitle is drawn as the preview draws it, for a 720 × 576 display when the video is standard definition and a 1920 × 1080 one otherwise, its colours brought into a palette of 256. The picture and sound are copied, not encoded again. Each stream has one service, page 1, of type 10 or, for HD, 14, in the language of its text.
One PES packet a subtitle. FFmpeg reads only the first PES packet of a display set and refuses the rest, so a subtitle spread over several shows only its top part in FFmpeg and the players that use it: a picture of 400 lines over eight packets comes out as its first 50. Subtitld keeps each display set in one packet: a subtitle too large for that in 256 colours is written in 16, coded in 4 bits a pixel, which takes far fewer bytes.
Trivia
ETSI's first draft of the DVB subtitling system, prETS 300 743, is dated November 1996. Version 1.3.1 of 2006 describes the display definition segment, for displays other than 720 × 576.
The sync byte every segment begins with, 0000 1111, before its type, its page and its length.
Colours in an 8-bit region's palette. The standard defines a default palette for each depth, used where a stream gives none.
Related formats
-
888Teletext subtitles (EBU Teletext, and OP-47)
-
.supPresentation Graphic Stream
-
608 708CEA-608 and CEA-708 closed captions
Open it in Subtitld with the video and retime it on the waveform.