Installation

This article describes how to install swfdec from source. Before you do this you should check and see if swfdec is available in your distribution's package manager. By using the version supplied by your distribution you will get updates and security fixes automatically.

Which version should I use?

  • If your package manager has a current version in it, try that first.
  • If you want the latest features install from Git (recommended.) The installation instructions below describe how to install and use Git to the extent required to install swfdec.
  • If you cannot use Git for some reason then use the Source download instructions.

Installation from Git

These generic install instructions are derived from the Ubuntu/Kubuntu install instructions listed at http://revis.co.uk/site/?q=node/157 which have more detail for users of those distributions. Please note that packages names are still Debian / Ubuntu centric.

The first step is to install Git, the distributed version control tool.

Warning! the Git package is is not always called Git as there is another tool with the same name. The actual Git package we want is sometime called git-core. You should be able to install from your package manager.

The second step is to grab the source from the swfdec repository:

git clone git://anongit.freedesktop.org/git/swfdec/swfdec

cd swfdec

When you want to update in the future you can refresh your local copy with git pull origin instead of deleting everything and starting from scratch.

The third step is to make sure you have all the necessary build dependencies installed. The following packages are required and they, or packages with similar names, should be available from your package manager:

autoconf automake binutils gcc libasound2-dev libc6-dev libcairo2-dev libglib2.0-dev libgtk2.0-dev libgstreamer0.10-dev libgstreamer-plugins-base0.10-dev libnss3-dev liboil0.3-dev libpango1.0-dev libsoup2.4-dev libtool make pkg-config

If you want to use pulseaudio as audio backend add libpulse-dev, *BSD users needs to do so.

Please check that you are using a recent gcc version (gcc -v), Git snapshots of swfdec don't compile with gcc 3.x compilers.

Please note that since 0.7.x development series swfdec will use exclusively gstreamer as audio and video decoder. In order to have a good experience you have to install the gstreamer good and ugly plugins, called gstreamer0.10-plugins-good, gstreamer0.10-plugins-ffmpeg and gstreamer0.10-plugins-ugly.

Additionally, if you want to hack on swfdec you need to install (somewhere in PKG_CONFIG_PATH) the fairly recent libming 0.4.0beta5: http://sourceforge.net/project/showfiles.php?group_id=18365&package_id=187304&release_id=540333

The fourth step is to create the config files with

./autogen.sh

If you get any error messages here then it's probably because you are still missing some libraries that the application needs. If this is the case you can try your package manager for a package of a similar name with -dev on the end.

The default configure will use ALSA as audio backend, alternatively there is a Pulse Audio backend:

./autogen.sh --with-audio=pulse

Once the configure has completed you can build and install the package:

make

sudo make install

The fifth step is to grab and install the mozilla plugin in your home directory. Remember to move out of swfdec directory first (cd ..).

git clone git://anongit.freedesktop.org/git/swfdec/swfdec-mozilla

cd swfdec-mozilla

./autogen.sh --with-plugin-dir=$HOME/.mozilla/plugins

make

make install

After installing the plugin restarting Firefox activates it. You can check to see if it has worked by typing about:plugins in the Firefox address bar. You should then see Flash registered to the swfdec plugin.

Installation from source tarball

As time of writing latest stable releases are swfdec 0.8.4 and swfdec-mozilla 0.8.2.

Before you start should should make sure you have the following packages installed from your package manager or another source, debian / ubuntu names listed, yours may be a little different:

autoconf automake binutils gcc libasound2-dev libc6-dev libcairo2-dev libglib2.0-dev libgtk2.0-dev libgstreamer0.10-dev libgstreamer-plugins-base0.10-dev libnss3-dev liboil0.3-dev libpango1.0-dev libsoup2.4-dev libtool make pkg-config

If you want to use pulseaudio as audio backend add libpulse-dev, *BSD users needs to do so.

In order to have a good experience you have to install the gstreamer good and ugly plugins, called gstreamer0.10-plugins-good, gstreamer0.10-plugins-ffmpeg and gstreamer0.10-plugins-ugly.

You can then download the source code from the swfdec site and configure it.

wget http://swfdec.freedesktop.org/download/swfdec/0.8/swfdec-0.8.4.tar.gz

tar xvzf swfdec-0.8.4.tar.gz

cd swfdec-0.8.4

./configure

If you want the pulseaudio backend use:

./configure --with-audio=pulse

If you get any error messages here then it's probably because you are still missing some libraries that the application needs. If this is the case you can try your package manager for a package of a similar name with -dev on the end.

You can then make and install it...

make

sudo make install

...before installing the plugin.

cd ..

wget http://swfdec.freedesktop.org/download/swfdec-mozilla/0.8/swfdec-mozilla-0.8.2.tar.gz

tar xvzf swfdec-mozilla-0.8.2.tar.gz

cd swfdec-mozilla-0.8.2

./configure --with-plugin-dir=$HOME/.mozilla/plugins

make

make install

After installing the plugin restarting Firefox activates it You can check to see if it has worked by typing about:plugins in the Firefox address bar. You should then see Flash registered to the swfdec plugin.

Mozilla Issues Fix

Sometimes, even after you install the Mozilla plugin from the repository, it still won't work. This is because it does not recognise it as an alternative flash player. Run the following command in your Terminal to fix this *

. Restart Firefox and voila! It should work.

sudo ln -sf /usr/lib/swfdec/libswfdecmozilla.so /usr/lib/mozilla/plugins/flashplugin-alternative.so