Exemplo n.º 1
0
 protected function getCmdLine()
 {
     $exeCmd = parent::getCmdLine();
     if (strstr($exeCmd, KDLOperatorMp4box::ACTION_EMBED_SUBTITLES) !== FALSE) {
         $captionsStr = null;
         // impersonite
         KBatchBase::impersonate($this->job->partnerId);
         $captionsStr = $this->buildSubTitleCommandParam($this->data);
         // un-impersonite
         KBatchBase::unimpersonate();
         if (isset($captionsStr)) {
             $exeCmd = str_replace(array(KDLOperatorMp4box::ACTION_EMBED_SUBTITLES, KDLOperatorMp4box::SUBTITLE_PLACEHOLDER), array("", $captionsStr), $exeCmd);
         } else {
             if (!(isset($this->operator) && isset($this->operator->isOptional) && $this->operator->isOptional > 0)) {
                 $this->message .= "." . print_r($this->operator, 1);
                 throw new KOperationEngineException($this->message);
             }
         }
     } else {
         if (strstr($exeCmd, KDLOperatorMp4box::ACTION_HINT) !== FALSE) {
             $exeCmd = str_replace(KDLOperatorMp4box::ACTION_HINT, "", $exeCmd);
         }
     }
     return $exeCmd;
 }
