Home > Uncategorized > mplayer – capturing screenshots

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.

Categories: Uncategorized Tags:
  1. vinay
    September 27th, 2007 at 15:41 | #1

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

  2. elle
    October 21st, 2007 at 18:31 | #2

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

  3. schmkr
    January 17th, 2008 at 12:33 | #3

    Hi,

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

  1. No trackbacks yet.