[FFmpeg-devel] [RFC] Talk about subtitles

Clément Bœsch ubitux at gmail.com
Thu Nov 24 02:33:34 CET 2011


On Wed, Nov 23, 2011 at 01:16:56AM +0100, Stefano Sabatini wrote:
> On date Tuesday 2011-11-22 19:56:41 +0100, Clément Bœsch encoded:
> > Hi everyone,
> > 
> > [TL;DR: I want to improve/rewrite a real subtitles support in FFmpeg and need
> > some hints.]
> > 
> > Today again someone asked how to burn subtitles in a video. This is a recurrent
> > question which I think need to be solved now: some people still stick to the
> > unmaintained mencoder, try some pipes with MPlayer, or some lost code in
> > mplayer2, etc. And still nothing user friendly for this. Considering this, I
> > really wish to improve the situation with FFmpeg.
> [...]
> > This is all I can think about ATM. So if we want to support this properly, I can
> > only think of this: libavsubtitles (with a dependency to libass to render a lot
> > of crazy markup in subtitles).
> 
> Or in alternative maybe convince the libass author to join and make
> libass depend on this new lib ;-).

I already talked a few times with Grigori (zgreg, libass author) about
that. It is indeed a project that could be started, a dedicated
libsubtitles project. Though, I'm not sure this will ever get done, and
I'm not in the mood to start such project since it might actually never
reach FFmpeg (integration, parallel works in both project, ...). Also it
might require rewriting stuff again, and I'd like to avoid that. Having
the code in FFmpeg will actually provide an API to deal with subtitles if
other projects what to use it, so no need for an external project that
have several reasons to die.

> On the other hand I don't think
> this would be simple, and designing a generic enough
> subtitling/texting rendering layer is going to be a challenge.  But I
> suppose that a dependency on libfreetype and maybe fontconfig would be
> reasonable.
> 

I'd like to avoid the libfreetype/fontconfig dependency and let libass
deal with that; I want to use libass rendering for every text subtitles.

> > 
> > This library will be used to demux/decode/etc (for conversion purpose too) and
> > render the subtitles. And more importantly, we would be able to use it to burn
> > them through the libavfilter with something like vf_subtitles.
> > 
> 
> > There is ATM a pending patch (vf_ass) that can workaround the situation for most
> > of the people: a lot of software allow the convert from srt to ass, so it won't
> > be needed to duplicate the srt to ass convert code yet another time for the
> > filter. Users will be satisfied enough for a while I think with a simple ASS
> > burning filter. It will give us some time to think about a proper way to write
> > and integrate libavsubtitles. 
> 
> Ah my unfinished works!, wait up to this weekend and if I don't come
> up with nothing new feel free to pick up the filter and work on it,
> and to relicense it to LGPL if it suits you better.

I have faith in you, I'm sure you can do it ;)

And yes, having this filter upstream will greatly help me.

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


More information about the ffmpeg-devel mailing list