[MPlayer-users] OpenGL vo fullscreen aspect

Beneath ishikodzume at beneath.plus.com
Fri Jul 25 15:45:59 CEST 2003


I was messing around trying to get vsync on my TV out (it's an nVidia
GeForceFX with the nvidia binary drivers), so i didn't have the messy
frame tearing.
I succeeded! By:
Starting X with both the TV and monitor resolution at 800x600.
Setting __GL_SYNC_TO_VBLANK=1.
Using mplayer -vo gl -fs
You can't have your monitor at a different res to the TV, because for
some reason then it wont wait for the TV refresh (don't ask me).

Anyway, this works wonderfully, except for one problem:
Anything that isn't 4:3 aspect, is stretched into 4:3... i.e. the OpenGL
vo doesn't give a crap about the aspect ratio when you give it the
fullscreen switch, and always scales up to the screen resolution
regardless of what you tell it to do.

The only solution i have found, is calculating what the height of the
video would be in a 4:3 aspect, given the horizontal resolution, and
using -vop expand=x:y, which GL fullscreen will not ignore when it
scales the movie.
For example, if i have a 16:9 640x360 movie, i can go:
mplayer -vo gl -fs -vop expand=640x480 movie.avi
And it will display it in the proper aspect, with black borders, and

However, with resolutions less obvious than 640, it gets a pain to
start whipping out the calculator... so, is there any way to get MPlayer
to expand the video correctly in OpenGL vo, without help from the user?
If not, is there any way to get MPlayer to spit out infos about the
resolution of the video and aspect ratio? Then i can write a script that
will fetch the info, parse it, calculate the correct values, and then
invoke mplayer accordingly.

Any ideas?

 - Daniel

PGP: http://spacecake.hypermart.net/pgp/ishikodzume.pubkey.asc
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/mplayer-users/attachments/20030725/3bd1b47e/attachment.pgp>

More information about the MPlayer-users mailing list