I was having this same problem and my solution was the following:
$ffmpegout = array(); //10 is the number of images you want from video $fracduration = ($info['duration']/10);
exec('ffmpeg -y -i /testmedia/'.$info['filename'].' -vf fps=fps=1/'.$fracduration.' -f image2 /testmedia/images/output%03d.jpg 2>&1', $ffmpegout); //print_r($ffmpegout);
This gives me 10 images for all the video no matter the length of video