Free File Converter Source Code

Free File Converter itself is not open source software.

For video conversion, Free File Converter uses the GPL version of FFmpeg and related libraries as its conversion engine. You can however make Free File Converter use other command line utilities by modifying the devices.txt file found in the installation folder.

You ONLY need to follow the instructions on this page if you want to build FFmpeg for use in your own video converter! If you just want to convert movies, download Free File Converter and install it. It is ready to use as-is.


Development Environment setup

The entire FFmpeg development environment setup and build procedure is explained here.

You will need MinGW to build FFmpeg on Windows. Run these installers in the listed order and use the installation paths suggested by the installers:


Main MinGW / MSYS environment

Unless stated otherwise, always extract the archive files with full folder information.

Extract binutils-2.20-1-mingw32-bin.tar.gz to C:\MinGW\
Extract gcc-core-3.4.5-20060117-3.tar.gz to C:\MinGW\
Extract mingwrt-3.17-mingw32-dev.tar.gz to C:\MinGW\
Extract mingwrt-3.17-mingw32-dll.tar.gz to C:\MinGW\
Extract w32api-3.14-mingw32-dev.tar.gz to C:\MinGW\

Run MSYS-1.0.11.exe - Minimal SYStem. Use default options.

When the command prompt pops up, answer the questions like this:

"Do you wish to continue with the post install [yn ]" y
"Do you have MinGW installed? [yn ]" y
"Where is your MinGW installation?" c:/mingw

Run msysDTK-1.0.1.exe - MSYS Developer Tool Kit. Use default options.

Extract pr.exe from coreutils-5.97-MSYS-1.0.11-snapshot.tar.bz2 tar file to c:\msys\1.0\bin


Upgrade GCC

Extract gcc-core-4.5.0-1-mingw32-bin.tar.lzma to C:\MinGW
Extract gcc-c++-4.5.0-1-mingw32-bin.tar.lzma to C:\MinGW
Extract libgcc-4.5.0-1-mingw32-dll-1.tar.lzma to C:\MinGW
Extract libstdc++-4.5.0-1-mingw32-dll-6.tar.lzma to C:\MinGW
Extract libgmp-5.0.1-1-mingw32-dll-10.tar.lzma to C:\MinGW
Extract libmpc-0.8.1-1-mingw32-dll-2.tar.lzma to C:\MinGW
Extract libmpfr-2.4.1-1-mingw32-dll-1.tar.lzma to C:\MinGW


Install GDB

Extract gdb-7.1-2-mingw32-bin.tar.gz to C:\msys\1.0
Extract libexpat-2.0.1-1-mingw32-dll-1.tar.gz to C:\msys\1.0


Install wget

Extract wget-1.11.4-1-bin.zip to C:\MinGW.
Extract wget-1.11.4-1-dep.zip to C:\MinGW


Install unzip

Extract unzip-5.51-1-bin.zip to C:\MinGW.


Install Yasm

Save yasm-1.1.0-win32.exe as yasm.exe in C:\msys\1.0\bin


Install GTK+

Extract gtk+-bundle_2.22.1-20101227_win32.zip to C:\msys\1.0


Patch system include files

Yes, unfortunately it is needed to patch 2 system include files in order to build the newest FFmpeg.
tempnam.diff and strcasecmp.diff.


Building FFmpeg and related libraries

After you have installed MinGW and updated it as described above, you are ready to build FFmpeg and related libraries. Start a shell by double-clicking the MSYS icon on your desktop and follow the instructions below.


Create directories

mkdir /ffmpeg
mkdir /ffmpeg/libraries
mkdir /ffmpeg/Binaries_GPL
mkdir /ffmpeg/olibs/include
mkdir /ffmpeg/olibs/lib
mkdir /ffmpeg/olibs/man
mkdir /ffmpeg/olibs/man/man3


Set environment variables

export PKG_CONFIG_PATH=/ffmpeg/olibs/lib/pkgconfig


Build ORC

Extract orc-0.4.16.tar.gz to /ffmpeg/libraries (License: Modified BSD, Home page)

cd /ffmpeg/libraries/orc-0.4.16 
./configure --prefix=/ffmpeg/olibs --enable-shared=no
make
make install


Build libgsm

Extract libgsm_1.0.13.orig.tar.gz to /ffmpeg/libraries (License: Proprietary, Home page)

