public function video_phpvideotoolkit::__construct in Video 7
File
- transcoders/
video_phpvideotoolkit.inc, line 24
Class
Code
public function __construct() {
$this->params['audiobitrate'] = variable_get('video_ffmpeg_helper_auto_cvr_audio_bitrate', $this->audio_bitrate);
$this->params['videobitrate'] = variable_get('video_ffmpeg_helper_auto_cvr_video_bitrate', $this->video_bitrate);
//@todo: move this to the actual widget and save in video_files table.
$this->params['size'] = variable_get('video_ffmpeg_width', $this->video_width) . 'x' . variable_get('video_ffmpeg_height', $this->video_height);
$this->params['ffmpeg'] = variable_get('video_ffmpeg_path', $this->ffmpeg);
$this->nice = variable_get('video_phpvideotoolkit_nice_enable', FALSE) ? 'nice -n 19 ' : '';
$this->params['videoext'] = variable_get('video_ffmpeg_ext', $this->video_ext);
$this->params['enable_faststart'] = variable_get('video_ffmpeg_enable_faststart', 0);
$this->params['faststart_cmd'] = variable_get('video_ffmpeg_faststart_cmd', '/usr/bin/qt-faststart');
$use_version = 'php5';
// check if php5 is ok
if ($use_version == 'php5' && version_compare(PHP_VERSION, '5.0.0', '<')) {
$use_version = 'php4';
}
module_load_include('php', 'video', 'libraries/phpvideotoolkit/phpvideotoolkit.' . $use_version);
$this->toolkit = new PHPVideoToolkit($this->params['ffmpeg'], file_directory_temp() . '/');
}