Problems streaming and receiving TS streams with subtitles
We have run into two problems while testing UDP streaming of transport streams containing subtitles with VLC.
- Subtitle descriptors are lost during the transmission.
The test file "viewcopy.ts" which you can download at http://miha.fab-online.com/vlcprob1.zip contains following streams:
PID 210: video PID 220: audio PID 230: audio PID 240: teletext PID 151: DVB subtitles
Other streams (PAT, PMT etc) are also included in this stream but are not relevant to the problem.
Stream 151 contains following descriptors in the PMT:
Stream type = ITU-T Rec. H.222.0 | ISO/IEC 13818-1 packets containing private data
Elementary PID = 0151
ES info length = 10
Descriptor tag = Subtitling descriptor
Descriptor length = 8
ISO 639 language code = eng
Subtitling type = DVB subtitles (normal) with no monitor aspect ratio criticality
Composition page ID = 1
Ancillary page ID = 2
When we stream this file using VLC 1.0.5 and options ":sout=#std{access=udp,mux=ts,dst=239.192.1.1:1000} :sout-all", PMT gets regenerated inside VLC. Following streams are transmitted:
PID 68: private PID 69: audio PID 70: audio PID 71: video
Stream 68 corresponds to input stream 210 but contains no descriptors. PMT contains only following information for this stream:
Stream type = ITU-T Rec. H.262 | ISO/IEC 13818-2 video or ISO/IEC 11172-2 constrained parameter video stream
Elementary PID = 0071
ES info length = 0
Because of that, receiver doesn't know that this stream contains subtitles and doesn't display them.
Please note that VLC is perfectly capable of displaying DVB subtitles in this transport stream if it is played with the VLC instead of streamed. Subtitles start at 4,36 second time offset and are not synchronised to the voice (they were included for testing purposes only).
- Streams with DVB subtitles are not correctly processed in VLC when received over UDP and when streaming is configured via GUI.
To repeat the problem, run the multicastUdp.exe utility (provided in the abovementioned ZIP file). Configure IP address to a valid multicast address (for example 239.192.1.1) and port to some port (for example 1000).
Click "Select" to select transport stream file "viewcopy.ts".
Start VLC and configure streaming via Media, Streaming (Ctrl+S). Select UDP, 239.192.1.1:1000 as a source, select "Display locally" and disable "Activate transcoding".
Click "Start" in the multicastUdp program.
VLC will play the video correctly. However, if you select the Video, Subtitles track menu you’ll see a text saying "DVB Subtitles" with no subtitling language attach. Obviously, DVB descriptors are not processed correctly. If you select this subtitle track, no subtitle will be shown.
If you repeat the process but start VLC streaming directly from the command line with "vlc udp://@239.192.1.1:1000", Subtitles track menu will display "DVB Subtitles – [English]" and subtitles will be activated if you select this menu item.