Keeping it Small and Simple

2007.05.23

Screenshots with mplayer

Filed under: Software — Lorenzo E. Danielsson @ 03:10

If you want to take screenshots with mplayer it is very simple. First of all, add -vf screenshot to the command line.


% mplayer -vf screenshot ~/videos/goldrake/goldrake_-_18_-_passagio_segreto.avi

Then, to take a single shot, make sure that the mplayer window is active (move the mouse over it if you are using sloppy focus) and press ‘s’. That will save the file as shot00001.png (assuming there were no previous screenshots in the current directory). The next time you press ‘s’ the file name will be shot00002.png and so on.

If you want to take continuous screenshots instead then press ‘S’ (shift+s). To stop taking shots, press ‘S’ again. Warning, this will create a lot of pictures in a very short time. Don’t leave this running for too long unless you have loads of hard disk space.

This post is dedicated to all those people who are too lazy to RTFM (man mplayer in this case).

2 Comments »

  1. That works fine!
    But how to save screenshot as shot00001.ppm format or others?

    Comment by Francesco — 2007.06.01 @ 09:32

  2. It seems mplayer’s screenshot functionality is rather limited in that regard. You could of course use ImageMagick or other utility to do the conversion. If you are using zsh, the following should work:
    for file in *.png; do convert $file ${file:r}.ppm; done
    I’m not sure if that helps you though..

    Comment by Lorenzo E. Danielsson — 2007.06.01 @ 12:05


RSS feed for comments on this post. TrackBack URI

Leave a comment

Blog at WordPress.com.