This is branch of kdenlive_builder script the original one; classic if you want. No GUI, not interactive, just a hardcore CLI script.
Use this version if the GUI version does not work for you or you want call script repeatively or you prefer CLI.
This branch is (semi)maintaned by Espinosa (me) and it i released on "works-for-me" basis.
This version should fix a lot of building problems coming with latest SVN sources of ffmpeg and mlt.
I have just successfully build the whole lot - 12.4.2008
Changelog:
- version 3.1 - major updates; adapt script to several changes in kndelive, ffmpeg and mlt builds; particulary:[/*:m]
- adapt to ffmpeg headers structure, add ffmpeg_headers_hack1, ffmpeg_headers_hack2[/*:m]
- set PKG_CONFIG_PATH (needed to build MLT libavformat module)[/*:m]
- changes in LD_RUN_PATH (really needed?)[/*:m]
- ffmpeg configure options names changes, namely: disable-stripping, enable-postproc, enable-swscale [/*:m]
- keep LD_RUN_PATH approach to 'link' ffmpeg and mlt libraries to kdenlive[/*:m]
- TODO: add sub directory creation as a first step as some users reported that theis version of svn tool does not do it automatically for them.[/*:m]
- TODO: refactor code, extract parts to bash functions; consider partial merge with GUI variant of this script [/*:m]
#!/bin/bash # Script for easy and SAFE Kdenlive & ffmpeg & mlt & mlt++ build utilizing LD_RUN_PATH # All subprojects are compiled and installed to specified non-system directory. # You can safely keep multiple kdenlive/ffmpeg versions. # # This sript ensures, that kdenlive will call only desired ffmpeg and mlt libs. # Using LD_RUN_PATH is a better, more general, alternative to statically link it all together. # You can verify this it by calling # cd ~/build/kdenlive/bin && ldd ./kdenlive # - or - # cd ~/build/kdenlive/bin && LD_DEBUG=libs ./kdenlive # Set DEST_DIR in script, otherwise ~/build/kdenlive is used by default. # # Espinosa, Aleksander Adamowski (Olo) # $Id$ # # # Usage: # kdenlive_builder getsources - call svn to get sources for all subprojects for the first time # kdenlive_builder updatesources - call svn to update 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 # kdenlive_builder info - print revision numbers and dates for each component # 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.$(date +%F_%H_%M) # ..uncomment this if you prefer to have 'timestamp' in target directory name export DEST_DIR=~/build/kdenlive_0_6svn # Simulate older ffmpeg header files # Bash custom procedure function ffmpeg_headers_hack1 { mkdir $DEST_DIR/include/ffmpeg cd $DEST_DIR/include/ffmpeg ln -sf ../libavformat/* . ln -sf ../libavcodec/* . ln -sf ../libavdevice/* . ln -sf ../libavutil/* . ln -sf ../libpostproc/* . ln -sf ../libswscale/* . cd - } # Simulate older ffmpeg header files # Bash custom procedure function ffmpeg_headers_hack2 { cd $DEST_DIR/include ln -sf libavformat/* . ln -sf libavcodec/* . ln -sf libavdevice/* . ln -sf libavutil/* . ln -sf libpostproc/* . ln -sf libswscale/* . cd - } case "$1" in "getsources") # Download sources of ffmpeg, mtl, mlt++, kdenlive from their SVNs # Call this as a very first command, call it once, then use updatesources (quicker) # Subdirectories are created by this command svn co svn://svn.mplayerhq.hu/ffmpeg/trunk ffmpeg && svn co https://mlt.svn.sourceforge.net/svnroot/mlt/trunk/mlt mlt && svn co https://mlt.svn.sourceforge.net/svnroot/mlt/trunk/mlt++ mlt++ && svn co https://kdenlive.svn.sourceforge.net/svnroot/kdenlive/trunk/kdenlive ;; "updatesources") # The same as 'getsources' but quicker # You must have already all sorces downloaded prior to call this! cd ffmpeg && svn update && cd ../mlt && svn update && cd ../mlt++ && svn update && cd ../kdenlive && svn update ;; "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:..:. export LD_LIBRARY_PATH=$DEST_DIR/lib:$DEST_DIR/lib/mlt:$LD_LIBRARY_PATH export PKG_CONFIG_PATH=$DEST_DIR/lib/pkgconfig:$PKG_CONFIG_PATH cd ffmpeg && # # FFmpeg configuration settings explained: # # Note: Most of the options mean that an external library is required! Remember, many codecs, especially audio codecs, # are NOT implemented by FFmpeg, or the implementation is inferior. # # --enable-gpl .. enable GPLed libraries, like swscaller - ESSENTIAL, REQUIRED by MLTlink all files in directory # --enable-swscaler .. enable SW scaller, statically linked lib handled by ffmpeg but GPL - ESSENTIAL, REQUIRED by MLT # --enable-libmp3lame .. support for mp3 audio codec - STRONGLY RECOMMENDED # --enable-liba52 .. support for ACC (aka A52) audio codec used in DVDs - STRONGLY RECOMMENDED # --enable-libogg .. support for OGG format - RECOMMENDED # --enable-pp .. enable post processing of video - required?? # --enable-libtheora .. support for theora video codec by external lib - RECOMMENDED # --enable-libvorbis .. support for theora video codec by external lib - RECOMMENDED # --enable-libx264 .. support for high quality H264 codec, extern. lib - GOOD TO HAVE # --enable-libfaad .. support for Advaced Audio codec - AAC (iPod, some mp4) - GOOD TO HAVE # --enable-libfaac .. altern. support for Advaced Audio codec - AAC (iPod, some mp4) - GOOD TO HAVE # # --enable-vhook .. have no idea what is this good for, set on by default # --enable-x11grab .. have no idea what is this good for, set on by default # # --enable-libgsm .. support for low bandwith GSM audio codec, mostly speach, not much used in movies # --enable-libxvid .. Xvid codec support is well handled by FFmpeg itself - NOT RECOMMENDED # --enable-amr_nb .. support for audio codec, not widely used ? # --enable-amr_wb .. support for audio codec, not widely used ? # --enable-libdts .. support for audio? codec, not widely used ? # # --disable-strip .. disable stipping of debugging symbols to ease debugging # --enable-debug .. DEBUGGING support is swith ON by default. For a final distribution wise version remove this paramater # # --enable-libogg ..deprecated, ogg is now supported natively (only) by ffmpeg - Espinosa 25.11.2007 # --enable-swscaler and --enable-pp and --disable-strip removed - 3/4/2008 ./configure --prefix=$DEST_DIR \ --enable-gpl \ --enable-shared \ --enable-libtheora \ --enable-libmp3lame \ --enable-libvorbis \ --enable-liba52 \ --enable-postproc \ --enable-swscale \ --enable-debug \ --disable-stripping && make && make install && ffmpeg_headers_hack1 && ffmpeg_headers_hack2 && cd ../mlt && ./configure --prefix=$DEST_DIR --enable-gpl --avformat-swscale --enable-motion-est --enable-mmx --enable-debug --disable-gtk2 && make && make install && cd ../mlt++ && ./configure --prefix=$DEST_DIR --enable-debug && make && make install && #due to bug in recent cmake -DLIBFFMPEG_INCLUDE_DIR=$DEST_DIR/include had to be added - espinosa 4/4/2008 # -DLIBFFMPEG_INCLUDE_DIR=$DEST_DIR/include \ - removed again 12.4.2008 cd ../kdenlive && rm -f CMakeCache.txt && cmake \ -DCMAKE_INSTALL_PREFIX=$DEST_DIR \ -DCMAKE_BUILD_TYPE=Debug . && make && make install ;; "info") # Print SVN revision number and udate date for each component # Good to know when reporting an error cd ffmpeg echo "FFmpeg SVN version:" LANG=C LC_TIME=C svn info | grep '\(Revision\|Last\ Changed\ Date\)' cd ../mlt echo "MLT SVN version:" LANG=C LC_TIME=C svn info | grep '\(Revision\|Last\ Changed\ Date\)' cd ../mlt++ echo "MLT++ SVN version:" LANG=C LC_TIME=C svn info | grep '\(Revision\|Last\ Changed\ Date\)' cd ../kdenlive echo "Kdenlive SVN version:" LANG=C LC_TIME=C svn info | grep '\(Revision\|Last\ Changed\ Date\)' ;; *) # 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 - call svn to get sources for all subprojects for the first time' echo ' kdenlive_builder updatesources - call svn to update sources for all subprojects' echo ' kdenlive_builder clean - clean subdirs. Recommended to call prior to build' echo ' kdenlive_builder build - build and instal all sources to user defined directory' echo ' kdenlive_builder info - print revision numbers and dates for each component' ;; esac # Changelog: # v1.0 - 16.6.2007 # initial version # v2.0 - 27.6.2007 # support for debugging # fixes by Olo # better ffmpeg help # revision number printing, etc. # SVN revision 3 - 2007-07-07 # import into SVN on Google project hosting # 9.2.2008 - espinosa_cz # v3.0 - adapt for recent CMake adoption in Kdenlive # development of build_script splits to two branches - GUI (XDialog interactive version maintained by other community members) and classic (maintained by espinosa_cz) # 12.4.2008 - espinosa_cz # - version 3.1 - major updates; adapt script to several changes in kndelive, ffmpeg and mlt builds; particulary: # - adapt to ffmpeg headers structure, add ffmpeg_headers_hack1, ffmpeg_headers_hack2 # - set PKG_CONFIG_PATH (needed to build MLT libavformat module) # - changes in LD_RUN_PATH (really needed?) # - ffmpeg configure options names changes, namely: disable-stripping, enable-postproc, enable-swscale # - keep LD_RUN_PATH approach to 'link' ffmpeg and mlt libraries to kdenlive # - TODO: refactor code, extract parts to bash functions; consider partial merge with GUI variant of this script
[/]

I created an extra page in kdenlive wiki. Please read this first if you are confused or interested in using the script:
http://en.wikibooks.org/wiki/Kdenlive_b ... sic_script