You are here

public function video_ffmpeg::run_command in Video 7

Same name and namespace in other branches
  1. 6.4 transcoders/video_ffmpeg.inc \video_ffmpeg::run_command()
3 calls to video_ffmpeg::run_command()
video_ffmpeg::convert_video in transcoders/video_ffmpeg.inc
video_ffmpeg::generate_thumbnails in transcoders/video_ffmpeg.inc
video_ffmpeg::get_video_info in transcoders/video_ffmpeg.inc
Get some information from the video file

File

transcoders/video_ffmpeg.inc, line 32

Class

video_ffmpeg

Code

public function run_command($command) {

  // transcoder switching
  $command = strtr($command, array(
    '!ffmpeg' => $this->params['ffmpeg'],
    '!ffmpeg2theora' => $this->params['ffmpeg2theora'],
    '!mcoder' => $this->params['mcoder'],
    '!handbreke' => $this->params['handbreke'],
    '!other' => $this->params['other'],
  ));
  $command = $this->nice . $command . '  2>&1';
  watchdog('transcoder', 'Executing command: ' . $command, array(), WATCHDOG_DEBUG);

  //    ob_start();
  $command_return = shell_exec($command);

  //    $output = ob_get_contents();
  //    ob_end_clean();
  return $command_return;
}