Archive for August, 2012

How to extract frames from videos

August 21, 2012

Using mplayer, frames can be extracted from videos by simply selecting jpeg (or some other image format) as output driver. If the video is interlaced, a deinterlacing filter like yadif can be used. However, in this case it is important to add the scale filter at the end of the list in order to convert to RGB colorspace after deinterlacing.

The complete command looks as follows:

mplayer -vf yadif=1,scale -vo jpeg:quality=95 -nosound file.mpg