FFmpeg
Getting FFmpeg
The best way to get FFmpeg sources is with SVN. Paul Smedley has built a SVN client available at http://download.smedley.info/subversion-1.4.4-os2.zip. Entering this command
svn checkout svn://svn.mplayerhq.hu/ffmpeg/trunk ffmpeg
will create a directory called ffmpeg below where you entered the command and download the source. To update the source you can enter
svn update
in the ffmpeg directory. Further information including a web interface to the source and links to daily snapshots are available at http://ffmpeg.mplayerhq.hu/download.html
Patching FFmpeg
To build the documentation you need to apply this patch
Index: doc/texi2pod.pl =================================================================== --- doc/texi2pod.pl (revision 10843) +++ doc/texi2pod.pl (working copy) @@ -1,4 +1,6 @@ -#! /usr/bin/perl -w +#!perl + eval 'exec perl -wS $0 ${1+"$@"}' + if 0; # Copyright (C) 1999, 2000, 2001 Free Software Foundation, Inc.
Copy and paste the above patch into a file called os2.patch and in the ffmpeg directory enter the command
patch -p0 < os2.patch.
Warning Make sure that you have gnu patch in your path ahead of the OS/2 patch.exe in x:\os2. There is a version of gnu patch available at http://hobbes.nmsu.edu/pub/os2/dev/util/gnupatch.zip
Hints on Setting the Environment
To build FFmpeg you need an unix build setup. Currently only GCC3.3.5 is supported for building. A complete build environment is available at http://www.smedley.info/os2ports/index.php?page=build-environment.
If you would like to build a build enviroment from scratch http://developer.mozilla.org/en/docs/OS/2_Build_Prerequisites has links to many ported packages.
You also need SDL setup correctly to build FFplay, see http://www.edm2.com/index.php/SDL and also follow the instructions at http://www.edm2.com/index.php/SDL#Configure_can.27t_link_SDL_Init or configure will fail to find SDL.
Configure needs a Posix shell, I recommend pdksh, http://hobbes.nmsu.edu/pub/os2/util/shell/pdksh-5.2.14-bin-2.zip Ash will also work if %PWD% is first set, eg
set PWD=x:/path/to/ffmpeg
Note uses slashes instead of backslashes.
Compiling FFmpeg
Before compiling you have to decide whether to build with shared libs or static libs. For standalone use I'd advise static libs as the simpler solution. For using in other projects shared libs do have advantages, both in ease of maintenance and for licensing issues. First step should be to do
sh configure --help
to see all available options. Hint, by using a cmd prompt in an EPM window you can get a scrollable window. Basic FFmpeg can be compiled as
sh configure --enable-static --disable-shared --enable-os2threads
or
sh configure --enable-shared --disable-static --enable-os2threads
then
make
At this point
make install
Will install FFmpeg in /usr/local. You can pass prefix to configure to change the install location eg
sh configure --enable-shared --disable-static --enable-os2threads --prefix=x:/ffmpeg