コード例 #1
0
ファイル: converter.php プロジェクト: rkern21/videoeditor
unset($selectBatch);
$selectBatch = hwd_vs_ConverterTools::selectBatch($row, "re-generate_thumb", $batch);
$count = mysql_num_rows($selectBatch);

	// check if any waiting videos
	if ($count == 0) {
		$output.= "<div class=\"box\"><h2>There are no videos waiting for thumbnail re-generation</h2><h3>Exiting...</h3></div>";
	} else {
	   /**
		* Process each video file
		**/
		$n = 1;
		while ($result = @mysql_fetch_array($selectBatch)) {
			$filename_noext = $result['video_id'];
			hwd_vs_ConverterTools::set($row, $filename_noext);
			$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;
					}