addCommandEvents() {
    const { conf, cover, command, framesNum } = this;
    const ffmpeglog = conf.getVal('ffmpeglog');
    const highWaterMark = conf.getVal('highWaterMark');
    const video = this.getOutputPath('curr');
    const output = this.getOutputPath('final');

    // complete and error callback
    const completeFunc = () => {
      this.emit({ type: 'synthesis-complete', output });
      FFLogger.info({ pos: 'Synthesis', msg: 'synthesis complete.' });
    };

    const errorFunc = (error, stdout, stderr) => {
      this.emitError({ error, pos: 'Synthesis' });
      FFLogger.error({
        error,
        pos: 'Synthesis',
        msg: `stdout:${stdout} \n stderr:${stderr}`,
      });
    };

    // start event
    command.on('start', commandLine => {
      FFmpegUtil.setHighWaterMark({ command, highWaterMark });
      this.emit({ type: 'synthesis-start', command: commandLine });
      if (ffmpeglog) {
        command.ffmpegProc.stderr.on('data', data => console.log(data));
      }
      // log info
      FFLogger.info({ pos: 'Synthesis', msg: `synthesis start: ${commandLine}` });
    });

    // progress event
    command.on('progress', progress => {
      let percent = Utils.floor(progress.frames / framesNum, 2);
      percent = Math.min(1, percent);
      this.emitProgress({ percent });
      // log info
      const percent100 = Math.floor(percent * 100);
      FFLogger.info({ pos: 'Synthesis', msg: `synthesis progress: ${percent100}% done.` });
    });

    command.on('end', async () => {
      // check if cover is included
      if (cover) {
        FFmpegUtil.addCoverImage({ video, output, cover })
          .then(completeFunc)
          .catch(([error, stdout, stderr]) => errorFunc(error, stdout, stderr));
      } else {
        completeFunc();
      }
    });

    // error
    command.on('error', (error, stdout, stderr) => errorFunc(error, stdout, stderr));
  }
Add FFmpeg event to command
@private