Working audio/video is best left to C. This means that you probably want to look for some C video libraries with an XS interface.
Luckily, there's FFmpeg (available at a CPAN near you).
In fact, it even has an example of capturing a frame from a stream in the SYNOPSIS portion of the POD.
Comment on Re: Generate screenshot from a video file?
I found FFmpeg too tedious to build and simply used the ffmpeg command line tool (as a prebuilt binary) from Perl - that's not hard either and saved me the hassle of collecting, configuring and compiling all the various libraries that ffmpeg needs to work. And luckily, ffmpeg can take the video stream from STDIN and can output the results to STDOUT.