예제 #1
0
 /**
  * check if the file has audio
  *
  * @param string $file 
  * @return void
  * @author Andy Bennett
  */
 public static function has_audio($file)
 {
     $buffer = ffmpeg::get_buffer($file);
     $audio = true;
     preg_match('/Stream(.*): Audio: .*,(.*) channels.*/', $buffer, $matches);
     if (count($matches) > 2) {
         $audio = trim($matches[2]) != 0;
     }
     return $audio;
 }