User Tools

Site Tools


This is an old revision of the document!

Compiling Avidemux

This article contains information on generally compiling Avidemux, from the SVN repository or from tarballs, for your operating and some custom choices for the compilation. There are general guides, package descriptions and specific information for some Linux distributions that need specific compilation switches to successufully create the program from source.

Information on the compilation

To compile Avidemux, you will need to have the necessary dependencies met. Namely, you will need to install (or have already installed) several development packages. Here is a list and brief description of the packages:

Mandatory packages

  • SpiderMonkey: Needed for scripting (only for Avidemux versions up to 2.3).
  • GTK+: Avidemux 2.1-2.3 needs GTK+ 2.6 or newer. That includes also pkg-config, that might be a separate package. Avidemux 2.4 or newer can be built with GTK+, Qt 4 or commandline user interface. The GTK+ version needs GTK+ 2.10 or newer, including Cairo. Some older Linux distributions (e.g. Fedora Core 4) include older GTK+ versions, without Cairo.
  • libxml2: XML library, version 2. Used for filter descriptions and ~/.avidemux/config.
  • GCC: Source code compiler for Avidemux to be created with.

Optional packages


  • libmad: MAD is needed for MP3 and MP2 decoding.
  • LAME: MP3 audio encoding.
  • libvorbis: Vorbis audio encoding and decoding.
  • FAAD: AAC audio decoder.
  • FAAC: AAC audio encoding.
  • a52dec: Audio decoding support for AC3 audio (DVDs & others).
  • libdca: Audio decoding support for DTS (DVD and others).


  • Xvid: MPEG-4 SP/ASP encoder.
  • x264: MPEG-4 AVC (H.264) encoder.


  • FreeType: needed for the Subtitler filter.
  • OSS: Open Sound System. Linux kernel 2.6 and newer uses ALSA with optional OSS emulation.
  • ALSA: Advanced Linux Sound Architecture. Direct ALSA sound output can be set in Preferences.
  • SDL: SDL can be used for audio and video output. Not needed on Linux and BSD.
  • XVideo: Hardware display acceleration (overlay) during playback. Lower CPU usage.
  • ESD: sound output daemon. Obsolete and not needed.
  • aRts: KDE 3.x sound system daemon. Not needed in KDE 4, not recommended.

General compilation instructions

This guide has information on compiling in two ways. The method for both is basically the same, with only one command change at the beginning to download from where you want.

Choosing what to compile

You have two choices for where you can download files to compile.

  1. Download the latest stable tarball version from the download page. This is the stable version for those who want a program that is mostly bug free and stable.
  1. Download the unstable source files for the latest versions of Avidemux from the SVN repository. The SVN version is usually the latest development version which can contain some bugfixes and also new features. It is classified as unstable or testing, though it really is quite stable in general. Regardless, we do not recommend using the SVN version to do any work you care about saving - use the stable version from the tarball on the website for that. You can download the source code from SVN using this command:
    svn co svn://

Compilation commands

cd avidemux

(enter the source code directory)

CMake build

The 2.4 branch uses CMake as its primary build method. You can build Avidemux 2.4 or later using these commands in the source code directory:

  1. cmake .

    (the dot is required)

  2. make

For more information, see the Switch to CMAKE in progress thread in the Avidemux forum.

Old method (Avidemux 2.3 and older)

  1. make -f Makefile.dist

    (this is needed if you compile the SVN version, not needed for the official release)

  2. ./configure --with-jsapi-include=xxxx [[--with-newfaad|for Gentoo or Ubuntu]]

    (xxxx is the directory where SpiderMonkey is installed - you cannot compile Avidemux 2.3 or older without SpiderMonkey, version 2.4 does not require external SpiderMonkey anymore)

  3. make

    (compile Avidemux)

  4. make install

    (install Avidemux - you must be root, use the


    command for that)

Using the 'locate jsapi.h' command will usually find the directory you need with the jsapi.h file. If the locate command does not find it, you should update the location database with the command 'updatedb' and then re-try 'locate jsapi.h' command.

Some people may not want to have all the feature for Avidemux compiled into their program. Here is a list of ./configure arguments to prevent features from being compiled:


  • OSS: –without-oss
  • aRts: –without-arts
  • ESD: –without-esd


  • XV: –disable-xv

Linux distribution specific notes

Debian (3.0 and beyond)

Currently there is no explicit guide for compiling the latest version of Avidemux from Subversion (SVN) in Debian. However you can follow the Ubuntu/Kubuntu SVN Compile guide on this same page generally with no changes to the process and you should be able to compile just fine.

Avidemux deb packages for Debian can be found at


You can get the necessary ebuilds for compiling Avidemux from the 2.3 subversion branch from the Berkano Overlay (which includes a couple of other ebuilds that may be useful). For information on how to use third-party ebuilds read the HowTo on the Gentoo Wiki.

Some Gentoo systems need the


argument with the ./configure stage of the compilation.


