From Media Design: Networked & Lens-Based wiki
Jump to navigation Jump to search

Here, we compile a custom version of ffmpeg to support encoding simple flash format videos. (In a nutshell, we enable libmp3lame encoding support ).

Download and unpack the source code

Download and unpack the ffmpeg 0.5 source package:

tar xvjf ffmpeg-0.5.tar.bz2

Use apt-get to install dependencies

We will be needing the libmp3lame library (development version) to support encoding MP3 audio in the FLV files.

To find the exact name of the library, you may want to search with:

sudo aptitude search mp3

Then install:

sudo apt-get install libmp3lame-dev

Configure ffmpeg to use the library

cd ffmpeg-0.5
./configure --help

Notice all the options! We will use lib3lame:

./configure --enable-libmp3lame

Check that the everything is ok, you should see the following:

libgsm enabled            no
libmp3lame enabled        yes
libnut enabled            no
libopenjpeg enabled       no

Compress your movie using your customized copy of ffmpeg

In this case we cd into the directory with our source movie, and specify an absolute path to the custom ffmpeg program that we have built and placed in "opt":

/opt/ffmpeg -i moviefabrique.avi -acodec libmp3lame -s 320x240 -b 200000 -ac 1 -ab 64000 moviefabrique.flv