[MPlayer-users] ASS move jerks

Evgeniy Stepanov eugeni.stepanov at gmail.com
Fri Aug 8 00:34:09 CEST 2008


On Wednesday 06 August 2008 22:58:53 Damien Thébault wrote:
> On Mon, Aug 4, 2008 at 23:58, Damien Thébault <damien.thebault at gmail.com> 
wrote:
> >> Nothing like that here. Please, tell us your mplayer build version,
> >> submit a font you use and an *.ass file that demonstrates the effects
> >> you described.
> >>
> >> Also, mplayer -v output would be useful.
> >
> > [...]
> >
> > Here are a small subtitle file, the used font it DejaVuSerif.ttf
> > (can't attach it because it's too big, but it's available at
> > http://dejavu.sourceforge.net/wiki/index.php/Download )
>
> The problem is even more visible with a low-resolution .ass file (see
> attached file for example).
> I looked at libass, and everything is done in script coordinates, and
> not in screen coordinates. So when you have a script file in 64x48,
> and a 1280x720 movie, the text jumps from one script pixel to another.
> It should be possible to do everything in screen coordinates, it would
> allow fluid movements.
>
> I'll maybe try to do this if I have some time and nobody did take care of
> it.

I've switched pos_x/pos_y to double and it moves much more smoothly now. It 
now jumps by screen pixels instead of script pixels.

Taking it one step further and achieving subpixel precision would not be that 
easy.
1. The subpixel part of screen coordinate has to be known before the first 
glyph is extracted from font, otherwise it will not be hinted correctly. 
\move and \pos can appear anywhere in the line, so we either need some kind 
of preprocessing, or delay glyph extraction until all the line has been 
parsed.
2. More importantly, \move will be slow as hell, as it will need to render the 
line from scratch for each frame.



More information about the MPlayer-users mailing list