This is a script I use for downloading sources and building kdenlive + ffmpeg + mlt and there is no reason why not to share it with others.
I can only recommend to anyone to use this script. It's suggested to have self compiled latest ffmpeg and mlt when you are going to report a bug.
IMPORTANT: The script force kdenlive to look for its libraries primarily in local ../lib subdirectory. You don't need to set LD_LIBRARY_PATH anymore.
IMPORTANT: The script will not interfere with any installed ffmpeg or mlt or kdenlive from you distribution. everything is builded into separate directory.
I suggest kdenlive_builder.sh as a name for the script.
Put the script to your source root directory and run it!
You don't need to modify PATH. After successful compilation go into destination directory, ~/build/kdenlive, into bin directory, and run ./kdenlive.
#!/bin/bash # Script for easy Kdenlive & ffmpeg & mlt & mlt++ build utilizing LD_RUN_PATH # All subprojects are compiled and installed to specified directory. # This sript ensures, that kdenlive will call # You can verify this it by calling # cd ~/build/kdenlive/bin && ldd ./kdenlive # - or - # cd ~/build/kdenlive/bin && LD_DEBUG=libs ./kdenlive # You can safely have multiple kdenlive/ffmpeg versions. # Set DEST_DIR in script, otherwise ~/build/kdenlive is used by default. # # Espinosa # v1.0 - 16.6.2007 # # Usage: # kdenlive_builder getsources - call svn to get sources for all subprojects # kdenlive_builder clean - call make clean for all subprojects # kdenlive_builder build - call configure and make and make install for all subprojects # # Modify the destination directory if you want # Or you can copy it afterwars to /opt/kdenlive-or wherever you want. # Caution: if you pick /usr here, you system kdenlive, ffmpeg and mlt will be overwritten! export DEST_DIR=~/build/kdenlive case "$1" in "getsources") cd ffmpeg svn checkout svn://svn.mplayerhq.hu/ffmpeg/trunk ffmpeg cd ../mlt svn co https://mlt.svn.sourceforge.net/svnroot/mlt/trunk/mlt mlt cd ../mlt++ svn co https://mlt.svn.sourceforge.net/svnroot/mlt/trunk/mlt++ mlt++ cd ../kdenlive svn co https://svn.sourceforge.net/svnroot/kdenlive/trunk/kdenlive ;; "clean") cd ffmpeg make clean cd ../mlt make clean cd ../mlt++ make clean cd ../kdenlive make clean ;; "build") export PATH=$DEST_DIR/bin:$PATH export LD_RUN_PATH=../lib cd ffmpeg && # from kdenlive: wiki #./configure --prefix=$DEST_DIR --enable-gpl --enable-shared --enable-libvorbis --enable-libogg --enable-pp --enable-swscaler && ./configure --prefix=$DEST_DIR --enable-gpl --enable-shared --enable-swscaler \ --enable-libogg --enable-pp --enable-libtheora --enable-libmp3lame \ --enable-libfaac --enable-libfaad --enable-libvorbis --enable-liba52 \ --enable-vhook --enable-x11grab --enable-libx264 && make && make install && cd ../mlt && ./configure --prefix=$DEST_DIR --enable-gpl --avformat-swscale --enable-motion-est --disable-mmx && make && make install && cd ../mlt++ && ./configure --prefix=$DEST_DIR && make && make install && cd ../kdenlive && sh bootstrap && ./configure --prefix=$DEST_DIR && make && make install ;; *) # print some help echo 'Kdenlive & ffmpeg & mlt & mlt++ build script utilizing LD_RUN_PATH' echo 'Set DEST_DIR in script, otherwise ~/build/kdenlive is used by default' echo 'Usage: ' echo ' kdenlive_builder getsources' echo ' kdenlive_builder clean' echo ' kdenlive_builder build' ;; esac
The script is very simple, it tests nothing! You are expected to have all necessary external libs already installed prior to execution of this script.
Check kdenlive requirements at
http://en.wikibooks.org/wiki/Kdenlive/G ... g_from_SVN
.
Please report problems related to script here.
Feel free to comment, improve the script or discuss configuration parameters used here.
Advices from more experienced "bashists" are welcomed.

Do you have mad (MPEG Audio Decoder) library and dev package installed? What version?
http://en.wikipedia.org/wiki/MPEG_Audio_Decoder
http://www.underbit.com/products/mad/
Can you post be back full path to your libmad?
Mine is /usr/lib/libmad.so.0.2.1 and this is fine.
And also check if you have:
/usr/include/mad.h
Hmm, may be MAD is just not mentioned in requirements in wiki.
P.S.
You can omit MAD library from ffmpeg ./configure params, it is easy to locate the line in script. But I would suggest to keep it if possible.