I am running an exec() function which calls FFmpeg to run through converting a video, which it does successfully.
A problem I am running into is on certain servers a mysql_query which follows right after exec does not run. Somehow skips it.
Any suggestions here?
I have included the portion of code i'm referring to.
//Convert Video
exec("".$ffmpeg_path." -pass 1 -passlogfile ".$logfile." -i ".$video_embed." -y -f flv -ar 44100 -ab 128 -ac 1 -acodec mp3 -deinterlace -nr 500 -me_range 20 -b 350k ".$video_full_min.".flv");
exec("".$ffmpeg_path." -pass 2 -passlogfile ".$logfile." -i ".$video_embed." -y -f flv -ar 44100 -ab 128 -ac 1 -acodec mp3 -deinterlace -nr 500 -me_range 20 -b 350k ".$video_full_min.".flv");
check_online($fifteen_thumb, $video_online, $video_id);
check_online function
//check for thumbnail 15 - if no thumb declare video in error, else declare video ok
function check_online($fifteen_thumb, $video_online, $video_id){
if(!file_exists($fifteen_thumb)) {
$video_online = 'E';
}
if( $video_online == 'S' ){
$video_online = 'N';
} elseif ( $video_online == 'E' ){
$video_online = 'E';
} else {
if($video_date <= $date_today){
$video_online = 'Y';
} else {
$video_online = 'F';
}
}
mysql_query("UPDATE bls_posts SET online = '$video_online' WHERE ID = '$video_id'");
}
Thanks.