Exemplo n.º 2
0
 protected function getCmdLine()
 {
     $cmdLine = parent::getCmdLine();
     $cmdLine = KConversionEngineFfmpeg::experimentalFixing($cmdLine, $this->data->flavorParamsOutput, $this->cmd, $this->inFilePath, $this->outFilePath);
     $cmdLine = KConversionEngineFfmpeg::expandForcedKeyframesParams($cmdLine);
     $wmStr = strstr($this->operator->params, "watermark:");
     if ($wmStr == false) {
         return $cmdLine;
     }
     $wmStr = trim(substr($this->operator->params, strlen("watermark:")));
     /*
      * If no watermarkData, carry on 
      */
     if ($wmStr == null) {
         return $cmdLine;
     }
     KalturaLog::log("Watermark string({$wmStr})");
     $wmData = json_decode($wmStr);
     if (!isset($wmData)) {
         KalturaLog::err("Bad watermark JSON string({$wmStr}), carry on without watermark");
     }
     KalturaLog::log("Watermark data:\n" . print_r($wmData, 1));
     // impersonite
     KBatchBase::impersonate($this->data->flavorParamsOutput->partnerId);
     // !!!!!!!!!!!$this->job->partnerId);
     $wmCmdLine = KConversionEngineFfmpeg::buildWatermarkedCommandLine($wmData, $this->data->destFileSyncLocalPath, $cmdLine, KBatchBase::$taskConfig->params->ffmpegCmd, KBatchBase::$taskConfig->params->mediaInfoCmd);
     // un-impersonite
     KBatchBase::unimpersonate();
     if (isset($wmCmdLine)) {
         $cmdLine = $wmCmdLine;
     }
     return $cmdLine;
 }
 protected function getCmdLine()
 {
     $cfgStr = $this->buildCfgFile($this->inFilePath, $this->outFilePath);
     $this->configFilePath = $this->outFilePath . ".cfg";
     file_put_contents($this->configFilePath, $cfgStr);
     $this->addToLogFile("Webex CFG:\n*******\n{$cfgStr}\n*******\n");
     $exeCmd = parent::getCmdLine();
     KalturaLog::info("command line: {$exeCmd}");
     KalturaLog::info(print_r($this, true));
     return $exeCmd;
 }
 protected function getCmdLine()
 {
     $exeCmd = parent::getCmdLine();
     if (strstr($exeCmd, KDLOperatorMp4box::ACTION_EMBED_SUBTITLES) !== FALSE) {
         $captionsStr = self::buildSubTitleCommandParam($this->data, $this->client);
         $exeCmd = str_replace(array(KDLOperatorMp4box::ACTION_EMBED_SUBTITLES, KDLOperatorMp4box::SUBTITLE_PLACEHOLDER), array("", $captionsStr), $exeCmd);
     } else {
         if (strstr($exeCmd, KDLOperatorMp4box::ACTION_HINT) !== FALSE) {
             $exeCmd = str_replace(KDLOperatorMp4box::ACTION_HINT, "", $exeCmd);
         }
     }
     //		KalturaLog::info(print_r($this,true));
     return $exeCmd;
 }
 protected function getCmdLine()
 {
     $outDir = realpath(dirname($this->outFilePath));
     $this->outDir = $outDir;
     $this->configFilePath = $this->outFilePath . ".xml";
     // The EE3 preset xml allows 'clean' outfile names only (no full path)
     $this->outFilePath = basename($this->outFilePath);
     $this->inFilePath = realpath(dirname($this->inFilePath)) . "\\" . basename($this->inFilePath);
     KalturaLog::info("outFilePath(dirname({$this->outFilePath})),auxPath({$outDir})");
     //		$xml = str_replace(KDLCmdlinePlaceholders::OutDir, $outPath, $this->operator->config);
     file_put_contents($this->configFilePath, $this->operator->config);
     //		$this->operator->command = KDLCmdlinePlaceholders::InFileName . ' ' . KDLCmdlinePlaceholders::ConfigFileName;
     $exeCmd = parent::getCmdLine();
     KalturaLog::info(print_r($this, true));
     return $exeCmd;
 }
 protected function getCmdLine()
 {
     $exeCmd = parent::getCmdLine();
     // SmoothProtect.exe -input AAA.ism -output OUT_FOLDER -keyId KEY_ID -keySeed KEY_SEED -laUrl http://playready.directtaps.net/pr/svc/rightsmanager.asmx?
     //		SmoothProtectPlugin::PARAMS_STUB
     $pathInfo = pathinfo($this->inFilePath);
     $ismFilePath = $pathInfo['dirname'] . "/" . $pathInfo['filename'] . ".ism";
     $outFilePath = dirname($this->outFilePath);
     // SmoothPortect is Windows tool, it requires its path params to have Win's folder notation
     $outFilePath = str_replace("/", "\\", $outFilePath);
     $ismFilePath = str_replace("/", "\\", $ismFilePath);
     $paramsStr = " -input {$ismFilePath} -output {$outFilePath} " . $this->getLicenseParamsStr();
     $exeCmd = str_replace(SmoothProtectPlugin::PARAMS_STUB, $paramsStr, $exeCmd);
     KalturaLog::info($exeCmd);
     return $exeCmd;
 }
 protected function getCmdLine()
 {
     $outDir = realpath(dirname($this->outFilePath));
     $this->outDir = $outDir;
     $this->configFilePath = $this->outFilePath . ".xml";
     // The EE3 preset xml allows 'clean' outfile names only (no full path)
     $this->outFilePath = basename($this->outFilePath);
     $this->inFilePath = realpath(dirname($this->inFilePath)) . "\\" . basename($this->inFilePath);
     KalturaLog::info("outFilePath(dirname({$this->outFilePath})),auxPath({$outDir})");
     // Add slashes to solve JSON serialization issue
     $xmlStr = str_replace('\\"', '"', $this->operator->config);
     file_put_contents($this->configFilePath, $xmlStr);
     $exeCmd = parent::getCmdLine();
     KalturaLog::info(print_r($this, true));
     return $exeCmd;
 }
 protected function getCmdLine()
 {
     $exeCmd = parent::getCmdLine();
     KalturaLog::info(print_r($this, true));
     return $exeCmd;
 }
 protected function getCmdLine()
 {
     $exeCmd = parent::getCmdLine();
     KalturaLog::info("command line: [{$exeCmd}]");
     return $exeCmd;
 }
 protected function getCmdLine()
 {
     $cmdLine = parent::getCmdLine();
     $cmdLine = KConversionEngineFfmpeg::expandForcedKeyframesParams($cmdLine);
     return $cmdLine;
 }