[FFmpeg-devel] Internal handling of subtitles in ffmpeg

Michael Niedermayer michaelni
Thu Dec 18 23:12:31 CET 2008

On Thu, Dec 18, 2008 at 09:33:56PM +0100, Reimar D?ffinger wrote:
> On Wed, Dec 17, 2008 at 09:24:22PM +0100, Patrik wrote:


> > 4. Add an interface for subtitle codecs to publish what types of
> > subtitle inputs and outputs they can (or must) have

i assume you mean something like:

> > 5. Add some logic in ffmpeg to determine how to convert the subtitle
> > types between different codecs

i assume 
if(!(encoder.flags & CODEC_CAP_TEXT_SUB))

> 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
> formats.

What you suggest is _exactly_ what i want and what the original author
suggested (if i understood it correctly) but with different terminology

ASS -(decoder)-> bitmap
text_in_bitstream -(bitstream filter)-> ASS
ASS -(bitstream filter)-> text_in_bitstream

ASS -(renderer)-> bitmap
text_in_bitstream -(decoder)-> ASS
ASS -(encoder)-> text_in_bitstream

(and of course ASS can be replaced by some other format if ASS is
 insufficicent to handle everything, and in practice may not be
 ASS litterally but some struct having easy accessibel fields so
 we dont have to parse a string to get the times ..)


Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

When the tyrant has disposed of foreign enemies by conquest or treaty, and
there is nothing more to fear from them, then he is always stirring up
some war or other, in order that the people may require a leader. -- Plato
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20081218/24699fce/attachment.pgp>

More information about the ffmpeg-devel mailing list