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