Add resize mode, move getMultiple method to FFMpeg

This commit is contained in:
grosroro 2012-05-28 19:46:49 +02:00
commit fc7529822f
6 changed files with 185 additions and 62 deletions

View file

@ -58,7 +58,23 @@ class FFProbe extends Binary
$cmd = $this->binary . ' ' . $pathfile . ' -show_streams';
return $this->executeProbe($cmd);
$output = explode("\n", $this->executeProbe($cmd));
$ret = array();
$n = 0;
foreach ($output as $line) {
if (in_array($line, array('[STREAM]', '[/STREAM]'))) {
$n ++;
$ret[$n] = array();
continue;
}
$ret[$n][] = $line;
}
return $ret;
}
/**