我正在使用 PHP 的 shell_exec() 在执行 ffmpeg 命令,以将列表中的多个视频转换。有没有办法在视频转换过程中检测到错误发生(或者至少验证它完全完成了转换)?
我不想在出现错误时停止转换其他视频,只想记录下错误。
我不想在出现错误时停止转换其他视频,只想记录下错误。
<?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)
}
?>