added output_extension param to extract_frames