protected function parseInfo($lines) {
    $result = array('videoStreams' => 0, 'audioStreams' => 0);
    foreach ($lines as $line) {
      if (preg_match('/Duration:\s+(\d\d):(\d\d):(\d\d\.\d+)/', $line, $m)) {
        $result['duration'] = $m[1] * 3600 + $m[2] * 60 + $m[3];
      } else if (preg_match('/\s+Stream #(\d)+.*$/', $line, $sm)) {
        if (strpos($line, 'Video:')) {
          $result['videoStreams']++;
          $words = preg_split('/,?\s+/', trim($line));
          for ($i = 0; $i < count($words); $i++) {
            if (preg_match('/(\d+)x(\d+)/', $words[$i], $m)) {
              $result['width'] = $m[1];
              $result['height'] = $m[2];
            }
          }
        } else if (strpos($line, 'Audio:')) {
          $result['audioStreams']++;
        }
      }
    }
    return $result;
  }
protected function parseInfo($lines) {
    $result = array('videoStreams' => 0, 'audioStreams' => 0);
    foreach ($lines as $line) {
      if (preg_match('/Duration:\s+(\d\d):(\d\d):(\d\d\.\d+)/', $line, $m)) {
        $result['duration'] = $m[1] * 3600 + $m[2] * 60 + $m[3];
      } else if (preg_match('/\s+Stream #(\d)+.*$/', $line, $sm)) {
        if (strpos($line, 'Video:')) {
          $result['videoStreams']++;
          $words = preg_split('/,?\s+/', trim($line));
          for ($i = 0; $i < count($words); $i++) {
            if (preg_match('/(\d+)x(\d+)/', $words[$i], $m)) {
              $result['width'] = $m[1];
              $result['height'] = $m[2];
            }
          }
        } else if (strpos($line, 'Audio:')) {
          $result['audioStreams']++;
        }
      }
    }
    return $result;
  }
protected function parseInfo ( $ lines ) { $ result = array ( 'videoStreams' => 0 , 'audioStreams' => 0 ) ; foreach ( $ lines as $ line ) { if ( preg_match ( '/Duration:\s+(\d\d):(\d\d):(\d\d\.\d+)/' , $ line , $ m ) ) { $ result [ 'duration' ] = $ m [ 1 ] * 3600 + $ m [ 2 ] * 60 + $ m [ 3 ] ; } else if ( preg_match ( '/\s+Stream #(\d)+.*$/' , $ line , $ sm ) ) { if ( strpos ( $ line , 'Video:' ) ) { $ result [ 'videoStreams' ] ++ ; $ words = preg_split ( '/,?\s+/' , trim ( $ line ) ) ; for ( $ i = 0 ; $ i < count ( $ words ) ; $ i ++ ) { if ( preg_match ( '/(\d+)x(\d+)/' , $ words [ $ i ] , $ m ) ) { $ result [ 'width' ] = $ m [ 1 ] ; $ result [ 'height' ] = $ m [ 2 ] ; } } } else if ( strpos ( $ line , 'Audio:' ) ) { $ result [ 'audioStreams' ] ++ ; } } } return $ result ; }
Parse streaming informations

@param array $lines
@return array
Parse streaming informations