public function __construct()
 {
     parent::__construct();
     // By default we need only one frame
     $this->addOutfileOption("-vframes 1");
     // Force overwrite
     $this->addGlobalOption('y');
     // Use image2 as default format
     $this->setFormat("image2");
 }
 /**
  * Override VideoShellAPI::setOutputFile
  *
  * Set path to output file and add some extra options when needed.
  *
  * @param string $outputfile Path to the file
  */
 public function setOutputFile($outputfile)
 {
     // Force some extra options for mp4 format
     $pathinfo = pathinfo($outputfile);
     if ($pathinfo['extension'] == 'mp4') {
         $this->addOutfileOption('-c:v libx264');
         //$this->addOutfileOption('-strict experimental -acodec aac');
     }
     parent::setOutputFile($outputfile);
 }
 public function __construct(ElggObject $video)
 {
     parent::__construct();
     $this->setInputfile($video->getFilenameOnFilestore());
     $this->fileinfo = $this->execute();
 }