Infinite Loop while executing analyze function

The place for "I can't figure out how to..." questions.
Post Reply
jon01104
User
Posts: 2
Joined: Mon Sep 15, 2014 2:34 pm
Are you a spambot?: no

Infinite Loop while executing analyze function

Post by jon01104 » Mon Sep 15, 2014 2:45 pm

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;			
}

jon01104
User
Posts: 2
Joined: Mon Sep 15, 2014 2:34 pm
Are you a spambot?: no

Re: Infinite Loop while executing analyze function

Post by jon01104 » Mon Sep 15, 2014 4:59 pm

this problem doesnt occur with .wmv files, but it does with .mp4 and .mov

James Heinrich
getID3() v1 developer
Posts: 1424
Joined: Fri May 04, 2001 4:00 pm
Are you a spambot?: no
Location: Northern Ontario, Canada
Contact:

Re: Infinite Loop while executing analyze function

Post by James Heinrich » Mon Sep 15, 2014 5:37 pm

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?

Post Reply

Who is online

Users browsing this forum: Bing [Bot] and 2 guests