Установка и настройка сайта, а также системного окружения. Исключая вопросы программирования новых модулей и тем.
См. документацию на английском: http://drupal.org/node/258
Модуль позволяет конвертировать видео-файлы, которые загружаются на сайт, если на сервере установлена библиотека ffmpeg. Также модуль выводит плейер и обеспечивает всю работу с видео.
В файле .htaccess включить следующие параметры:
php_value post_max_size 100M
php_value upload_max_filesize 100M
php_value max_execution_time 1000
php_value max_input_time 1000
Модуль получает файлы с помощью одного из этих модулей:
В режиме Upload
Нужно загрузить FLV-файл и миниатюру. Они будут храниться в $node->files.
К миниатюре НЕ БУДУТ применяться правила модуля ImageCache при показе. То есть миниатюра должна быть полностью готова и нужного размера.
Модуль FlashVideo подхватывает видео, но не конвертирует его.
Видео в полях ССК в этом режиме игнорируется.
В режиме ССК
Файлы пропукаются через ffmpeg и, если конвертация не удалась, то видео (даже в FLV) не показывается.
Для работы создаётся 2 поля (для загруженного видео и для финального - после конвертации).
И 1 поле для загрузки миниатюры. Для этого поля работает ImageCache!
if (!$thumbnail_file) {
if ($node->field_image[0]['filepath']) {
//Загруженная картинка:
$thumbnail_file = imagecache_create_url('video_thumb_front', $node->field_image[0]['filepath']);
} else {
$thumbnail_file = $base_url . base_path() . path_to_theme() .'/images/no_thumbnail.jpg';
}
}
В шаблоне ноды нужного типа заменить
на
Также нужно отключить использование тега [video] в тексте ноды.
'video_thumb_front' - название правила ImageCache
'field_image' - название поля ССК, в котором хранится картинка. Если просто загружается картинка вместе с видео, то нужно использовать другой код.
Если не нужно конвертировать видео на сервере, то нужно настроить модуль так:
FlashVideo is a complete video solution that expands Drupal's upload capabilities to allow web developers and users to upload video files, automatically convert those videos to the popular Flash format, and then embed their video in any node type using the simple [video] tag. This module allows more than one video to be attached to any node, and then referenced through the use of parameters passed to the tag [video]. It also includes an automatic conversion of video files to the Flash format using FFMPEG technology.
Use this module if you...
Important Note: — For this module to work, you will need to download a media player to go along with it. Some of the media players that have been tested to work the FlashVideo are as follows:
Due to licensing, a media player is currently not included with the module, so you will need to download either one of these. This is covered in the tutorial mentioned above.
Are you having problems getting FlashVideo operational? If so, check out the troubleshooting guide available at: http://www.travistidwell.com/troubleshooting_flashvideo.
Although Travis Tidwell is the primary creator and maintainer of this module, it would not be what it is today without the help and contributions of the incredible Drupal Community. This section is to give special thanks to these contributors.
If we have forgotten anyone who has contributed, then please contact one of the module developers to get your username added to the list.