/**
  *
  */
 protected function getExecutionCommandAndConversionString(KalturaConvertJobData $data)
 {
     $wmData = null;
     if (isset($data->flavorParamsOutput->watermarkData)) {
         $wmData = json_decode($data->flavorParamsOutput->watermarkData);
         if (!isset($wmData)) {
             KalturaLog::err("Bad watermark JSON string({$data->flavorParamsOutput}->watermarkData), carry on without watermark");
         }
     }
     $cmdLines = parent::getExecutionCommandAndConversionString($data);
     KalturaLog::log("cmdLines==>" . print_r($cmdLines, 1));
     /*
      * The code below handles the ffmpeg 0.10 and higher option to set up 'forced_key_frame'.
      * The ffmpeg cmd-line should contain list of all forced kf's, this list might be up to 40Kb for 2hr videos.
      * Since the cmd-lines are stored in db records (flavor_params_output), it would blow it up.
      * The solution is to setup a placeholer w/duration and step, the full cmd-line is generated over here
      * just before the activation.
      * Sample:
      *    	__forceKeyframes__462_2
      *		stands for duration of 462 seconds, gop size 2 seconds
      */
     foreach ($cmdLines as $k => $cmdLine) {
         $exec_cmd = self::experimentalFixing($cmdLine->exec_cmd, $data->flavorParamsOutput, $this->getCmd(), $this->inFilePath, $this->outFilePath);
         $exec_cmd = self::expandForcedKeyframesParams($exec_cmd);
         if (strstr($exec_cmd, "ffmpeg") == false) {
             $cmdLines[$k]->exec_cmd = $exec_cmd;
             continue;
         }
         // impersonite
         KBatchBase::impersonate($data->flavorParamsOutput->partnerId);
         $wmCmdLine = null;
         if (isset($wmData)) {
             $wmCmdLine = self::buildWatermarkedCommandLine($wmData, $data->destFileSyncLocalPath, $exec_cmd, KBatchBase::$taskConfig->params->ffmpegCmd, KBatchBase::$taskConfig->params->mediaInfoCmd);
         }
         /*
          * 'watermark_pair_'/TAG_VARIANT_PAIR_ID tag for NGS digital signature watermarking flow
          */
         if (isset($data->flavorParamsOutput->tags) && strstr($data->flavorParamsOutput->tags, KConversionEngineFfmpeg::TAG_VARIANT_PAIR_ID) != false) {
             $wmCmdLine = self::buildNGSPairedDigitalWatermarkingCommandLine(isset($wmCmdLine) ? $wmCmdLine : $exec_cmd, $data);
         }
         // un-impersonite
         KBatchBase::unimpersonate();
         if (isset($wmCmdLine)) {
             $cmdLines[$k]->exec_cmd = $wmCmdLine;
         } else {
             $cmdLines[$k]->exec_cmd = $exec_cmd;
         }
     }
     return $cmdLines;
 }
 protected function getExecutionCommandAndConversionString(KalturaConvertJobData $data)
 {
     $cmdLines = parent::getExecutionCommandAndConversionString($data);
     /*
      * The code below handles the ffmpeg 0.10 and higher option to set up 'forced_key_frame'.
      * The ffmpeg cmd-line should contain list of all forced kf's, this list might be up to 40Kb for 2hr videos.
      * Since the cmd-lines are stored in db records (flavor_params_output), it would blow it up.
      * The solution is to setup a placeholer w/duration and step, the full cmd-line is generated over here
      * just before the activation.
      * Sample:
      *    	__forceKeyframes__462_2
      *		stands for duration of 462 seconds, gop size 2 seconds
      */
     foreach ($cmdLines as $k => $cmdLine) {
         $cmdLines[$k]->exec_cmd = self::expandForcedKeyframesParams($cmdLine->exec_cmd);
     }
     return $cmdLines;
 }
 protected function __construct(KSchedularTaskConfig $engine_config, $jobId)
 {
     parent::__construct($engine_config);
     $this->batchJobId = $jobId;
 }