I am executing certain code through ffmpeg to encode avi files to flv. My ffmpeg code is correct and is working fine, but when some error occurs (suppose it is a corrupted avi file, ffmpeg will not encode it), so i want to know what the error is. Here is a sample code:
$v_cmd=" some code to transcode";
exec($v_cmd,$v_output,$v_status);
if($v_status == 0)
{
echo "Success!";
}
else
{
echo "ERROR: ".$v_output;
}
But this $v_output is just showing up as ERROR: Array ... i tried
echo "ERROR: ".implode($v_output);
but it was blank... how can i get the error message that ffmpeg gave so that i can understand what went wrong. This is a php cron script and it is not run in command line manually.