I am uploading the video using FTP, what exactly I am doing that is clicking screenshot from video for the first frame, but what exactlty it is happening is screenshot is getting blurred, obviously if the first frame would be blur, eventually the screenshot will be blur only.
Can I do any other way to click a steady picture? Here is my FTP Code where I am clicking screenshot(thumbnail).
<?php
error_reporting(E_ALL);
ini_set("display_errors", 1);
if(isset($_FILES["file"]["name"]) && $_FILES["file"]["name"] != ''){
$newfilename = $_FILES["file"]["name"];
$upload = move_uploaded_file($_FILES["file"]["tmp_name"], "/home/projectname/public_html/master/assets/user_videos/".$newfilename);
if($upload){
$thumbnail_name = preg_replace('"\.(mp4|avi|flv|vob|oggg)$"', '.jpg', $newfilename);
$movie = "/home/projectname/public_html/master/assets/user_videos/".$newfilename;
$thumbnail = "/home/projectname/public_html/master/assets/user_videos/".$thumbnail_name;
$command = '/usr/bin/ffmpeg -ss 00:00:01 -i '.$movie.' -f image2 -vframes 1 '.$thumbnail.' 2>&1';
$output = passthru($command);
$data = array('status' => 1 , 'video'=> $newfilename, 'screenshot'=> $thumbnail_name, 'message' => 'Video successfully uploaded' );
}