[Matroska-devel] S_DVBSUB

Andreas Öman andreas at lonelycoder.com
Sat Feb 26 12:56:34 CET 2011

On Sat, Feb 26, 2011 at 10:34 AM, Steve Lhomme <slhomme at matroska.org> wrote:

> On Sat, Feb 26, 2011 at 10:32 AM, Dan Haddix <dan6992 at hotmail.com> wrote:
> > OK I think we have a plan. I'm going to lay it out one more time just for
> > posterity...
> >
> > If a DVB subtitle stream contains more then one substream then the muxer
> > must separate each substream into individual MKV tracks. This can be done
> by
> > either... a) creating a copy of each segment who's page ID corresponds to
> > either the composition or the ancillary ID of the substream to that track
> or
> > b) using the TrackOperation tag to create a virtual track which
> > automatically combines segments from two other tracks which contain the
> > ancillary data and the composition data respectively.
> >
> > In addition each MKV track will contain 8 bytes of CodecPrivate data
> which
> > will contain the following information...
> >
> > ISO_639_language_code - 24 bits
> > subtitling_type                - 8 bits
> > composition_page_id      - 16 bits
> > ancillary_page_id           - 16 bits
> >
> > No default values are assumed for these variables so if the CodecPrivate
> > data is missing, or malformed, then the track will be treated as invalid
> and
> > rejected by the player/demuxer.
> >
> > If that sounds right then I will add support to VRD for the next release.
> I
> > can also help add playback support to VLC. Although I can't currently
> build
> > VLC so someone else will need to build the changes and test them out. Any
> > volunteers?
> Not for now. I have plenty of things to do on VLC but I lack the time.
> What platform are you building VLC on ? On windows it turns out it's
> easier to use a Linux Virtual Machine to cross-build it, and then use
> the package on windows (via local network sharing).

I'll fix my video recording application 'Tvheadend' [1] to write S_DVBSUB
Currently it just writes the data and stores 4 bytes in CodecPrivate (mostly
this was easiest at the time and required a 1 line patch in FFmpeg to work)
Perhaps when we're done we could do some interop tests?

> > Now that we're done with this do we want to discuss how best to store
> > 608/708 captions and Teletext? :)
> Good luck ;)

Heh, Tvheadend just decodes each language from its teletext page and writes
those as S_TEXT/UTF8.
The obvious upside is that it works with most players out there. Downside is
that colors, etc are lost.
Perhaps writing it as SSA or something would be better.
I'm personally very much against inventing a new encoding as there are ways
to encode text subtitles already.

[1] http://www.lonelycoder.com/tvheadend
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.matroska.org/pipermail/matroska-devel/attachments/20110226/b58a49a2/attachment.html>

More information about the Matroska-devel mailing list