[FFmpeg-devel] Internal handling of subtitles in ffmpeg
Michael Niedermayer
michaelni
Fri Dec 19 14:40:57 CET 2008
On Fri, Dec 19, 2008 at 02:05:47PM +0100, Reimar D?ffinger wrote:
> On Fri, Dec 19, 2008 at 01:41:13PM +0100, Michael Niedermayer wrote:
> > for ffmpeg as a converter, pure bitmap subtitle support is not practical.
>
> That's not what I meant to say, I was only trying to say that unless you are
> converting to (or from) a bitmap format or display subtitles,
> AVSubtitleRect should never be involved because its assumption of any
> kind of a (single, fixed) coordinate system makes it unsuitable for anything else.
I dont see the problem. Let me be more concrete
typedef struct AVSubtitleRect {
int postype;///< 0->position encoded in data (only allowed when format is text-ASS),
1->video (0x0..1x1) relative,
2->screen (0x0..1x1) relative,
3->pixel relative
int format; ///< Describes what is in data, 0-> bitmap, 1->ASS based text
PixelFmt pix_fmt;
int x; ///< horizontal pos in 16.16 fixed point
int y; ///< vertical pos in 16.16 fixed point
int w; ///< horizontal size in 16.16 fixed point
int h; ///< vertical size in 16.16 fixed point
uint8_t *data[4];
int linesize[4]
} AVSubtitleRect;
> A corollary to this was that thus subtitle decoders should not be used
> for anything that does not create (pure) bitmap subtitles.
maybe i was unclear
the architecture in ffmpeg is
demuxer -> decoder -> encoder -> muxer
thus there WILL be a decoder and encoder when converting subtitles,
You fight about the terminology (and seem not to realize it)
demuxer -> muxer will not work i guess you agree?
demuxer -> A -> muxer would require formats^2 converters or one that
supprorted everything
demuxer -> A -(common format)-> B -> muxer is the simplest choice
and in this case in ffmpeg A is called a decoder and B a encoder
and the common format is a AVSubtitle this is per definition so
even if you rm AVSubtitle all encoders and all decoder and completely
redesign them, they still could and should be called like that.
[...]
--
Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB
Republics decline into democracies and democracies degenerate into
despotisms. -- Aristotle
-------------- 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/20081219/131be469/attachment.pgp>
More information about the ffmpeg-devel
mailing list