Flash Video - Delivered

Posted on: March 06, 2007

Or: how can you install FFMPEG encoder on Linux?

How many times have you been annoyed by online videos in different
proprietary streaming encodings? Have you looked at the beauty of
Youtube, Google Video, Revver etc. with owe? Did you envy the way they
accept long list of different encodings, re-encode them into FLV and
display to the users in the most friendly format?

Well, envy no more. Open-source library
FFMPEG is a fantastic video encoder. You
may need some help installing this beast, however. Unfortunately,
friendly installation seems to be very low on their priority list. Even
worse, when you spend hours struggling with the ffmpeg installation, you
will find out that once encoded into FLV sound is lost, videos are
completely mute! Bummer.

That is because FLV audio is mp3 and ffmpeg does not come with mp3
support by default. You will have to download and install Lame mp3
encoder first.

So, this is the bird's eye-view:

> sudo su - root
download lame, uncompress and all...
> ./configure --enable-shared --prefix=/usr
> make
> make install
make sure it was successful by issuing on bash: lame
Now, export ffmpeg HEAD from their SVN
(these dudes do not produce source distros).
If it breaks, try some earlier date.
> ./configure --enable-gpl --enable-libmp3lame --enable-shared
> make
> make install
and, then you can feel free to start encoding with a command as simple as:
ffmpeg -i source.mov output.flv

Irakli Nadareishvili's Blog

"The only things you need to be a great programmer are: curiosity, empathy and attention to detail. Everything else you can learn over time. Everything." ~ @inadarei