[MPlayer-users] How to force SSA subtitles size to constant one ?

Evgeniy Stepanov eugeni.stepanov at gmail.com
Fri Aug 24 22:23:56 CEST 2007


On Friday 24 August 2007, Παναγιώτης Κατσαλούλης wrote:
> The reason I am trying to find a solution is  because I am the author
> of "jubler" which is a subtitle editor and I am using mplayer to test
> subtitles in real time.
> One of it's distinct features is that it has a WYSIWYG editor for
> subtitles, especially in ASS/SSA format. So, for example, the user
> selects font "Arial 24" and previews the subtitle with the given values.
>
> If mplayer displays this subtitle, then the font size is smaller than
> expected (for the reasons described here). So, there is a mismatch I
> am trying to solve - and the reason nobody complained about it up to
> now is probably because most people write formatting by hand and not
> using a WYSIWYG environment ;)
>
> The solutions I see are these:
>
> 1) Make mplayer use standard font metrics.
>
> 2) Execute mplayer giving a proper -ass-font-scale parameter,
> calculated from the difference font metrics
>
> 3) When jubler creates the subtitle file, instead of using the given
> font sizes, calculate new font size based on the value of OS2
> metrics. E.g. when the user requests a font size of 24, to save
> inside the file a font size of 30.
>
>
> For me solution #1 is the best, since this retains compatibility with
> the whole operating system font metrics and not with an obsolete (but
> widely used) filter.
> Solution #2 hides the actual problem.
> Solution #3 makes a mismatch from what the user has asked and what he
> sees inside the text subtitle file.
>
> Your suggestions are highly appreciated!

If you are generating subtitles in SSA/ASS format, then they will later be 
displayed using os2 metrics. Either with mplayer, or asa (aegisub and, in the 
future, vlc), or vsfilter. It can be considered part of the standard, and it 
is absolutlely needed for all the subtitles made over the years to be 
displayed correctly.

So, both 1st and 2nd solutions are just hiding the actual problem. I'd suggest 
recalculating font sizes (as in 3rd solution). Another way is to give up 
compatibility with OS metrics. Just assume that fonts in subtitles look 
differently that in the OS. After all, subtitles will be displayed in 
differents OSes, and these OSes use different metrics.



More information about the MPlayer-users mailing list