I\'m running the ffmpeg command within PHP\'s shell_exec() to convert several videos in a list. Is there anyway to detect if an error happened while the video was being conv
$return=shell_exec('ffmpeg ...');
if ($return) { //look at what it returns do what you will with the data
}
Capture the exit code with another system call function like exec
:
exec('ffmpeg ...', $output, $return);
if ($return != 0) {
// an error occurred
}
Any decent utility will exit with a code other than 0 on error.