Capture FFMPEG output

后端 未结 4 1871
鱼传尺愫
鱼传尺愫 2020-12-29 11:24

I need to read the output from ffmpeg in order to even try the solution to my question from yesterday. This is a separate issue from my problem there, so I made a new quest

4条回答
  •  遥遥无期
    2020-12-29 12:08

    To get output status and output:

    exec("ffmpeg -i input.avi output.mp4 2>&1", $output, $returnStatus);
    
    print_r($output);
    
    if($returnStatus === 0){
       // success
    }
    else {
       //fail
    }
    

提交回复
热议问题