mplayer – capturing screenshots

Sometimes, you will want to save a picture of a movie scene. Say, you are watching a screencast, and want to save a picture of the piece of code on screen now. You then find out that PrintScreen has no use for videos. Or you may be watching a fast scene, with lot’s of information and you would like to see each frame carefully.

You can save each frame of a video to a series of PNG or JPEG files using mplayer. It’s quite simple.

First, create a directory for the pngs to be saved on. Say, /home/<you>/pngs

Get into that directory

type this command:
mplayer -vo png -ss 00:02:37 -endpos 67 /path/to/movie.avi

The -ss and -endpos parameters tell mplayer where to start playing inside a movie, and when to stop. you see, it’s quite unlikely you would want to convert an ENTIRE screencast to png. So, just take a note of the time the scene shows up (2 minutes and 37 seconds after start of movie on my example) and how long do you want to record (67 seconds for me). Every frame on this interval will be saved to 0000001.png, 0000002.png on your current folder.

Hope this helps someone.

Best

Powered by ScribeFire.

~ by Dante Regis on July 11, 2007.

3 Responses to “mplayer – capturing screenshots”

  1. thanks a lot for the info, dude. it HELPED me. thanks again

  2. oh, yes, you have been really usefull!! thanks a lot

  3. Hi,

    do you know a way to tell mplayer how to name or prefix the files?

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

 
%d bloggers like this: