public function video_ffmpeg::admin_settings in Video 7
Same name and namespace in other branches
- 6.4 transcoders/video_ffmpeg.inc \video_ffmpeg::admin_settings()
Interface Implementations
Overrides transcoder_interface::admin_settings
See also
sites/all/modules/video/includes/transcoder_interface#admin_settings()
1 call to video_ffmpeg::admin_settings()
- video_ffmpeg_php::admin_settings in transcoders/
video_ffmpeg_php.inc - Interface Implementations
1 method overrides video_ffmpeg::admin_settings()
- video_ffmpeg_php::admin_settings in transcoders/
video_ffmpeg_php.inc - Interface Implementations
File
- transcoders/
video_ffmpeg.inc, line 294
Class
Code
public function admin_settings() {
$form = array();
$form['video_ffmpeg_start'] = array(
'#type' => 'markup',
'#markup' => '<div id="video_ffmpeg">',
);
$form['video_ffmpeg_nice_enable'] = array(
'#type' => 'checkbox',
'#title' => t('Enable the use of <b>nice</b> when calling the command.'),
'#default_value' => variable_get('video_ffmpeg_nice_enable', TRUE),
'#description' => t('The nice command Invokes a command with an altered scheduling priority. This option may not be available on windows machines, so disable it.'),
);
// FFMPEG
$form['transcoders'] = array(
'#type' => 'fieldset',
'#title' => t('Path to Transcoder Executables'),
'#collapsible' => TRUE,
'#collapsed' => FALSE,
);
$form['transcoders']['video_ffmpeg_path'] = array(
'#type' => 'textfield',
'#title' => t('FFMPEG'),
'#description' => t('Absolute path to ffmpeg executable. This will provide a token of !ffmpeg to preset commands.'),
'#default_value' => variable_get('video_ffmpeg_path', '/usr/bin/ffmpeg'),
);
$form['transcoders']['video_ffmpeg2theora_path'] = array(
'#type' => 'textfield',
'#title' => t('Ffmpeg2Theora'),
'#description' => t('Absolute path to ffmpeg2theora executable. This will provide a token of !ffmpeg2theora to preset commands.'),
'#default_value' => variable_get('video_ffmpeg2theora_path', '/usr/bin/ffmpeg2theora'),
);
$form['transcoders']['video_macoder_path'] = array(
'#type' => 'textfield',
'#title' => t('Mcoder'),
'#description' => t('Absolute path to Mcoder executable. This will provide a token of !macoder to preset commands.'),
'#default_value' => variable_get('video_macoder_path', '/usr/bin/mcoder'),
);
$form['transcoders']['video_handbreke_path'] = array(
'#type' => 'textfield',
'#title' => t('HandBrakeCLI'),
'#description' => t('Absolute path to Handbreke executable. This will provide a token of !handbreke to preset commands.'),
'#default_value' => variable_get('video_handbreke_path', '/usr/bin/HandBrakeCLI'),
);
$form['transcoders']['video_other_path'] = array(
'#type' => 'textfield',
'#title' => t('Other'),
'#description' => t('Absolute path to other transcoder executable. This will provide a token of !other to preset commands.'),
'#default_value' => variable_get('video_other_path', ''),
);
// Thumbnail Videos We need to put this stuff last.
$form['autothumb'] = array(
'#type' => 'fieldset',
'#title' => t('Video Thumbnails'),
'#collapsible' => TRUE,
'#collapsed' => FALSE,
);
$form['autothumb']['video_thumb_path'] = array(
'#type' => 'textfield',
'#title' => t('Path to save thumbnails'),
'#description' => t('Path to save video thumbnails extracted from the videos.'),
'#default_value' => variable_get('video_thumb_path', 'videos/thumbnails'),
);
$form['autothumb']['video_thumbs'] = array(
'#type' => 'textfield',
'#title' => t('Number of thumbnails'),
'#description' => t('Number of thumbnails to extract from video.'),
'#default_value' => variable_get('video_thumbs', 5),
);
$form['autothumb']['video_thumb_save_all'] = array(
'#type' => 'checkbox',
'#title' => t('Save all thumbnails in {file_manged} table'),
'#description' => t('Save all auto created thumbnails to the {file_managed} table. Change file status as PERMANENT'),
'#default_value' => variable_get('video_thumb_save_all', FALSE),
);
$form['autothumb']['advanced'] = array(
'#type' => 'fieldset',
'#title' => t('Advanced Settings'),
'#collapsible' => TRUE,
'#collapsed' => TRUE,
);
$form['autothumb']['advanced']['video_ffmpeg_thumbnailer_options'] = array(
'#type' => 'textarea',
'#title' => t('Video thumbnailer options'),
'#description' => t('Provide the options for the thumbnailer. Available argument values are: ') . '<ol><li>' . t('!videofile (the video file to thumbnail)') . '<li>' . t('!thumbfile (a newly created temporary file to overwrite with the thumbnail)</ol>'),
'#default_value' => variable_get('video_ffmpeg_thumbnailer_options', '!ffmpeg -i !videofile -an -y -f mjpeg -ss !seek -vframes 1 !thumbfile'),
);
// Video conversion settings.
$form['autoconv'] = array(
'#type' => 'fieldset',
'#title' => t('Advanced Video Conversion'),
'#collapsible' => TRUE,
'#collapsed' => TRUE,
);
$form['autoconv']['video_ffmpeg_enable_faststart'] = array(
'#type' => 'checkbox',
'#title' => t('Process mov/mp4 videos with qt-faststart'),
'#default_value' => variable_get('video_ffmpeg_enable_faststart', 0),
);
$form['autoconv']['video_ffmpeg_faststart_cmd'] = array(
'#type' => 'textfield',
'#title' => t('Path to qt-faststart'),
'#default_value' => variable_get('video_ffmpeg_faststart_cmd', '/usr/bin/qt-faststart'),
);
$form['autoconv']['video_ffmpeg_pad_method'] = array(
'#type' => 'radios',
'#title' => t('FFMPeg Padding method'),
'#default_value' => variable_get('video_ffmpeg_pad_method', 0),
'#options' => array(
0 => t('Use -padtop, -padbottom, -padleft, -padright for padding'),
1 => t('Use -vf "pad:w:h:x:y:c" for padding'),
),
);
$form['video_ffmpeg_end'] = array(
'#type' => 'markup',
'#markup' => '</div>',
);
return $form;
}