I would recomend checking out the specs for avi and seeing how it writes it's frame headers and frame blocks. Then I'd unpack('CN',$avi_file) and take a quick looksie at the binary dump so I could see how to parse it for just 1 frame.
...also, you'll probably want to skip say 1/10th of the way through so you actually grab a scene rather than a black frame or opening credit.