From 355dcf494c04a98f0fce7b0f0d7aad21415ee3c6 Mon Sep 17 00:00:00 2001 From: Fahad Abbas Date: Sat, 26 Jul 2014 07:48:27 +0000 Subject: [PATCH] --- upload/ffmpeg.new.class.php | 93 +------------------------------------ 1 file changed, 1 insertion(+), 92 deletions(-) diff --git a/upload/ffmpeg.new.class.php b/upload/ffmpeg.new.class.php index 57893346..a4fcd946 100644 --- a/upload/ffmpeg.new.class.php +++ b/upload/ffmpeg.new.class.php @@ -1,18 +1,9 @@ 1 && $duration > 14) - { - $duration = $duration - 5; - $division = $duration / $num; - $count=1; - - - for($id=3;$id<=$duration;$id++) - { - $file_name = $filename."-{$big}{$count}.jpg"; - $file_path = THUMBS_DIR.'/' . $test .'/'. $file_name; - - $id = $id + $division - 1; - $time = $this->ChangeTime($id,1); - - - //e(lang($time),'m'); - - if($dim!='original') - { - $dimension = " -s $dim "; - $mplayer_dim = "-vf scale=$width:$height"; - } - - - - $command = $this->ffMpegPath." -i $input_file -an -ss $time -an -r 1 $dimension -y -f image2 -vframes 1 $file_path "; - - $output = $this->executeCommand($command); - - - //$this->logData($output); - //checking if file exists in temp dir - if(file_exists($tmpDir.'/00000001.jpg')) - { - rename($tmpDir.'/00000001.jpg',THUMBS_DIR.'/'.$file_name); - } - $count = $count+1; - } - }else - - { - - $time = $this->ChangeTime($duration,1); - $file_name = getName($input_file).".jpg"; - $file_path = THUMBS_DIR.'/' . $test . "/" . $file_name; - $command = $this->ffMpegPath." -i $input_file -an -ss $time -an -r 1 $dimension -y -f image2 -vframes $num $file_path "; - $output = $this->executeCommand($command); - $output; - //e(lang($num),'m'); - - - } - - //rmdir($tmpDir); - } - - /** * Function used to convert seconds into proper time format * @param : INT duration