$output.= "<div class=\"box\"><div><h2>Re-calculating Duration (File ".$n." of ".$count.")</h2></div>"; if ($result['video_type'] == "local" || $result['video_type'] == "mp4") { $output.= "<div><b>TAKING NEW THUMBNAILS (".$result['thumb_snap'].")</b></div>"; $path_new_flv = $path_base.DS.'uploads'.DS.$filename_noext.'.flv'; $path_new_mp4 = $path_base.DS.'uploads'.DS.$filename_noext.'.mp4'; if (file_exists($path_new_mp4) && filesize($path_new_mp4) > 0) { $path_video = $path_new_mp4; } else { $path_video = $path_new_flv; } $GenerateThumbnail = hwd_vs_GenerateThumbnail::draw($path_base, $path_video, $result['video_id'], "flv", $result['thumb_snap'], $result['video_length']); } else if ($result['video_type'] == "swf") { $GenerateThumbnail = ''; } else { $GenerateThumbnail = ''; } if ($GenerateThumbnail[0] == 0) { $output.= "<div><b>STATIC FFMPEG INPUT</b></div>"; $output.= "<div><textarea rows=\"3\" cols=\"50\" style=\"width:90%\">".$GenerateThumbnail[2]."</textarea></div>"; $output.= "<div><b>STATIC FFMPEG OUTPUT</b></div>";
/** * start converter */ function ajaxRegenerateImage() { global $limit, $limitstart; $db =& JFactory::getDBO(); $video_id = Jrequest::getInt( 'cid', '' ); $db->SetQuery( 'SELECT video_id, thumb_snap FROM #__hwdvidsvideos WHERE id = '.$video_id ); $row = $db->loadObject(); include_once(JPATH_SITE."/components/com_hwdvideoshare/converters/__ConversionTools.php"); include_once(JPATH_SITE."/components/com_hwdvideoshare/converters/__GenerateThumbnail.php"); $path_base = JPATH_SITE."/hwdvideos"; $filename_noext = $row->video_id; $filename_ext = ''; if (file_exists(JPATH_SITE.DS."hwdvideos".DS."uploads".DS.$row->video_id.".mp4")) { $path_video = JPATH_SITE.DS."hwdvideos".DS."uploads".DS.$row->video_id.".mp4"; } else { $path_video = JPATH_SITE.DS."hwdvideos".DS."uploads".DS.$row->video_id.".flv"; } $GenerateThumbnail = hwd_vs_GenerateThumbnail::draw($path_base, $path_video, $filename_noext, $filename_ext, $row->thumb_snap); print $GenerateThumbnail[9]; exit; }