[FFmpeg-devel] Internal handling of subtitles in ffmpeg

Reimar Döffinger Reimar.Doeffinger
Thu Dec 18 21:33:56 CET 2008

On Wed, Dec 17, 2008 at 09:24:22PM +0100, Patrik wrote:
> 3. Create a general purpose function to convert text into a bitmap

Given the current subtitle (vobsub) code the most straight-forward
solution would be to make a text subtitle "decoder" that converts
the text to bitmaps. I am not sure if that will be a sane approach
in the long term though.
You could check out if libass (part od MPlayer but also a stand-alone
library) can help.

> 4. Add an interface for subtitle codecs to publish what types of
> subtitle inputs and outputs they can (or must) have
> 5. Add some logic in ffmpeg to determine how to convert the subtitle
> types between different codecs

That part sounds more like some kind of filter system.
I am not sure how well that would work.
If I had to do it, I'd probably try something like this:
one text subtitles in ASS format to bitmap subtitles "decoder"
bitstream filters (though possibly with some auto-select framework
as a next step) to convert all text formats -> ASS and ASS -> all text
Obvious disadvantage: assumes ASS can represent everything we want,
some conversions may need the video resolution, some may even need
the display resolution.

Reimar D?ffinger

More information about the ffmpeg-devel mailing list