[MPlayer-dev-eng] [libass] Ignore PlayResX/Y aspect ratio for font aspect ratio.
Grigori Goronzy
greg at chown.ath.cx
Wed Aug 19 15:17:08 CEST 2009
Nicolas George wrote:
> Ok, I see the problem. I had never met scripts that overcompensated for the
> scaling of anamorphic content. That is a shame: such scripts will look
> overly thin on settings that scale before rendering the subtitles, such as
> vo=gl.
>
Yes, but libass can compensate for that (the standalone version w/ uau's
MPlayer fork does it by default).
I like to call it "PAR decorrection". :)
> And, as I said, I have seen quite a few scripts that make the opposite
> assumption (so that they look the same on various encodings of the same
> content).
>
Actually I've never seen that.
> I believe this calls for an option. I think I can provide a patch adding:
>
> -ass-font-scale-x k
>
> With the following semantic:
>
> - k > 0: horizontally scale fonts by k; k = 1 means the current (braindead
> but compatible) behaviour; k = 45/64 compensates for a 64/45 scaling (16/9
> PAL).
>
> - k = -2: sets k according to PlayResX/PlayResY and orig_width/orig_height;
> this gives us the behaviour we had six months ago and that I liked.
>
This seems to be reasonable.
> - k = -1 (default): heuristic guess:
>
> - if any style in the script has ScaleX != 1, then behave as if k = 1
> (assuming that ScaleX is there to compensate for anamorphic content);
>
> - otherwise, behave as if k = -2
>
This doesn't. Often, ScaleX is used for complex typesetting (i.e.
squishing/stretching on purpose) and if there's a style with ScaleX !=
100 it doesn't really mean anything. So you would possibly misdetect
scripts that need k = -2 as scripts that need k = 1.
(ScaleX/Y is represented in percent, by the way)
Maybe it's a better idea to determine the scaling mode from the content
or container. If you've got Matroska with embedded ASS/SSA subtitles,
you can be almost 100% sure the "k = 1" behavior is expected. If you
have text (SRT/DVB etc.) subtitles that are converted by MPlayer and
rendered with libass, the "k = -2" behavior is needed, for example.
Grigori
More information about the MPlayer-dev-eng
mailing list