Infinite Loop while executing analyze function

The place for "I can't figure out how to..." questions.

Infinite Loop while executing analyze function

Postby 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

Re: Infinite Loop while executing analyze function

Postby jon01104 » Mon Sep 15, 2014 4:59 pm

this problem doesnt occur with .wmv files, but it does with .mp4 and .mov
jon01104
User
 
Posts: 2
Joined: Mon Sep 15, 2014 2:34 pm

Re: Infinite Loop while executing analyze function

Postby 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?
James Heinrich
getID3() v1 developer
 
Posts: 1411
Joined: Fri May 04, 2001 4:00 pm
Location: Northern Ontario, Canada


Return to Support 1.x

Who is online

Users browsing this forum: No registered users and 2 guests

cron