Control opening screen position and size with MPlayer?

Two different sets of options that can be combined for ultimate output control:

1. Window Size:

The easiest way to set a size for the MPlayer window is to use the -xy option. If the value of this option is greater than 8 the width of the video window is set to that value. The height is then calculated from this width to maintain the correct aspect ratio.

To have a window 800 wide you would use the following:

mplayer -xy 800 test.mp4

2. Screen Position:

This can be set using the MPlayer -geometry option utilising either:

  1. x and y coordinates:

    50:40 Places the window at x=50, y=40
    
  2. Percentage values:

    50%:50% Places the window in the middle of the screen
    

To run a video in the middle of the screen try the following:

mplayer -geometry 50%:50% test.mp4

3. All together now...

Finally, to run the movie in the center of the screen, using a window width of 800, use the following:

mplayer -xy 800 -geometry 50%:50% test.mp4

How cool is the command line :)