");*/ $job_counter = 0; //mail("leprakhauns@gmail.com", "Video conversion done", $database->database_num_rows($query)); $video = new se_video(); //echo "SELECT * FROM se_videos WHERE video_is_converted=0 AND rawfile!='' AND video_user_id='7653' ORDER BY video_id LIMIT 1"; //mail("leprakhauns@gmail.com", "Video conversion done 2", $row["video_id"]); $directory=video_dir(420046); $row["rawfile"]="videoq.mp4"; $row["video_id"]="videoq"; $file = $getID3->analyze($row["rawfile"]); //var_dump($file); //var_dump($file); //$dir = opendir('uploads_video/encoding/queue/'); # This is the directory it will count from $i = 0; # Integer starts at 0 before counting if($file['video']['resolution_x']>1920) { $width=1920; } else{ $width=$file['video']['resolution_x'];} if($file['video']['resolution_y']>1920) { $width=1080; } if($width%2!=0){$width=$width-1;} //echo "touch uploads_video/encoding/queue/".$row["video_id"];exit; //-vf scale=320:-1 $output=shell_exec("/bin/nice {$setting['setting_video_ffmpeg_path']} -i ".$row["rawfile"]." -threads 3 -vf scale=".$width.":-2 -f image2 -ss 4.00 -vframes 1 {$directory}".$row["video_id"]."_thumb.jpg 2>&1 \n"); $image_info = getimagesize($directory.$row["video_id"]."_thumb.jpg"); if($image_info[0]>1920) { $width=1920; $height=-2; } else{ $width=$image_info[0];} if($image_info[1]>1920) { $width=-2; $height=1920; } if($width%2!=0){$width=$width-1;} if($height%2!=0){$height=$height-1;} $duration=$file['playtime_seconds']; $min_duration = 1; //sleep(10); //sleep(300); //54038.original.mp4 ///bin/nice /usr/local/bin/ffmpeg -i /home/bateworld/public_html/uploads_video/261000/260515/54038.original.mp4 -movflags faststart -vcodec h264 -acodec aac -strict -2 -vf scale=720:-1 /home/bateworld/public_html/uploads_video/261000/260515/abc123.mp4 //if($row["video_user_id"]==7653){ echo "/bin/nice {$setting['setting_video_ffmpeg_path']} -i ".$directory.$row["rawfile"]." -threads 3 -movflags faststart -codec:v libx264 -preset fast -acodec aac -strict -2 -vf scale=".$width.":-2 ".$directory.$row["video_id"]."111.mp4"; $output =shell_exec("/bin/nice {$setting['setting_video_ffmpeg_path']} -i ".$row["rawfile"]." -threads 3 -movflags faststart -codec:v libx264 -preset fast -acodec aac -strict -2 -vf scale=".$width.":".$height." ".$row["video_id"]."222.mp4"); /*} else{ $output =shell_exec("/bin/nice {$setting['setting_video_ffmpeg_path']} -i ".$directory.$row["rawfile"]." -movflags faststart -codec:v libx264 -preset fast -acodec aac -strict -2 -vf scale=".$width.":-2 ".$directory.$row["video_id"].".mp4"); } if($row["video_user_id"]==7653){ } */ //shell_exec("/bin/nice {$setting['setting_video_ffmpeg_path']} -i ".$directory.$row["rawfile"]." -threads 3 -y -vcodec libx264 -g 30 -vf scale=".$width.":-1 ".$directory.$row["video_id"].".mp4 2>&1 \n"); ?>