[FFmpeg-devel] [PATCH] avcodec: add HDMV Text Subtitle decoder

Petri Hintukainen phintuka at gmail.com
Thu Feb 2 12:30:50 EET 2017

ti, 2017-01-31 kello 20:07 +0100, Paul B Mahol kirjoitti:
> On 1/31/17, Petri Hintukainen <phintuka at gmail.com> wrote:
> > Hello,
> > 
> > I think I posted HDMV text subtitle decoder patch year+ ago. But I
> > can't find it from list archives (?).
> > 
> > I'll attach the original patch for reference / documentation of the
> > format.
> > There's also more complete implementation (text styles,
> > positioning,
> > ...) in libbluray: http://git.videolan.org/?p=libbluray.git;a=blob;
> > f=sr
> > c/libbluray/decoders/textst_decode.c .
> > 
> > 
> Thank you much for this patch, do you have sample file where various
> styles are present?

I checked my samples, but I didn't find anything "interesting".

There's style segment in every file. But I haven't seen any exotic
styles used, just "normal" colors, font, font size, position, text flow

One file seems to use inline markers (italic text and style reset).
There are also couple of user styles, but those require some kind of
user interaction. Deltas in selected user style are applied to active
region style. Ideally user style selection should be available in the

Matroska samples can be created with recent enough mkvmerge. It seems
to parse also language information from playlist file (if present).

Also MakeMKV can create files with text subtitles, but I didn't manage
to get it working with incomplete discs (all my samples have truncated
a/v streams).

If we need files with exotic styles, I can probably create some.

> _______________________________________________
> ffmpeg-devel mailing list
> ffmpeg-devel at ffmpeg.org
> http://ffmpeg.org/mailman/listinfo/ffmpeg-devel

More information about the ffmpeg-devel mailing list