Page 1 of 1

Infinite Loop while executing analyze function

Posted: Mon Sep 15, 2014 2:45 pm
by jon01104
I have a problem analyzing video files. When i run the code below. It outputs a correct array when i loop < 25 files, but if i try more it keeps loading the script. Can anybody help me ??

Code: Select all

function get_files_data(){
	$this->getID3 = new getID3;
	$output = array();
	foreach ( $this->files as $file => $array )
	{
		$f_info = $this->getID3->analyze($file);
		$c_data = array
		( 
			"name" => str_replace('F://video//', "", $file),
			"duration" => $f_info['playtime_string'],
			"dimensions" => $f_info['video']['resolution_x']." x ".$f_info['video']['resolution_y']
		);
				
		array_push($output, $c_data);
	}
	return $output;			
}

Re: Infinite Loop while executing analyze function

Posted: Mon Sep 15, 2014 4:59 pm
by jon01104
this problem doesnt occur with .wmv files, but it does with .mp4 and .mov

Re: Infinite Loop while executing analyze function

Posted: Mon Sep 15, 2014 5:37 pm
by James Heinrich
Is there a particular file it hangs up on?
Can you monitor memory usage and check if you're exceeding available memory, either on a particular file or cumulatively after some number of files?