-
Notifications
You must be signed in to change notification settings - Fork 0
/
README.txt
59 lines (43 loc) · 2.46 KB
/
README.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
-----------------------------------------------------------------------
CONFIGURATION
-----------------------------------------------------------------------
FFmpeg will try to find the FFmpeg binary when you install the module.
If it can not find FFmpeg, you will need to specify the path by hand
Go to admin/settings/ffmpeg_wrapper
Make sure you configure the path to FFmpeg. This is relative to the root
of your server. If don't know where FFmpeg is installed and you have
access to the command line of your server, you can run:
$locate ffmpeg
This should hopefully give you a path to ffmpeg.
If you need install FFmpeg, there are instructions here for installing
it on a debian/ubuntu environment:
http://www.24b6.net/?p=188
If you need a compiled binary, check http://24b6.net/content/ffmpeg-binary
If you are having PHP issues with openbasedir, you may want to look
at this page: http://drupal.org/node/82223
-----------------------------------------------------------------------
DEVELOPERS
-----------------------------------------------------------------------
ffmpeg_wrapper supports defining configurations that set default values
in forms that are built to support ffmpeg_wrapper. Look in the conf dir
for an example of how these configurations can be built. This is helpful
for constraining users from building configurations that ffmpeg will not
function with.
To enable the support in your forms, merely call this function:
ffmpeg_wrapper_enable($prefix, $output_form_id);
Here, $prefix is a prefix used in your forms (in standard drupal, this will
be at least "edit-"). $output_form_id is the name of the output controler
form element. Check out media mover API's mm_ffmpeg module for an example.
The second piece that needs to be done is to name your form elements with
the ffmpeg_wrapper convention. Any form element that controls an aspect
of ffmpeg (eg, audio bit rate) needs to be named in a specific way:
ffmpeg_audio_ab
Where ffmpeg is always used, audio is for audio options (video is the other
possibility) and ab is the ffmpeg command for setting the audio bit rate.
Again, mm_ffmpeg offers a good example of how to do this.
Alternatively, you can just use
$form[] = ffmpeg_wrapper_configuration_form($prefix, $configuration) to
build a form from ffmpeg_wrapper. You will need to handle your own validation
and submission, but outside of handing the size:other options, this is
very easy. Going this route gives you the ajax form configuration straight
away.