Exemple #1
0
 public function __construct($input_output_type, Config $config = null)
 {
     parent::__construct($input_output_type, $config);
     if ($input_output_type === 'output') {
         $this->setAudioCodec('libmp3lame')->setFormat('mp3');
     }
     $this->_restricted_audio_codecs = array('libmp3lame', 'mp3');
 }
Exemple #2
0
 /**
  * Constructor
  *
  * @access public
  * @author Oliver Lillie
  * @param  constant $input_output_type Determines the input/output type of the Format. Either PHPVideoToolkit\Format::INPUT 
  *  or PHPVideoToolkit\Format::OUTPUT
  * @param  PHPVideoToolkit\Config $config The config object.
  */
 public function __construct($input_output_type = Format::OUTPUT, Config $config = null)
 {
     parent::__construct($input_output_type, $config);
     if ($input_output_type === 'output') {
         $this->setAudioCodec('acc')->setFormat('acc');
     }
     $this->_restricted_audio_codecs = array('libfdk_aac', 'acc');
 }
 public function __construct($input_output_type, Config $config = null)
 {
     parent::__construct($input_output_type, $config);
     $this->_format = array_merge($this->_format, array('disable_video' => null, 'video_codec' => null, 'video_quality' => null, 'video_dimensions' => null, 'video_scale' => null, 'video_padding' => null, 'video_aspect_ratio' => null, 'video_frame_rate' => null, 'video_bitrate' => null, 'video_pixel_format' => null, 'video_rotation' => null, 'video_flip_horizontal' => null, 'video_flip_vertical' => null, 'video_max_frames' => null, 'video_filters' => null));
     $this->_format_to_command = array_merge($this->_format_to_command, array('disable_video' => '-vn', 'video_quality' => '-q:v <setting>', 'video_codec' => '-vcodec <setting>', 'video_dimensions' => '-s <width>x<height>', 'video_scale' => '-vf scale=<width>:<height>', 'video_padding' => '-vf pad=<width>:<height>:<x>:<y>:<colour>', 'video_aspect_ratio' => '-aspect <ratio>', 'video_frame_rate' => '-r <setting>', 'video_bitrate' => '-b:v <setting>', 'video_pixel_format' => '-pix_fmt <setting>', 'video_rotation' => '-vf transpose=<setting>', 'video_flip_horizontal' => '-vf hflip', 'video_flip_vertical' => '-vf vflip', 'video_max_frames' => '-vframes <setting>'));
     $this->_restricted_video_bitrates = null;
     $this->_restricted_video_codecs = null;
     $this->_restricted_video_pixel_formats = null;
     $this->_restricted_video_frame_rates = null;
 }