[smpeg] Extracting images

Bill Kendrick nbs at sonic.net
Sat Apr 5 15:29:11 EST 2003

On Sat, Apr 05, 2003 at 07:37:27PM +1000, s367610 at student.uq.edu.au wrote:
> Hi - I'm trying to read in a MPEG File and extract it into a whole heap 
> of .bmp files.  At the moment I can get it playing onto the screen, but I 
> can't seem to find anything that would allow me to get the pixels out of a 
> frame.

I'm not sure if it'd work well (it may end up skipping frames, or having
some frames with 'tears' in them), but you can simply have SMPEG blit
to a surface, and then use SDL to save that surface out as a BMP.

I've never done saving... just filtering and special effects on a video
as it's playing (so the skipping is alright).  There might be another way
in SMPEG that makes more sense.

You might want to look into mplayer.  It has an option to save a video out
to separate image files.

bill at newbreedsoftware.com                                            Hire me!
http://newbreedsoftware.com/bill/    http://newbreedsoftware.com/bill/resume/

More information about the smpeg mailing list