我在PHP的shell_exec()中運行ffmpeg命令來轉換列表中的多個視頻。無論如何要檢測視頻轉換過程中是否發生錯誤(或至少驗證它是否完全完成轉換)?PHP檢測shell_exec()命令是否失敗
我不想停止轉換其他視頻,如果發生錯誤,只是記錄錯誤的能力。
<?php
shell_exec('ffmpeg -i downloads/flv/file1.flv -vcodec libvpx -acodec libvorbis downloads/webm/file1.webm');
if(error) {
//run a command here to report the error (ie. MySQL or email)
}
?>
'if(error)'???????? –
您是否在尋找從ffmpeg返回的錯誤? – 2011-10-28 00:13:34
@Dagon正確。 – floatleft