-
Notifications
You must be signed in to change notification settings - Fork 10
/
BuildingFFMpeg.txt
80 lines (52 loc) · 3.18 KB
/
BuildingFFMpeg.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
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
Building ffmpeg
---------------
Video Monkey uses the ffmpeg command line tool. It is included as a resource in the videomonkey app.
So you don't need these instructions unless you want to change that executable for some reason.
Here is how to build ffmpeg statically, so it doesn't require any extra dylibs installed. When built this
way, it still relys on the following dylibs, but they should be part of the OSX install (at least
they are part of Leopard 10.5.4). Here is the output from otool -L:
/usr/lib/libz.1.dylib (compatibility version 1.0.0, current version 1.2.3)
/usr/lib/libbz2.1.0.dylib (compatibility version 1.0.0, current version 1.0.4)
/usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 111.1.1)
/usr/lib/libgcc_s.1.dylib (compatibility version 1.0.0, current version 1.0.0)
The ffmpeg code is included as source because I've created a custom version which outputs progress
in a way that is easier to use with VideoMonkey. There's a script to build ffmpeg itself, but this does
not include the download and building of all the required support libraries. So, to build ffmpeg you
first download and build all those and then run the script. Details follow.
Support libs
------------
Before building ffmpeg from source, install the following libraries:
libfaac - http://voxel.dl.sourceforge.net/sourceforge/faac/faac-1.26.zip
libfaad - http://internap.dl.sourceforge.net/sourceforge/faac/faad2-2.6.1.zip
libmp3lame - http://superb-east.dl.sourceforge.net/sourceforge/lame/lame-398-2.tar.gz
libx264 - ftp://ftp.videolan.org/pub/videolan/x264/snapshots//x264-snapshot-20081119-2245.tar.bz2
libogg - http://downloads.xiph.org/releases/ogg/libogg-1.1.3.tar.gz
libvorbis - http://downloads.xiph.org/releases/vorbis/libvorbis-1.2.0.tar.gz
libtheora - http://downloads.xiph.org/releases/theora/libtheora-1.0.zip
After downloading and extracting the source, go into each directory in turn and build. For libfaac and libfaad, first run:
./bootstrap
in addition to the next 3 steps. For the rest, just run these three steps:
./configure --disable-shared
make
sudo make install
Make sure to build libogg and libvorbis before libtheora. It depends on them. The --disable-shared flag is
important to prevent ffmpeg from linking with the dynamic libraries. libx264 doesn't need this flag, it
builds statically by default. But it doesn't hurt to include it.
XVid
----
Building xvid is sadly tricky. The simplest way I have found is to first download the source as usual from:
http://downloads.xvid.org/downloads/xvidcore-1.1.3.tar.gz
extract the source code, then go to the build/generic directory and run:
./configure --enable-macosx_module --disable-shared
then download this file:
http://rob.opendot.cl/wp-content/files/platform.inc
and replace the file with the same name in the current directory. Then build with:
make
sudo make install
FFMpeg
------
Once you have everything built, you can build ffmpeg by running the script:
cd <videomonkey directory>
./build_ffmpeg.sh
This should leave you with a copy of ffmpeg in the newly created ffmpeg/ subdir. This should be identical to
the one in the bin directory, unless you've changed it.