Installing Avidemux

1.Mandatory packages

You will need a unix based machine, preferably x86. It also works to some extend on Sparc and MacOsX and Windows (mingw needed)

Package Comment
Gtk+ and glib 2.x and pkg-config (correctly configured pkg-config !)
libmad it is optional but believe me, you want it!
libxml2 Used for filter descriptions and ~/.avidemuxrc
Spidermonkey Need for avidemux scripting

You will also need automake, autoconf and autotools with recent versions. Of course if you are using a rpm/deb based distro you need the -dev packages also.

2.Optional Packages

Audio packages 

Name Version Aim Site
libMad 0.14.2b Mpeg 1/2/3 audio decoder http://mad.sf.net
a52dec 0.7.4 AC3 decoder http://liba52.sf.net
liblame 3.9x MP3 encoder http://www.mp3dev.org/mp3
libvorbis x Vorbis encoder/decoder http://www.vorbis.org/
libOgg x Needed by Vorbis http://www.vorbis.org/
Faac/faad x AAC encoder/decoder http://www.audiocoding.com/

Video packages 

Name Version Aim Site
Xvid 0.9 Mpeg4 encoder http://www.xvid.org
Xvid 1.x Mpeg4 encoder http://www.xvid.org
x264 1.x Mpeg4 AVC encoder http://www.videolan.org/x264.html

Warning: Avidemux2 will be statically linked to 0.9 OR 1.x

Misc packages 

Name Version Aim Site
Freetype x Needed for subtitles http://www.freetype.org/

3.Installation

It is rather straightforward.

Make -f Makefile.dist

./configure --with-jsapi-include=/usr/include/ [--with-newfaad]

The argument of --with-jsapi-include is the path to jsapi.h. You must provide it

The --with-newfaad argument is needed if you have a new style prototype of faad (gentoo, ubuntu breezy for example)

Take extra care at the end where a recap of what has been detected appears .For me it looks like this:

Code listing 3.1

nasm found : /usr/bin/nasm
MMX is ON
cpu done
 GTK+ version        : 2.2.4
 Divx5.0.5 ?         : yes
 *** DISABLED ***
 Xvid  Codec         : yes
 Mad decoder         : yes
 OSS                 : yes
 ALSA                : yes
 Xvideo              : yes
 Lame                : yes
 Ogg Vorbis          : yes
 A52/AC3             : yes
 FFMPEG              : yes
 ARTS                : yes
 FreeType            : yes
 XML2                : yes
 Toolame             : /usr/local/bin/toolame
 Lame                : /usr/bin/lame
 locale              : ${prefix}/share/locale
 Little endian cpu   : yes

	

If you think something is missing, check that you have also installed the -dev package.

Configure will also build lavcodec library.

When configure is done, make then make install . There is a pack of translations (a beginning of start of internationalisation) also installed.

4.Common install problems

Compilation fails 

It fails saying cannot open gtkxxx. Usually it means pkg-config/gtk+/glib is not installed or configured

It fails at link, with jpeg mmx 

Look at /usr/lib/liblavjpeg.la (or in /usr/local/lib) if you find this :

Code listing 4.1

		dependency_libs=' -L/usr/src/redhat/BUILD/mjpegtools-1.6.0/jpeg-mmx -ljpeg-mmx'
	
change it to

Code listing 4.2

		dependency_libs=''	
	
Thanks Jens for that one that hits a lot RedHat and Suse users.

automake complain or AM_GNU_AS or AM_GNU_GETTEXT error 

You need a recent version of automake and autoconf.

For the AM_GNU_GETTEXT, install gettext-dev.

Build fails at ADM_codecfaad.cpp 

You did not provide the --with-newfaad configure switch whereas you needed it, or the other way around.

Trouble detecting jsapi 

It can either fail at japi.h or locating the library.

For the former, you probably did not provide the path to jsapi.h.

For the latter, it can be several things

  • libjs.so, libsmjs.so ... are not in standard path. Symlink them to /usr/lib
  • You have a clash because you installed older version (you will see ctype_b error in config.log) or inappropriate version (32 bits version on a 64 bits system. Installing a correct version will fix the problem.
In both case, you must read the config.log file. It will tell you what happened.