From c933d514eea5b207b903c9ca6daf8ca56677e2df Mon Sep 17 00:00:00 2001 From: Fabio Varesano Date: Sat, 13 Jan 2007 17:01:34 +0000 Subject: More configurable ffmpeg execution. --- .../video_ffmpeg_helper/video_ffmpeg_helper.module | 45 +++++++++++++++++++--- 1 file changed, 40 insertions(+), 5 deletions(-) (limited to 'plugins/video_ffmpeg_helper/video_ffmpeg_helper.module') diff --git a/plugins/video_ffmpeg_helper/video_ffmpeg_helper.module b/plugins/video_ffmpeg_helper/video_ffmpeg_helper.module index b765538..a6fc1e8 100644 --- a/plugins/video_ffmpeg_helper/video_ffmpeg_helper.module +++ b/plugins/video_ffmpeg_helper/video_ffmpeg_helper.module @@ -83,7 +83,7 @@ function video_ffmpeg_helper_admin_settings() { $form['video_ffmpeg_helper_ffmpeg_path'] = array( '#type' => 'textfield', - '#title' => t('Ffmpeg executable path'), + '#title' => t('FFmpeg executable path'), '#description' => t('Set the full path to the ffmpeg executable here.'), '#default_value' => variable_get('video_ffmpeg_helper_ffmpeg_path', '/usr/bin/ffmpeg'), ); @@ -153,11 +153,29 @@ function video_ffmpeg_helper_admin_settings() { '#description' => t('If set up correctly, this will auto-convert each uploaded video to the configured format.') . '
' . t("IMPORTANT: you will need the video_render.php correctly configured and run by cron. See README.txt for more informations."), '#default_value' => variable_get('video_ffmpeg_helper_auto_conversion', false), ); - $form['autoconv']['video_ffmpeg_helper_auto_converter_options'] = array( + $form['autoconv']['video_ffmpeg_helper_auto_converter_width'] = array( '#type' => 'textfield', - '#title' => t('Video thumbnailer options'), - '#description' => t('Provide the ffmpeg options to configure the video conversion. Available argument values are: ').'
  1. '.t('%videofile (the video file to convert)').'
  2. '.t('%convertfile (a newly created file to store the converted file)').'
', - '#default_value' => variable_get('video_ffmpeg_helper_auto_converter_options', '-y -i %videofile -f flv -ar 22050 %convertfile'), + '#title' => t('Video rendering width'), + '#description' => t('The width of the converted video. The height will be automatically calculated to maintain aspect ratio.'), + '#size' => 3, + '#maxlength' => 3, + '#default_value' => variable_get('video_ffmpeg_helper_auto_converter_width', 400), + ); + $form['autoconv']['video_ffmpeg_helper_auto_converter_video_bitrate'] = array( + '#type' => 'textfield', + '#title' => t('Video bitrate'), + '#description' => t('The video bitrate in kbit/s of the converted video.'), + '#size' => 3, + '#maxlength' => 4, + '#default_value' => variable_get('video_ffmpeg_helper_auto_converter_video_bitrate', 200), + ); + $form['autoconv']['video_ffmpeg_helper_auto_converter_audio_bitrate'] = array( + '#type' => 'textfield', + '#title' => t('Audio bitrate'), + '#description' => t('The audio bitrate in kbit/s of the converted video.'), + '#size' => 3, + '#maxlength' => 4, + '#default_value' => variable_get('video_ffmpeg_helper_auto_converter_audio_bitrate', 64), ); $form['autoconv']['video_ffmpeg_helper_auto_converter_busy_video_path'] = array( '#type' => 'textfield', @@ -165,6 +183,23 @@ function video_ffmpeg_helper_admin_settings() { '#description' => t('Provide the relative path to a video displayed when the video is being rendered.'), '#default_value' => variable_get('video_ffmpeg_helper_auto_converter_busy_video_path', 'busy.flv'), ); + $form['autoconv']['advanced'] = array( + '#type' => 'fieldset', + '#title' => t('Advanced settings'), + '#collapsible' => TRUE, + '#collapsed' => TRUE + ); + $form['autoconv']['advanced']['video_ffmpeg_helper_auto_converter_options'] = array( + '#type' => 'textfield', + '#title' => t('Video converter options'), + '#description' => t('Provide the ffmpeg options to configure the video conversion. Available argument values are: ').''. + t('For further informations refer to the !ffmpegdoc', array('!ffmpegdoc' => l(t('Official FFMpeg documentation.'), 'http://ffmpeg.mplayerhq.hu/ffmpeg-doc.html', NULL, NULL, TRUE))), + '#default_value' => variable_get('video_ffmpeg_helper_auto_converter_options', '-y -i %videofile -f flv -ar 22050 -ab %audiobitrate -s %size -b %videobitrate %convertfile'), + ); return system_settings_form($form); } -- cgit v1.2.3