Ejemplo n.º 1
0
         curl_setopt($ch, CURLOPT_RETURNTRANSFER, TRUE);
         /* Tell cURL NOT to return the headers */
         curl_setopt($ch, CURLOPT_HEADER, false);
         $response = curl_exec($ch);
         /* Check HTTP Code */
         $status_code = curl_getinfo($ch, CURLINFO_HTTP_CODE);
         curl_close($ch);
         if ((int) $response) {
             e(lang($response), 'w');
             $query = "UPDATE " . tbl("video") . " SET file_thumbs_count = " . (int) $response . "  WHERE videoid = " . $data['videoid'];
             $db->Execute($query);
         } else {
             e(lang($response), 'e');
         }
     } else {
         delete_video_thumb($data['file_directory'], $_GET['delete']);
     }
 }
 # Generating more thumbs
 if (isset($_GET['gen_more'])) {
     $num = config('num_thumbs');
     $dim = '503x283';
     $big_dim = config('big_thumb_width') . 'x' . config('big_thumb_height');
     require_once BASEDIR . '/includes/classes/sLog.php';
     $log = new SLog();
     $configs = array();
     require_once BASEDIR . '/includes/classes/conversion/ffmpeg.class.php';
     $ffmpeg = new FFMpeg($configs, $log);
     $ffmpeg->regenerateThumbs($vid_file, $data['file_directory'], $data['duration'], $dim, $num, $rand = NULL, $is_big = false, $data['file_name']);
     e(lang('Video thumbs has been regenrated successfully'), 'm');
     /*
Ejemplo n.º 2
0
 if (isset($_POST['update_default_thumb'])) {
     $myquery->set_default_thumb($video, $_POST['default_thumb']);
 }
 $data = get_video_details($video);
 $vid_file = VIDEOS_DIR . '/' . get_video_file($data, false, false);
 # Uploading Thumbs
 if (isset($_POST['upload_thumbs'])) {
     $Upload->upload_thumbs($data['file_name'], $_FILES['vid_thumb']);
 }
 //	# Uploading Big Thumb
 //	if(isset($_POST['upload_big_thumb'])) {
 //		$Upload->upload_big_thumb($data['file_name'],$_FILES['big_thumb']);
 //	}
 # Delete Thumb
 if (isset($_GET['delete'])) {
     delete_video_thumb($_GET['delete']);
 }
 # Generating more thumbs
 if (isset($_GET['gen_more'])) {
     $num = config('num_thumbs');
     $dim = config('thumb_width') . 'x' . config('thumb_height');
     $big_dim = config('big_thumb_width') . 'x' . config('big_thumb_height');
     require_once BASEDIR . '/includes/classes/conversion/ffmpeg.class.php';
     $ffmpeg = new ffmpeg($vid_file);
     //Generating Thumbs
     $ffmpeg->generate_thumbs($vid_file, $data['duration'], $dim, $num, true);
     //Generating Big Thumb
     $ffmpeg->generate_thumbs($vid_file, $data['duration'], $big_dim, $num, true, true);
 }
 Assign('data', $data);
 Assign('rand', rand(44, 444));