use Image::Magick; my $img = new Image::Magick; $img->Read("file.mpg[$frameno]"); my $x = $img->Write('frame.png'); warn "$x" if "$x";