[FFmpeg-devel] [PATCH] avfilter/vf_subtitles: pass storage size to libass

Soft Works softworkz at hotmail.com
Mon Mar 14 22:21:47 EET 2022



> -----Original Message-----
> From: ffmpeg-devel <ffmpeg-devel-bounces at ffmpeg.org> On Behalf Of Oneric
> Sent: Monday, March 14, 2022 9:08 PM
> To: FFmpeg development discussions and patches <ffmpeg-devel at ffmpeg.org>
> Subject: Re: [FFmpeg-devel] [PATCH] avfilter/vf_subtitles: pass storage
> size to libass
> 
> On Mon, Mar 14, 2022 at 19:57:05 +0000, Soft Works wrote:
> > > > ass_set_pixel_aspect() is setting settings.par and if I'm not
> mistaken,
> > > > an existing par setting leads to the storage size setting to be
> ignored:
> > >
> > > It’s not overridden. Only the explicit PAR is currently preferd over
> the
> > > implicit derivation from storage and frame size. However as I stated
> in
> > > the patch description and the comment:
> > >   “some tags depend on the exact storage resolution of the video”
> > >   “it actually goes farther than just the aspect ratio”
> > >
> >
> > I found only one other place where storage_h is used (for determining
> > blur size) but I didn't find any other usage in the libass source code.
> > That's what I'm wondering about.
> 
> Well, blur is one of the things that depend on it. If you follow the usage
> of the blur scale, you'll see it also plays a role in the projection
> matrix for 3D-transforms (what the provided samples use) and if
> ScaledBorderAndShadow is not set to "yes", it also affects some other
> scaling values.
> 
> This unfortunate dependence is a result of how SSA and then ASS
> histoically developed and required to maintain compaitibility with
> existing subtitles.

Ah, alright, the blur setting goes deeper. Thanks for the explanation.

LGTM, then!



More information about the ffmpeg-devel mailing list