my $input_file = '/path/to/filename.mp4'; my $output_files = '/path/to/filename_%d.png'; my $start_time = 4; my $num_frames = 10; my @args = ( '/path/to/ffmpeg', '-loglevel', 'quiet', '-ss', $start_time, '-i', $input_file, '-frames:v', $num_frames, $output_files ); my $response = system( @args ); if ($response == 0) { print "system command success"; } else { print "system command failed"; }