General downloads for Ubuntu

Enable the universe in your apt-source list. From a root console or via sudo use nano/vim/gedit or whatever text editor you like to open: /etc/apt/sources.list. You should either have the “universe” enabled on one of your repository lines.

After you have made sure the “universe” repository is enabled in your apt-sources file, from a root console or via sudo run this command:

sudo apt-get update

Next we will install the compile dependencies. Running this command line from the root console with either su or sudo will install many of the necessary dependencies for you to compile Avidemux with several extra features.

sudo apt-get install automake1.9 g++ gcc liba52-0.7.4 
liba52-0.7.4-dev libfaac-dev libfaad-dev 
libstdc++6 libgtk2.0-dev libglib2.0-dev 
libsdl-console-dev libxv-dev pkg-config 
liblame-dev libmad0-dev libvorbis-dev 
libxml2-dev libxvidcore4-dev subversion

The libmad0 may not be needed anymore, since I think they just changed statically added it to the most recent SVN. Regardless, it cannot hurt.

Download & compile

Go to the place on your system when you want to download the source files for Avidemux. Make sure that you have Subversion installed. If you followed the previous step, you should be fine. You can choose to use the stable 2.4 branch or the unstable developers 2.5 branch. Using a console as a normal user, run this command:

svn co svn://

Now the source files for the latest version of Avidemux from the SVN repositories are on your system, in a directory usually called avidemux_2.x_branch (where 'x' is the specific version you chose to download) at your currect working directory. Move into that directory and create the configure script by running these commands:

cd avidemux_2.x_branch #where 'x' is the specific version you chose to download
make -f Makefile.dist

After make is installed, from a run this command:


You now have a compiled executable file in avidemux_2.x_branch/avidemux called avidemux2_*. This is your new version of Avidemux. You may run it however you like or install it wherever you please.

Optional: make install

At this point you are done and all you need to do is from a console run this command:

sudo make install

Red Hat/Fedora

Red Hat follows the general procedures for compiling but if you run into problems during the ./configure command, try using this variable:


For Fedora Core 5 install js and js-devel using yum:

yum install js js-devel

Then run configure with


Compiling threadsafe SpiderMonkey

See the Compiling SpiderMonkey article.

JSAPI compile problems

If you have problems compiling jsapi SpiderMonkey with Fedora, try doing this before you run the ./configure command:

export LD_LIBRARY_PATH="/path/to/"


Slackware follows the general procedures for compiling but needs this in the ./configure command:


where the xxxx should point to the Spidermonkey installation directory. The easiest way to get Spidermonkey installed on your system is to install the Mozilla Slackware package. This will install the appropriate js files to eg. /usr/lib/mozilla-1.7.13/

Additionally, the *js* files in Mozilla directory should be in your libpath (eg. /usr/lib), so simply symlink them to there. Done!

Some Slackware users have reported problems with GTK+ compiling. We suggest trying to this option when you are compiling. It seems to help:

./configure --without-libsdl

