/** * Gets video duration. * * @return integer Seconds. */ public function getDuration() { $sTime = exec($this->sFfmpegPath . ' -i ' . $this->aFile['tmp_name'] . ' 2>&1 | grep "Duration" | cut -d \' \' -f 4 | sed s/,//'); return Various::timeToSec($sTime); }