Example #1
0
 public static function isAvailable()
 {
     try {
         $ffmpeg = Pimcore_Video_Adapter_Ffmpeg::getFfmpegCli();
         $phpCli = Pimcore_Tool_Console::getPhpCli();
         if (!$ffmpeg || !$phpCli) {
             throw new Exception("ffmpeg is not available");
         }
         return true;
     } catch (Exception $e) {
         Logger::warning($e);
     }
     return false;
 }
Example #2
0
 /**
  *
  */
 public function convert()
 {
     $this->save();
     $cmd = Pimcore_Tool_Console::getPhpCli() . " " . PIMCORE_PATH . DIRECTORY_SEPARATOR . "cli" . DIRECTORY_SEPARATOR . "video-converter.php " . $this->getProcessId();
     Pimcore_Tool_Console::execInBackground($cmd);
 }