This is the error i'm receiving. Notice: Undefined offset: 1 in /Library/WebServer/site/phpvideotoolkit.php5.php on line 813 Notice: Undefined offset: 0 in /Library/WebServer/site/phpvideotoolkit.php5.php on line 814
This is the line code see commented line ERROR HERE $data & $fps_value line
// match the video stream info
preg_match('/Stream(.*): Video: (.*)/', $buffer, $matches);
if(count($matches) > 0)
{
$data['video'] = array();
// get the dimension parts
// print_r($matches);
preg_match('/([0-9]{1,5})x([0-9]{1,5})/', $matches[2], $dimensions_matches);
// print_r($dimensions_matches);
$dimensions_value = $dimensions_matches[0];
$data['video']['dimensions'] = array(
'width' => floatval($dimensions_matches[1]),
'height' => floatval($dimensions_matches[2])
);
//ERROR HERE $data & $fps_value line... get the framerate
preg_match('/([0-9\.]+) (fps|tb)\(r\)/', $matches[0], $fps_matches);
$data['video']['frame_rate'] = floatval($fps_matches[1]);
$fps_value = $fps_matches[0];
// get the ratios
preg_match('/\[PAR ([0-9\:\.]+) DAR ([0-9\:\.]+)\]/', $matches[0], $ratio_matches);
if(count($ratio_matches))
{
$data['video']['pixel_aspect_ratio'] = $ratio_matches[1];
$data['video']['display_aspect_ratio'] = $ratio_matches[2];
}