[FFmpeg-devel] [PATCH v5 10/12] avfilter/textmod: Add textmod filter
Soft Works
softworkz at hotmail.com
Mon Sep 13 03:22:41 EEST 2021
> -----Original Message-----
> From: ffmpeg-devel <ffmpeg-devel-bounces at ffmpeg.org> On Behalf Of
> Lynne
> Sent: Monday, 13 September 2021 02:11
> To: FFmpeg development discussions and patches <ffmpeg-
> devel at ffmpeg.org>
> Subject: Re: [FFmpeg-devel] [PATCH v5 10/12] avfilter/textmod: Add
> textmod filter
>
> 13 Sept 2021, 00:34 by softworkz at hotmail.com:
>
> >
> >
> >> -----Original Message-----
> >> From: ffmpeg-devel <ffmpeg-devel-bounces at ffmpeg.org> On Behalf Of
> >> Andreas Rheinhardt
> >> Sent: Sunday, 12 September 2021 23:56
> >> To: ffmpeg-devel at ffmpeg.org
> >> Subject: Re: [FFmpeg-devel] [PATCH v5 10/12] avfilter/textmod: Add
> >> textmod filter
[..]
> >
> > One unsolved problem I have about dealing with AVSubtitleRect
> > as being part of AVFrame is that it's not possible to make a copy,
> > in a reliable way because the allocated sizes of the data[4]
> pointers
> > are not reliably known.
> >
>
> We have cropping fields and cropping side data (IIRC) now,
> can they be used for this?
>
>
> > Usually, data[0] is the image and data[1] is the palette, but will
> > it always be like this? Then better not have a data array but
> > named pointer variables instead.
> >
> >
> > I was not sure what will be the general route: Merging AVSubtitle
> > into AVFrame or attaching AVSubtitle as a property to AVFrame.
> >
>
> I think that's not really the best way to go. Subtitles ought to
> be contained in the data[] fields and described by the other
> fields like with audio and video.
You mean subtitle rects? Each AVSubtitle can include multiple
AVSubtitleRect(s)
Each bitmap subtitle rect has its own x,y,w and h as well as flags.
There are no existing fields to describe this. It would need
an array of structs for these fields anyway (=> AVSubtitleRect),
so why put the data in the data pointers then?
And in case of text subtitles, would the data[] fields contain
strings then?
softworkz
More information about the ffmpeg-devel
mailing list