[FFmpeg-devel] [PATCH v2 8/9] lavc/ccaption_dec: implement positioning for closed captions
wm4
nfxjfg at googlemail.com
Wed Jan 13 10:22:28 CET 2016
On Wed, 13 Jan 2016 08:57:30 +0100
Clément Bœsch <u at pkh.me> wrote:
> On Tue, Jan 12, 2016 at 05:42:59PM -0800, Aman Gupta wrote:
> > From: Aman Gupta <aman at tmm1.net>
> >
> > Positioning math is based on the guidelines in
> > https://dvcs.w3.org/hg/text-tracks/raw-file/default/608toVTT/608toVTT.html#positioning-in-cea-608
> > ---
> > libavcodec/ccaption_dec.c | 29 +++++++++++++++++++++++++----
> > 1 file changed, 25 insertions(+), 4 deletions(-)
> >
> > diff --git a/libavcodec/ccaption_dec.c b/libavcodec/ccaption_dec.c
> [...]
> > + x = ASS_DEFAULT_PLAYRESX * (0.1 + 0.0250 * j);
> > + y = ASS_DEFAULT_PLAYRESY * (0.1 + 0.0533 * i);
> > + av_bprintf(&ctx->buffer, "{\\an7}{\\pos(%d,%d)}", x, y);
> > +
>
> I'd be happier if the default alignment could be passed to
> ff_ass_subtitle_header() instead.
>
> Also, how confident are you about the support of the position? Because if
> it's incorrect in some cases, the default positioning is probably much
> better.
That's just my position as a single API-user, but I think it would be
good if the ASS producers that the style can be completely overridden.
It doesn't make much sense to force applications to display the (in
other cases) completely arbitrary style libavcodec makes up.
More information about the ffmpeg-devel
mailing list