views:

45

answers:

1

Hi!

I'm looking for a simple c/c++ lib that would allow to extract the first frame of a video as a uchar array. And have a simple fonction to access the next one.

I know of FFMPEG but it requiere to play with packet and things like that, and i'm surprised that nowhere on the net i can find a lib that allow something like :

Video v = openVideo("path"); uchar* data = v.getFrame(); v.nextFrame();

I just need to extract frames of a video to use it as a texture...no need for reencoding after or anything...

of course something that would read the most format than possible would be great, something built upon libavcodec for example ;p

And i'm using Windows 7

Thanks!

A: 

Use DirectShow. Here's an article: http://www.codeproject.com/KB/audio-video/framegrabber.aspx There are DirectShow 'add-ons' to decode different video formats. Here's one of the sites where you can grab free DirectShow filter packs to decode some common formats that are not directly supported by DirectShow: http://www.free-codecs.com/download/DirectShow_FilterPack.htm

Vite Falcon