Does anyone know of a command line video frame capture application for *IX?

I need to capture 1 frame from a video using PHP and create an image from it, obviously PHP doesn't have an extension or internal function for this so an external application seems like the best option.

The problem with this is it must be able to run from a web directory via PHP's exec() function (it executes a command line...command) as my project will be used on hosted sites.

And...If possible, free from dependencies

Any help is extremely appreciated.