[FFmpeg-devel] Internal handling of subtitles in ffmpeg
Fri Dec 19 10:47:25 CET 2008
> From: Michael Niedermayer <michaelni at gmx.at>
> On Thu, Dec 18, 2008 at 01:01:43PM -0000, Wolfram Gloger wrote:
> > > I have noticed that subtitles are sent internally in ffmpeg between
> > > decoders and encoders as bitmaps, which is a bit limiting if one were to
> > > introduce text-based subtitles.
> > Text-based subtitles _are_ already supported, please check out
> > CODEC_ID_TEXT et.al.
> have you tried ffplay with CODEC_ID_TEXT ?
No. I'm sure it doesn't actually display text -- but I didn't claim
that. My point was that the infrastructure is already there, no real
need for AVSubtitle changes in this respect.
> > > 1. Extend the "format" member of the AVSubtitle struct to include a text
> > > format and eventually specific types of graphic formats
> > The latter would of course be possible, but if that would be
> > required I would suggest to use AVPicture instead as that could
> > be AVFilter'ed more easily.
> AVFilter on utf8 strings?
No, AVFilter on _AVPicture_! What part of "The latter" was not clear?
Hint: I was referring to "specific types of graphic formats".
IMHO it was a mistake to have a special bitmap struct in AVSubtitle
rather than using AVPicture for the graphical subtitles. I have
already written two filters for the subtitle bitmaps which would
surely be refused for inclusion in ffmpeg because of "use AVFilter".
> > > 3. Create a general purpose function to convert text into a bitmap
> > Hmm, that would require complicated font handling.
> so, users are supposed to not see the subtitles?
> If they are supposed to see them text->bitmap IS mandatory
So, what font renderer would you suggest? Surely that would have
to be a huge external library?
Sorry, but I will not hold my breath for this..
More information about the ffmpeg-devel