I am using the Repository version of the command line player MPlayer under Xenial Xerus LTS. When I open a video I would like to control the following:
- The size of the MPlayer window
- The position in the screen that the MPlayer window opens up in (i.e. centre, left, right. top etc)
How do I do this from the command line?
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:
2. Screen Position:
This can be set using the MPlayer
-geometry
option utilising either:x and y coordinates:
Percentage values:
To run a video in the middle of the screen try the following:
3. All together now...
Finally, to run the movie in the center of the screen, using a window width of 800, use the following:
How cool is the command line :)