This article describes how to configure Wowza Streaming Engine™ (WSE) media server software to ingest MPEG-TS DVB Teletext subtitle data as closed captioning data in live streams.
Teletext data is injected into the stream as AMF onTextData events and then translated to the various closed captioning formats for playback.
Enable DVB Teletext captions and debug logging
- Open WSE Manager.
- Click the Applications tab.
- Click the name of your live app.
- Click the Properties tab.
- In the Quick Links bar, click Custom.
- Click Edit.
- Click + Add Custom Property to enable the DVB Teletext property.
- In the Add Custom Property dialog box, enter the following settings:
- Path: /Root/Application/RTP
- Name: rtpDePacketizerMPEGTSListenerClass
- Type: String
- Value: com.wowza.wms.timedtext.dvbtt.RTPDePacketizerMPEGTSMonitorDVBTeletext
- Click + Add.
- Click + Add Custom Property to enable the DVB Teletext debug log property.
- In the Add Custom Property dialog box, enter the following settings:
- Path: /Root/Application/RTP
- Name: mpegtsDVBTeletextDebugLog
- Type: Boolean
- Value: True
- Click + Add.
- Click Save.
- Restart the app to apply the changes.
Adding these properties enables DVB Teletext ingestion and debug logging. Test your stream to confirm that DVB Teletext data is ingested. If captions are working properly, you can disable debug logging by changing mpegtsDVBTeletextDebugLog to False.
Additional caption debugging
DVB Teletext data is encoded in UTF-8. Special characters may not appear correctly in the console and logs. If you want to debug captions beyond logging, you can add the mpegtsDVBTeletextOutputPath property to your application to save subtitle data for each stream in UTF-8 format.
- Open WSE Manager.
- Click the Applications tab.
- Click the name of your live app.
- Click the Properties tab.
- In the Quick Links bar, click Custom.
- Click Edit.
- Click + Add Custom Property.
- In the Add Custom Property dialog box, enter the following settings:
- Path: /Root/Application
- Name: mpegtsDVBTeletextOutputPath
- Type: String
- Value: ${com.wowza.wms.context.VHostConfigHome}/dvbsubtitle
- Click + Add.
- Click Save.
- Restart the app.
- Create a
[install-dir]/dvbsubtitlefolder.
For each stream, a new file is created in this folder and subtitle data is saved in UTF-8 format.
Filter DVB Teletext subtitle data
You can also control what subtitle data is ingested using per-stream settings in your stream file. The DVB Teletext ingestion system will honor the mpegtsProgramID setting if used. You can filter subtitle data by adding the mpegtsDVBTeletextID and mpegtsDVBTeletextType parameters to a stream file.
mpegtsDVBTeletextID: The PID of the DVB Teletext track to be ingested. If unset, all DVB Teletext tracks are ingested. You can specify multiple PIDs in a comma-separated list.
mpegtsDVBTeletextType: The type of DVB Teletext pages to be ingested. You can specify multiple types in a comma-separated list. If unset, all page types are ingested. Possible DVB Teletext page type values are:- 1: Initial Teletext page
- 2: Teletext subtitle page
- 3: Additional information page
- 4: Program schedule page
- 5: Teletext subtitle page for hearing-impaired people
mpegtsDVBTeletextMagazineNumber(Integer): The magazine number where the subtitles are embedded. This information is in the Teletext descriptor in the PMT. (Default:08)mpegtsDVBTeletextPageNumber(Integer): Specifies the page number containing the embedded subtitles. This information is in the Teletext descriptor in the PMT. (Default:88)mpegtsDVBTeletextPreserveColor(Boolean): When true, WSE preserves the foreground colors from Teletext subtitles. It adds a spans array next to the text field in eachonTextDataevent, and each span gives the start position, end position, and color of a section of text. When false, WSE sends caption text without color information. (Default:false)mpegtsDVBTeletextRespectRowLineBreaks(Boolean): When true, WSE puts each Teletext row on its own line in the caption text, separated by a line break (\n), regardless of color. When false, WSE uses color to decide where lines break: rows that continue in the same color are joined with a space, and a line break is added only when the color changes. Note: Setting this to false works only whenmpegtsDVBTeletextPreserveColoris true. Otherwise, WSE ignores it and breaks at every row. (Default:true)mpegtsDVBTeletextIgnoreOptions(Boolean): When true, WSE ignores national option subsets and X/26 enhancement data, and decodes each character directly from the page's G0 character set. Use this when the source signals the wrong national option and characters such as #, $, @, or [ appear as accented letters or other symbols in captions. (Default: false)
Example stream file filters
The example below ingests program ID 6003 from a multi-program MPEG-TS stream:
{url:"udp://192.168.1.22:1234", mpegtsProgramID: 6003}
The example below ingests DVB Teletext data from PID 646:
{url:"udp://192.168.1.22:1234", mpegtsDVBTeletextID: 646}
The example below ingests DVB Teletext data from PID 646 and 647:
{url:"udp://192.168.1.22:1234", mpegtsDVBTeletextID: "646,647"}
The example below ingests DVB Teletext data with page types 2 and 5 (Teletext subtitle pages and Teletext subtitle pages for hearing-impaired people):
{url:"udp://192.168.1.22:1234", mpegtsDVBTeletextType: "2,5"}
If this MPEG-TS stream is configured properly and contains DVB Teletext data, you should see the following log statements:
RTPDePacketizerMPEGTSMonitorDVBTeletext.onPMT[stream-name]: programID:3410 RTPDePacketizerMPEGTSMonitorDVBTeletext.onPMT[stream-name]: Hit teletext PID: 0xd58 RTPDePacketizerMPEGTSMonitorDVBTeletext.onPMT[stream-name]: Subtitle page: lang:est type:2 magazine:6 page_number:150 RTPDePacketizerMPEGTSMonitorDVBTeletext.onPMT[stream-name]: Subtitle page: lang:lit type:2 magazine:6 page_number:151 RTPDePacketizerMPEGTSMonitorDVBTeletext.onPMT[stream-name]: Subtitle page: lang:lav type:2 magazine:6 page_number:152 RTPDePacketizerMPEGTSMonitorDVBTeletext.onPMT[stream-name]: Add teletext PID: 0xd58




