[MPlayer-users] Re: expand (and subtitles, again?)

JiHO jo.irisson at noos.fr
Tue Jul 27 23:41:40 CEST 2004


Rudo Thomas wrote:
>>>I was just wondering whether it is possible to expand a movie (using vf
>>>expand, that is) to fit the monitor. In other words, to let the height
>>>calculate itself automagically so that the resulting dimensions have the
>>>same ratio as the monitor.
>>
>>[...]
>>
>>if it's for your own monitor only, at a given definition, let say 
>>1024x768 a combination of vf scale and expand could work:
>>        -vf scale 1024:-2:0:0:20,expand=0:768:0:384
>>-vf scale scales the movie to the width of the screen, keeping the 
>>orginal aspect ratio (-2 for the height)
>>then vf expand expands the height with black bands to fit the height of 
>>the screen and places the movie on the middle (position to 384 = 768/2).
>>and you can put your subtitles in the bottom black band.
> 
> 
> Actually, this will not place it in the middle, it will place its upper border
> in the middle. 0 should be used instead of 384. Nevermind, the problem is
> elsewhere...

I thought the same at first but testing proves me right. in fact I think 
it's the center of the movie that is mapped or something like that. 
maybe it's linked to the fact that 0:0 defaults to center.

>>nevertheless, because of the windows bars and borders your window will 
>>not fit on the screen, it will be too big. It will only fit when 
>>switching to full screen).
>>furthermore, if you only need a little black space to put your subtitles 
>>underneath the picture this is enough:
>>        -vf scale=1024:-2:0:0:20,expand=0:-140:0:70
>>and then full screen.
>>
>>was it what you looked for?
 >
> Yes and no.
> 
> Your solution does the right thing, but uses software scaling, which is
> something I would like to prevent.

indeed I remarked that this solution uses lots of CPU. that's BAD.

> Obviously, I would welcome something like the -2, but as an argument to expand.
> Should I cook up a patch for this, or is something similar flying around (or in
> CVS, for example)?

I think I understand what you want now. the point is that expand will 
just add black borders to the movie, so that if you expand only, you 
will find your original window placed in the middle of a big 1024x768 
black window. this is obviously not what you want.
so if I understand well you might want that mplayer adds black bands on 
top of bottom of your movie so that, when you switch to full screen 
(hardware scaling), the whole (movie + black bands) takes the entire 
screen. is it correct?
if it is, I think it should be done somewhere. I don't know any option 
to do that in CVS but I don't know much. nevertheless I'm sure it's a 
basic option of a windows version of mplayer. I tested it in mpf 
(MPlayer Front End):
http://deje.uw.hu/
But I don't know how this is done, namely of it is a basic option of 
mplayer or if it is a script of the frontend. maybe you can contact the 
author there.

PS: scripting for this should be easy anyway. it must be something like 
looking at the aspect ratio of the movie in mplayer's output and 
calculate it to fit the aspect ratio of your screen.

it's a great idea so if you get the answer please let me know.
-- 
JiHO
---
   Windows, c'est un peu comme le beaujolais nouveau :
à chaque nouvelle cuvée on sait que ce sera dégueulasse,
     mais on en prend quand même, par masochisme.
---




More information about the MPlayer-users mailing list