Capture images from mpg file

Hello

Does anyone know how to capture images from mpeg files
I tried it with mediaplayer
can you show me a piece of code or something

thanks and regards

Arnoud Zeeuw