cd /ffmpeg/libraries/gsm-1.0-pl13
make (ignore errors in toast.c)
cp lib/* /ffmpeg/olibs/lib
mkdir /ffmpeg/olibs/include/gsm
cp inc/gsm.h /ffmpeg/olibs/include/gsm/


Build lame

Extract lame-3.98.4.tar.gz to /ffmpeg/libraries (License: LGPL v2, Home page)

cd /ffmpeg/libraries/lame-3.98.4/
./configure --prefix=/ffmpeg/olibs --enable-static --disable-shared
make
make install


Build opencore-amr

Extract opencore-amr-0.1.2.tar.gz to /ffmpeg/libraries (License: Apache, Home page)

cd /ffmpeg/libraries/opencore-amr-0.1.2
./configure --prefix=/ffmpeg/olibs --enable-static --disable-shared
make
make install


Build vo-aacenc

Extract vo-aacenc-0.1.1.tar.gz to /ffmpeg/libraries (License: Apache, Home page)

cd /ffmpeg/libraries/vo-aacenc-0.1.1
./configure --prefix=/ffmpeg/olibs --enable-static --disable-shared
make
make install


Build vo-amrwbenc

Extract vo-amrwbenc-0.1.1.tar.gz to /ffmpeg/libraries (License: Apache, Home page)

cd /ffmpeg/libraries/vo-amrwbenc-0.1.1
./configure --prefix=/ffmpeg/olibs --enable-static --disable-shared
make
make install


Build libogg

Extract libogg-1.3.0.tar.gz to /ffmpeg/libraries (License: Modified BSD, Home page)

cd /ffmpeg/libraries/libogg-1.3.0
./configure --prefix=/ffmpeg/olibs --enable-static --disable-shared
make
make install


Build libvorbis

Extract libvorbis-1.3.2.tar.gz to /ffmpeg/libraries (License: Modified BSD, Home page)

cd /ffmpeg/libraries/libvorbis-1.3.2
./configure --prefix=/ffmpeg/olibs --enable-static --disable-shared
make
make install


Build libtheora

Extract libtheora-1.1.1.tar.bz2 to /ffmpeg/libraries (License: Modified BSD, Home page)

cd /ffmpeg/libraries/libtheora-1.1.1
./configure --prefix=/ffmpeg/olibs --enable-static --disable-shared --disable-oggtest --disable-vorbistest 
--disable-sdltest --disable-examples --with-ogg=/ffmpeg/olibs --with-vorbis=/ffmpeg/olibs
make
make install


Build x264

Extract x264-snapshot-20111002-2245-stable.tar.bz2 to /ffmpeg/libraries (License: GPL, Home page)

cd /ffmpeg/libraries/x264-snapshot-20111002-2245-stable
./configure --prefix=/ffmpeg/olibs --enable-static
make
make install


Build Xvid

Extract xvidcore-1.3.2.tar.gz to /ffmpeg/libraries (License: GPL, Home page)

cd /ffmpeg/libraries/xvidcore/build/generic
./configure --prefix=/ffmpeg/olibs 
make
make install
rm /ffmpeg/olibs/lib/xvidcore.dll
cp /ffmpeg/olibs/lib/xvidcore.a /ffmpeg/olibs/lib/libxvidcore.a


Build libvpx

Extract libvpx-v0.9.7-p1.zip to /ffmpeg/libraries (License: Modified BSD, Home page)

cd /ffmpeg/libraries/libvpx-v0.9.7-p1
./configure --prefix=/ffmpeg/olibs --enable-static --disable-shared
make
make install


Build libspeex

Extract speex-1.2rc1.tar.gz to /ffmpeg/libraries (License: Modified BSD, Home page)

cd /ffmpeg/libraries/speex-1.2rc1
./configure --prefix=/ffmpeg/olibs --enable-static --disable-shared
make
make install


Build libschroedinger

Extract schroedinger-1.0.10.tar.gz to /ffmpeg/libraries (License: LGPL, Home page)

cd /ffmpeg/libraries/schroedinger-1.0.10
./configure --prefix=/ffmpeg/olibs --enable-static --disable-shared
make
make install

Edit /ffmpeg/olibs/lib/pkgconfig/schroedinger-1.0.pc

Change:
Libs: -L${libdir} -lschroedinger-1.0
to
Libs: -L${libdir} -lschroedinger-1.0 -lorc-0.4


Build libxavs

Extract xavs-svn-r55.tar.gz to /ffmpeg/libraries (License: GPL, Home page)

cd /ffmpeg/libraries/xavs-svn-r55
./configure --prefix=/ffmpeg/olibs
make
make install


Build GPL FFmpeg

Extract ffmpeg-0.8.5.tar.gz to /ffmpeg/ (License: GPL, Home page)


cd /ffmpeg/ffmpeg-0.8.5

export PATH=$PATH:/ffmpeg/olibs/bin

./configure --prefix=/ffmpeg/Binaries_GPL 
 --enable-gpl 
 --disable-debug 
 --enable-static 
 --disable-shared 
 --enable-version3 
 --enable-runtime-cpudetect 
 --enable-avfilter 
 --enable-memalign-hack 
 --enable-avisynth 
 --enable-libgsm 
 --enable-libmp3lame 
 --enable-libopencore-amrnb 
 --enable-libopencore-amrwb 
 --enable-libtheora 
 --enable-libvorbis 
 --enable-libx264 
 --enable-libxvid 
 --enable-libvo-aacenc
 --enable-libvo-amrwbenc 
 --enable-libvpx
 --enable-libspeex
 --enable-libschroedinger
 --enable-libxavs
 --extra-cflags=-I/ffmpeg/olibs/include 
 --extra-ldflags=-L/ffmpeg/olibs/lib 
make
make install


To decompress the compressed files above, you will need a tool like BitZipper.


Updated October 5, 2011 to reflect the library versions used in Free File Converter 2011.