[FFmpeg-devel] Text subtitles misc patches

Clément Bœsch ubitux at gmail.com
Fri Jun 15 19:29:07 CEST 2012


So here is a first patchset to improve a bit text subtitles support in FFmpeg.

[PATCH 1/8] lavf: add internal demuxer helpers for subtitles.

    This is the change I was talking about in a previous thread: a basic helper
    to create a queue of subtitles that can easily be raised in read_packet().

    I used a new struct because I thought it was the more simple approach.

[PATCH 2/8] lavf/jacosubdec: use subtitles queue API.

    Simplification using the new API...

[PATCH 3/8] lavf/microdvd: rewrite using subtitles queue API.

    And again.

[PATCH 4/8] lavc/ass: honor Default style.

    The "Default" style written in the header is ignored unless you explicit it
    in the Dialogue events. This requires an update of the SubRip test since
    the ASS output changes (obviously).

[PATCH 5/8] lavc/microdvddec: support "DEFAULT" properties.

    Previous commit makes possible to set a general header in MicroDVD, so the
    MicroDVD's "DEFAULT" directive is now honored.

[PATCH 6/8] fate: introduce subtitles.mak and move SubRip test in

    More subtitles tests to come...

[PATCH 7/8] fate: add JacoSUB and MicroDVD subtitles tests.

    ...here they are.

[PATCH 8/8] SAMI demuxer and decoder.

    I looked at libexpat, but unfortunately it miserably fails on at least two
    things with the example from the specs (which is now in FATE samples, in
    sub/ directory):
    - tags parsing is case sensitive (it fails on "<STYLE>...<Style>")
    - unclosed tags breaks the parser (<SYNC ...><P ...> ... <SYNC ...> ...)

    IMHO the current parsing is good enough...

    This commit also includes a fate test.

So what's left?

Well basically, I'm still unsure how the read_seek2() callback in lavf/assdec
really works. Also, if someone wants to use the new subtitles-queue-api for
lavf/assdec, that would be very welcome... Any volunteer?

I'm starting to work on the RT subtitles now, and maybe other simple text

If someone wants to make some tests or work on top of this patchset, he can
simply checkout https://github.com/ubitux/FFmpeg/compare/master...subtitles


More information about the ffmpeg-devel mailing list