In case you get the following error during 'make -f Makefile.dist': warning: macro `AM_GNU_GETTEXT' not found in library
*** Creating configure error: possibly undefined macro: AM_GNU_GETTEXT

you should install gettext-tools Slackware package.

In case of an error during the 'make install':

/bin/sh @MKINSTALLDIRS@ /usr/local/share
/bin/sh: @MKINSTALLDIRS@: No such file or directory

do the following:

to be filled in


This information is specific to SUSE version 10.1, but may work for other versions as well. It was tested using kernel 2.6.16, but may work for other versions as well.

SUSE follows the general procedures for compiling but needs this in the ./configure command:


Be sure to install ALL developer RPMs (packagename-devel) of the libraries you want to use, specially SpiderMonkey.

For 64-bit users, before you try to compile, you need to run to this command first:

export LDFLAGS="-L/usr/X11R6/lib64"

Microsoft Windows

This is a guide to building Avidemux from SVN in Microsoft Windows. It is intended for people who are familiar with compiling software but not necessarily using MinGW.



  • Archive utility that supports GZ, JAR, TAR and ZIP formats, e.g. WinZip
  • 500MB free disk space (MSYS – 50MB, MinGW – 135MB, Avidemux – 315MB)


  • Microsoft Visual C++ 6.0 with Service Pack 5

Note: The following instructions are tailored specifically for Microsoft Visual(nbsp)C++ 6.0. If you wish to use a different version of Visual(nbsp)C++ you may need to rebuild the dependencies required by Avidemux. More information at

Build environment

Download components

These components are necessary to build Avidemux on Microsoft Windows.

Program Component(s) Example Filename URL
MinGW binutils binutils-2.16.91-20060119-1.tar.gz MinGW website
gcc-core gcc-core-3.4.2-20040916-1.tar.gz
gcc-g++ gcc-g++-3.4.2-20040916-1.tar.gz
mingw-runtime mingw-runtime-3.11.tar.gz
mingw-utils mingw-utils-0.3.tar.gz
w32api w32api-3.8.tar.gz
MSYS MSYS-1.0.11-2004.04.30-1.exe
MSYS DTK msysDTK-1.0.1.exe
Pkg-config Tor Lillqvist's GTK+ for Windows website
TortoiseSVN TortoiseSVN- TortoiseSVN website

These components are only required if you wish to compile optional dependencies.

Program Component(s) Example Filename URL
Netwide Assembler nasm NASM website

These components are only required if you wish to compile optional dependencies with Microsoft Visual C++.

Program Component(s) Example Filename URL
Microsoft Visual C++ 6 Processor Pack vcpp5.exe MSDN website

Install build environment

To build Avidemux on a Microsoft Windows operating system you will require MSYS and MinGW. MSYS is a Unix style shell environment for Windows. MinGW is a collection of header files, import libraries and GNU toolsets for producing native Windows programs.

To download the Avidemux source code you will require TortoiseSVN, which is source control software. It is implemented as a Windows shell extension, which makes it integrate seamlessly into the Windows Explorer.

  1. Extract the contents of each MinGW tarball (binutils, gcc-core, gcc-g++, mingw-runtime, mingw-utils, w32api) to a folder on your hard-drive, e.g. C:DevMinGW.
  1. Run the MSYS installer (e.g. MSYS-1.0.11-2004.04.30-1.exe) and follow the install wizard. Choose an appropriate destination folder, e.g. C:Devmsys.
  2. Agree to the post install process.
  3. State that MinGW is installed.
  4. Enter the MinGW installation folder.
  5. Run the MSYS Developer Toolkit installer (e.g. msysDTK-1.0.1.exe) and follow the install wizard. Choose the MSYS folder for the destination folder.
  1. Extract the contents of the Pkg-config zip file to the MinGW folder.
  1. Run the Tortoise SVN installer and follow the install wizard.

Install optional build environment

Microsoft Visual C++ 6 Processor Pack

Install the Processor Pack only if you wish to compile optional dependencies using Microsoft Visual C++.

  1. Run the Processor Pack installer and follow the install wizard.
Netwide Assembler
  1. Extract the contents of the NASM zip file to an appropriate folder, e.g. C:Program FilesNasm.
  2. Make a copy of nasmw.exe and rename it to nasm.exe in the Nasm folder. (The optional components expect the filename to be nasm.exe but the Win32 version of NASM has a filename of nasmw.exe)
  3. Copy nasm.exe to the MinGW bin folder.

Configure build environment

  1. Open the profile file in the MSYS etc folder with a text editor.
  2. Add the following lines to the end of the file:
    export ACLOCALFLAGS="$ACLOCALFLAGS -I /mingw/share/aclocal/"
    export PKG_CONFIG_PATH="/mingw/lib/pkgconfig"
  3. Save file and close editor.

If you’ve installed the Netwide Assembler and wish to use Microsoft Visual C++ to compile optional dependencies, also follow these steps:

  1. Start Microsoft Visual C++.
  2. Choose Options from the Tools menu.
  3. Choose the Directories tab.
  4. Select Executable Files from the Show Directories For dropdown box.
  5. Add the path for NASM, e.g. C:Program FilesNasm.

Downloading source code from SVN

The source code for Avidemux and some of its dependencies must be downloaded from subversion repositories. TortoiseSVN supports all subversion protocols. Follow these steps to download code from an SVN URL:

  1. Open Windows Explorer and click on the C: drive with the right mouse button.
  2. Choose SVN Checkout from the popup menu.
  3. Enter the URL of repository, e.g. svn://
  4. Enter a Checkout directory, e.g. c:\Dev\avidemux.
  5. Click OK to download the source code.

Avidemux Dependencies

Download Dependencies

These dependencies are necessary to successfully build Avidemux.

Dependency Component(s) Example Filename URL
Expat v1 expat expat website
GTK+ atk Tor Lillqvist's GTK+ for Windows website
Libxml v2 libxml2 Libxml website
Netscape Portable Runtime nspr Mozilla NSPR FTP site
Pthreads-w32 v1 pthread-win32 pthreads-w32-1-11-0-release.exe Pthreads website
Spidermonkey js js-1.5.tar.gz Mozilla Spidermonkey website
Zlib zlib zlib website

These libraries are optional but enable Avidemux to have greater functionality.

Library Component(s) Example Filename URL
Aften aften Aften website
FAAC faac Audiocoding website
FAAD faad
LAME mp3lame lame-3.97.tar.gz LAME website
Libdca libdca libdca-0.0.2.tar.gz libdca website
Ogg Vorbis libogg Vorbis website
Simple DirectMedia Layer libsdl SDL website
Xvid xvid xvidcore-1.1.2.tar.gz Xvid website
build/compiling_avidemux.1271210476.txt.gz · Last modified: 2012/11/11 08:51 (external edit)