[FFmpeg-devel] Subtitle filters in libavfilter

Chris Burel chrisburel at gmail.com
Wed Jan 30 02:17:37 CET 2013

2013/1/29 Stefano Sabatini <stefasab at gmail.com>

> On date Tuesday 2013-01-29 17:17:37 -0500, Chris Burel encoded:
> > My original post was this one, and it gives some of the issues with doing
> > the rendering in the xsub encoder or ass decoder:
> > http://ffmpeg.org/pipermail/ffmpeg-devel/2011-May/112170.html
> >
> > At the time, it was suggested to add subtitle support to libavfilter, and
> > that seemed like the cleanest approach to me.  Then when I saw the ass
> > video filter had already been implemented, it seems like most of the code
> > is already in place.  All that would be necessary is to split up the
> filter
> > into two separate ones.
> Uhm no subtitle support in libavfilter is definitively not
> implemented. The clever hack we have allows to convert a subtitle file
> to ASS through libavcodec, and then use libass rendering to overlay it
> on top of the input.
> Yes, I understand there's no subtitle support currently.  From my post a
few years ago, it seemed like adding subtitle support to libavfilter would
not be that much work.  I'm interested in trying to hack something
together, but I'm not sure how some pieces apply to subtitle streams, like
I mentioned in my first post.

> I don't know what you mean by "split up the filter into two separate
> ones".
>From what I see, the ass video filter currently does 2 things:
1. Use libass to render text-based subtitles to images.
2. Overlay those subtitles with a video

Currently, it is a video filter, because it takes in a video stream and
outputs a video stream, and because there's no subtitle support.  If there
were subtitle support, those 2 steps could be split into separate filters.
The first one that renders the subtitles would be a subtitle source filter,
and the second one would be similar to the video overlay filter, taking in
one video stream and one subtitle stream (with images already rendered).

> --
> FFmpeg = Freak & Freak Meaningless Picky Elastic Guru
> _______________________________________________
> ffmpeg-devel mailing list
> ffmpeg-devel at ffmpeg.org
> http://ffmpeg.org/mailman/listinfo/ffmpeg-devel

More information about the ffmpeg-devel mailing list