These instructions are for Ubuntu Karmic Koala 9.10. Most of the details for this guide are covered in HOWTO: Install and use the latest FFmpeg and x264. This guide is intended to quickly get you up and running with libavfilter once you are familiar with the linked HOWTO. For that reason, this guide will be as minimal as possible.
Initial Installation
1. Uninstall blockers
2. Install dependenciesCode:sudo apt-get remove ffmpeg x264 libx264-dev
3. Create and cd to the directory you would like your source files to live in. In my case it will be ~/ffmpeg-x264-avfilterCode:sudo apt-get update sudo apt-get install build-essential subversion git-core checkinstall yasm texi2html libfaac-dev libfaad-dev libmp3lame-dev libopencore-amrnb-dev libopencore-amrwb-dev libsdl1.2-dev libx11-dev libxfixes-dev libxvidcore4-dev zlib1g-dev
4. Install x264 from latest sourcesCode:cd mkdir ffmpeg-x264-avfilter cd ffmpeg-x264-avfilter
(Note that I'm skipping the libtheora step from the above-linked guide. If you need it, make sure to refer to that guide.)Code:git clone git://git.videolan.org/x264.git cd x264 ./configure make sudo checkinstall --pkgname=x264 --pkgversion "1:0.svn`date +%Y%m%d`+`git rev-list HEAD -n 1 | head -c 7`" --backup=no --default
5. Fetch libavfilter and ffmpeg sources
6. Make and install ffmpeg with libavfilterCode:cd .. svn checkout svn://svn.ffmpeg.org/soc/libavfilter cd libavfilter ./checkout.sh
7. Verify your installationCode:cd ffmpeg ./configure --enable-gpl --enable-version3 --enable-nonfree --enable-postproc --enable-pthreads --enable-libfaac --enable-libfaad --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libx264 --enable-libxvid --enable-x11grab --enable-avfilter --enable-avfilter-lavf make sudo checkinstall --pkgname=ffmpeg-avfilter --pkgversion "4:0.5+svn`date +%Y%m%d`" --backup=no --default
Code:hash ffmpeg ffmpeg -filters
Updating to latest libavfilter Not now! Only perform this when necessary.
Useful Note: It is pretty difficult to find useful documentation for libavfilter online. Point your browser at ~/ffmpeg-x264-avfilter/libavfilter/ffmpeg/doc/libavfilter.html (if you named your source directory as I did) for the full documentation on your version of libavfilter.Code:sudo apt-get remove ffmpeg-avfilter cd ~/ffmpeg-x264-avfilter/ svn checkout svn://svn.ffmpeg.org/soc/libavfilter cd libavfilter sudo rm -rf ffmpeg ./checkout.sh cd ffmpeg ./configure --enable-gpl --enable-version3 --enable-nonfree --enable-postproc --enable-pthreads --enable-libfaac --enable-libfaad --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libx264 --enable-libxvid --enable-x11grab --enable-avfilter --enable-avfilter-lavf make sudo checkinstall --pkgname=ffmpeg-avfilter --pkgversion "4:0.5+svn`date +%Y%m%d`" --backup=no --default
Another Note: libavfilter seems to be pretty unstable right now. If you'd like to try to debug a crash, invoke ffmpeg by using ~/ffmpeg-x264-avfilter/libavfilter/ffmpeg/ffmpeg_g as the command. This is the non-stripped version of ffmpeg. Alternatively you could pass --disable-stripping to the ffmpeg ./configure command (I think).
Disclaimer: This works for me with libavfilter revision 5715 -- the checkout.sh script should automatically pull in the appropriate ffmpeg version. It is possible that I have made a mistake or a typo in this guide, as I threw it together pretty quickly after I got it to work for me. Let me know any errors I may have made and I'll be happy to correct them.



Adv Reply


Bookmarks