Jump to content

shell_exec background process *Windows*


WorldDrknss

Recommended Posts

shell_exec does work since it is converting the videos and thumbnails. I do not receive any errors, but what I am trying to do is get the process to run in the background so that it will not hang up PHP.

 

function convertmedia($filename){
$inputdir = "../../media/vgallery/originals";
$outputdir = "../../media/vgallery/flv";
$samplerate = "22050";
$bitrate = "32";
$size = "400x300";
$ext = substr($filename, strrpos($filename, '.') + 0);
$strext = str_replace($ext, "", $filename);
$outfile = time()."_".$strext.".flv";
$ffmpegcmd1 = "ffmpeg -i ".$inputdir."/".$filename." -acodec mp3 -ar ".$samplerate." -ab ".$bitrate." -f flv -s ".$size." ".$outputdir."/".$outfile;
error_reporting(E_ALL);	
$ret = shell_exec($ffmpegcmd1);
echo $ffmpegcmd1."<br />";
return $outfile;
}

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.