Opened 11 years ago

Closed 11 years ago

#7736 closed patch (fixed)

DVB captions for Danish broadcasting channels (H.264 over DVB-T)

Reported by: Morten Grouleff <mg@…> Owned by: Janne Grunau
Priority: minor Milestone: 0.23
Component: MythTV - DVB Version: 0.22-fixes
Severity: medium Keywords: ffmpeg upstream? DVB subtitles/captions missing
Cc: Ticket locked: no


The captions are missing. Digging aroung in the debug-output and sourcecode I noticed the following.

In mpegts.c, function mpegts_parse_desc, while looking at the desc_tag value of DVB_SUBT_DESCID, the resulting sub_id for these subtitles is zero. The result of that is that the function pmt_cb (around line 792) does not detect it as a subtitle, but leaves it as a PRIVATE_DATA:

if (dvbci.sub_id && (stream_type == STREAM_TYPE_PRIVATE_DATA))


I found a simple cure: Relocate the change of stream_type to within function mpegts_parse_desc and remove the sub_id inspecting lines at

  1. This change is attached as a patch against rev 22974 on


Attachments (1)

danish-dvb-subtitle.patch (1020 bytes) - added by Morten Grouleff <mg@…> 11 years ago.
Patch enabling subtitles with sub_id = 0

Download all attachments as: .zip

Change History (6)

Changed 11 years ago by Morten Grouleff <mg@…>

Attachment: danish-dvb-subtitle.patch added

Patch enabling subtitles with sub_id = 0

comment:1 Changed 11 years ago by Morten Grouleff <mg@…>

Having studied the DVB-specs some more, I have not found anything indicating that those ID's should not be zero. Thus, I still think this patch is correct.

How should I proceed to get it committet? Is the silence here and on the mailinglist a hint that this should be targeted towards the upstream ffmpeg project instead?

comment:2 Changed 11 years ago by Stuart Auchterlonie

The patch is not correct because it is making the assumption that anything in a DVB private stream is a subtitle. This is not correct in wild.

I've seen channels with multiple private streams where some of them are data, some of them audio, and some of them video. There has to be a way of distinguishing between them and the component tag is the way of doing that.

This said, because they are private streams, there is no reference document that describes what the component tags are, since these are specific to that territories implementation of the private stream identification.

There may be some other identifying information in the PMT that we can use to pick out the subtitles correctly. dvbsnoop output showing the PMT of the program in question would help us here.


comment:3 Changed 11 years ago by mg@…

I have just built "ffplay" from upstream ffmpeg trunk. It does decode my test-streams correctly.

Actually, the code there is similar to my suggestion, in that it sets the type of the private data stream to be dvb_sub based on the "desc_tag", at line 955 in mpegts.c, using function "mpegts_find_stream_type".

Seing plans of a resync with ffmpeg-trunk in 0.23 on the mailinglist, feel free close this ticket as a duplicate of the resync-task.

comment:4 Changed 11 years ago by Stuart Auchterlonie

Keywords: ffmpeg upstream? added

comment:5 Changed 11 years ago by Janne Grunau

Milestone: unknown0.23
Resolution: fixed
Status: newclosed

as far as I can see fixed by the ffmpeg sync in [23525]

please reopen if not

Note: See TracTickets for help on using tickets.