[FFmpeg-devel] Subtitles for GSoC

Clément Bœsch u at pkh.me
Tue Mar 8 23:00:24 CET 2016


On Tue, Mar 08, 2016 at 10:33:44PM +0100, Gerion Entrup wrote:
[...]
> > For text subtitles, the ass field contains the text in ASS markup: indeed,
> > we consider the ASS markup to be the best/least worst superset supporting
> > almost every style of every other subtitles formats have, so it's used as
> > the "decoded" form for all text subtitles. For example, the SubRip (the
> > "codec", or markup you find in SRT files) decoder will transform
> > "<i>foo</i>" into "{\i1}foo{\i0}".
> I personally find the syntax a little unfamiliar (most styled text subtitles seem
> to use html), but ASS seems to be the most used text subtitle format with (advanced)
> styling capabilities.
> 
> As a sidenode (not necessary related to this gsoc task): If someday a renderer is available,
> the renderer has to parse and interprete it. My naive approuch would then be some kind
> of tree based structure (because all markup languages I know are tree based). Would it
> be an idea, to parse on the decoder side already and let the internal structure be not text,
> but a tree (independent of the subtitleformat)?

I submitted a prototype for exactly that a few years ago¹, but in the end,
a common markup is actually pretty much fine. The thing is, libass is
available everywhere, and that's what most players use for rendering
subtitles (that's the reason why when you can find many ASS tags into
random SRT file, which are actually correctly rendered).

You can look at how the ass filter (libavfilter/subtitles.c) currently
does just passthrough the decoded AVSubtitle to the libass renderer.

[...]

[1]: https://ffmpeg.org/pipermail/ffmpeg-devel/2012-November/134607.html

-- 
Clément B.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 473 bytes
Desc: not available
URL: <http://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20160308/bc45db66/attachment.sig>


More information about the ffmpeg-devel mailing list