hello guys
its been a while since my last question here :P
am working right now on PHP script to upload and convert video files to several resolutions ( 360 - 720 ),
here a piece of my php code to convert
move_uploaded_file($file_tmp, 'upload/'.$fileName);
add_to_queue($time,"360-".$fileName,$status="pending");
//where add_to_queue is simple function to add these information to queue table
$cmd = 'ffmpeg -i upload/'.$fileName.' -vf scale=480:360 -c:v libx264 -q:v 1 -strict experimental -c:a aac -b:a 160k convert/360-'.$fileName.' >/dev/null 2>/dev/null &';
shell_exec($cmd);
now everything here is ok and working great, but I need to check if the video encoding is completed and update the "status" column in queue table set it to complete and delete original file in "upload" directory.
another thing , I want only 5 videos for example to be encoded at same time to save server resourses.