Make ffmpeg more capable on Ubuntu 8.04 (aka "hardy")
Make ffmpeg able to encode many more file formats than it defaultly can
Hi. These instructions (adapted from here) will give you an ffmpeg able to create video in flv and h264 formats using many different input formats. These are specific to Ubuntu Hardy, but would probably work with minor tweaking on any modern debian derivative.
- Enable “multiverse” and “universe” repos.
- Install build dependencies:
apt-get build-dep ffmpeg - Install codecs and build stuff proper:
apt-get install liblame-dev libfaad-dev libfaac-dev libxvidcore4-dev \ liba52-0.7.4 liba52-0.7.4-dev libx264-dev \ checkinstall build-essential libdts-dev - Set up your build environment and get the source:
cd ~/tmp && apt-get source ffmpeg - Configure and build:
(or whatever the directory source was extracted to).cd ffmpeg-0.cvs20070307/
./configure --enable-gpl --enable-pp --enable-libvorbis \ --enable-libogg --enable-liba52 --enable-libdts --enable-dc1394 \ --enable-libgsm --disable-debug --enable-libmp3lame --enable-libfaad \ --enable-libfaac --enable-xvid --enable-pthreads --enable-x264
(stuff happens. Look for errors, there will probably be many warnings.)make - Build and install debian package:
checkinstall
During the checkinstall phase, be sure to name the package “ffmpeg” and increment its version. You can find the current version via:
aptitude show ffmpeg
And you don’t need to have ffmpeg installed to walk through these steps.
After this, you can create h264 video (suitable for playing in flash) via:
ffmpeg -i input.mov -b 200k -vcodec h264 -ar 22050 -ab 64k \
-r 24 -s 480x360 output.mp4
Or plain-old flv video via:
ffmpeg -i input.mov -b 200k -ar 22050 -ab 64k -r 24 -s 480x360 output.flv
“man ffmpeg” will clue you in on what all those options mean.
