Example #1
0
     $fid = $cbupload->add_video_file($queue, array('noinfo'), 'p', $vid_profile['profile_id'], $log_file);
 }
 if (!CONV_TEST_MODE) {
     $cbupload->update_queue_status($queue, 'u', 'Started conversion using Profile # ' . $vid_profile['profile_id'], true);
 }
 $log_file = LOGS_DIR . '/' . $log_file;
 /** All of our new conversion code is written here * */
 $converter = new CBConverter($original_source);
 //$converter->set_preset_path('D:\usr\local\share\ffmpeg');
 $converter->set_log($log_file);
 /** AS $converter is already being initited, its
  * good to check for thumbs and if they are not
  * generated, we should extract them first before
  * we move on for next step
  */
 if (!hasThumbs($queue)) {
     if (!CONV_TEST_MODE) {
         $cbupload->update_queue_status($queue, 'u', 'Generating thumbs...', false);
     }
     //Generate thumbnails first...then move on..
     $thumb_sizes = get_thumb_sizes();
     $thumbs_dir = THUMBS_DIR . '/' . $folder;
     if ($thumb_sizes) {
         foreach ($thumb_sizes as $thumb_size) {
             $size = $thumb_size;
             $suffix = $size;
             $outname = $queue['queue_name'] . '-' . $suffix;
             if (!CONV_TEST_MODE) {
                 $cbupload->update_queue_status($queue, 'u', 'Extacting ' . $outname, false);
             }
             //Using Multi Thumb Gen function..
/**
 * Alias of hasThumbs
 */
function has_thumbs($video)
{
    return hasThumbs($video);
}