kdenlive_builder script classic v3.1 released

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

The new classic script worked great for me, thank you Espinosa!

I tried to adapt it for compiling the new kde4 version. I just changed the svn command to:
"svn co

https://kdenlive.svn.sourceforge.net/sv ... nches/KDE4

kdenlive"

But at the end of kdenlive i get:

[ 93%] Building CXX object src/cmake_bindir/CMakeFiles/kdenlive.dir/movetransitioncommand.o
[ 94%] Building CXX object src/cmake_bindir/CMakeFiles/kdenlive.dir/kdenlivesettings.o
Linking CXX executable kdenlive
[ 94%] Built target kdenlive
[ 95%] Generating kdenlive_render_automoc.cpp
Generating renderjob.moc
Scanning dependencies of target kdenlive_render
[ 96%] Building CXX object renderer/cmake_bindir/CMakeFiles/kdenlive_render.dir/kdenlive_render_automoc.o
[ 97%] Building CXX object renderer/cmake_bindir/CMakeFiles/kdenlive_render.dir/kdenlive_render.o
[ 98%] Building CXX object renderer/cmake_bindir/CMakeFiles/kdenlive_render.dir/renderjob.o
/home/doitux/Programme/kdenlive-kde4/kdenlive/renderer/renderjob.cpp: In member function ‘void RenderJob::slotAbort()’:
/home/doitux/Programme/kdenlive-kde4/kdenlive/renderer/renderjob.cpp:50: error: ‘stderr’ was not declared in this scope
/home/doitux/Programme/kdenlive-kde4/kdenlive/renderer/renderjob.cpp:50: error: ‘fprintf’ was not declared in this scope
/home/doitux/Programme/kdenlive-kde4/kdenlive/renderer/renderjob.cpp:54: error: ‘QFile’ was not declared in this scope
/home/doitux/Programme/kdenlive-kde4/kdenlive/renderer/renderjob.cpp:54: error: expected `;' before ‘f’
/home/doitux/Programme/kdenlive-kde4/kdenlive/renderer/renderjob.cpp:55: error: ‘f’ was not declared in this scope
/home/doitux/Programme/kdenlive-kde4/kdenlive/renderer/renderjob.cpp:57: error: ‘QFile’ was not declared in this scope
/home/doitux/Programme/kdenlive-kde4/kdenlive/renderer/renderjob.cpp:57: error: expected `;' before ‘f’
/home/doitux/Programme/kdenlive-kde4/kdenlive/renderer/renderjob.cpp:58: error: ‘f’ was not declared in this scope
/home/doitux/Programme/kdenlive-kde4/kdenlive/renderer/renderjob.cpp:59: error: ‘exit’ was not declared in this scope
/home/doitux/Programme/kdenlive-kde4/kdenlive/renderer/renderjob.cpp: In member function ‘void RenderJob::slotIsOver(int, QProcess::ExitStatus)’:
/home/doitux/Programme/kdenlive-kde4/kdenlive/renderer/renderjob.cpp:89: error: ‘QFile’ was not declared in this scope
/home/doitux/Programme/kdenlive-kde4/kdenlive/renderer/renderjob.cpp:89: error: expected `;' before ‘f’
/home/doitux/Programme/kdenlive-kde4/kdenlive/renderer/renderjob.cpp:90: error: ‘f’ was not declared in this scope
/home/doitux/Programme/kdenlive-kde4/kdenlive/renderer/renderjob.cpp:102: error: ‘exit’ was not declared in this scope
make[2]: *** [renderer/cmake_bindir/CMakeFiles/kdenlive_render.dir/renderjob.o] Fehler 1
make[1]: *** [renderer/cmake_bindir/CMakeFiles/kdenlive_render.dir/all] Fehler 2
make: *** [all] Fehler 2

Any ideas how to fix that?

hi, seems the last version of the script doesn't work with latest SVN sources and fails again on the avformat.h not found:

make[1]: Entering directory `/home/vladi/mlt/src/modules'
list='avformat motion_est vmfx lumas effectv sdl plus feeds oldfilm frei0r valerie core westley kino normalize kdenlive fezzik qimage xine vorbis inigo gtk2 resample jackrack dv sox'; \
	for subdir in $list; do \
		if [ -f $subdir/Makefile -a ! -f disable-$subdir ] ; \
		then make -C $subdir all || exit 1; \
		fi \
	done
make[2]: Entering directory `/home/vladi/mlt/src/modules/avformat'
cc -Wall -fPIC -DPIC   -O4 -pipe -fomit-frame-pointer -ffast-math -DUSE_MMX -g -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -pthread -I/include   -I../.. -DSWSCALE   -c -o factory.o factory.c
factory.c:34:22: error: avformat.h: No such file or directory
factory.c: In function ‘avformat_init’:
factory.c:90: warning: implicit declaration of function ‘av_register_all’
factory.c:92: warning: implicit declaration of function ‘av_log_set_level’
make[2]: *** [factory.o] Error 1
make[2]: Leaving directory `/home/vladi/mlt/src/modules/avformat'
make[1]: *** [all] Error 1
make[1]: Leaving directory `/home/vladi/mlt/src/modules'
make: *** [all] Error 1

any ideas how to fix/workaround it ?

Same thing here. Any help would be appreciated.
I tried tweaking the script help it find the include directory, but my knowledge is limited in this respect.

Hi guys, the packages in Ubuntu are really poor, crashing constantly. So I tried to build from source using the builder script. But I get the same issue as above.....any help.....I'm desperate to get progbox 0.3 out the door.

Ok, I got it built. I had to make two small hacks.

1) I hacked up the script, line 287 becomes
export CFLAGS="$CFLAGS -I$DEST_DIR/include/libavcodec/ -I$DEST_DIR/include/libavformat/ -I$DEST_DIR/include/libswscale/ -I$DEST_DIR/include/libavdevice/ -I$DEST_DIR/include/"
else it complains that it can't find the avcodec.h

2) Hack up a file in mlt source dir mlt/src/modules/avformat/Makefile
Change line 18, to read
LDFLAGS+=-L/home/pete/build/lib

However, even after doing this, it builds, but as soon as it starts, it segfaults, with this.

Quote:
Continuing.
Qt: gdb: -nograb added to command-line options.
Use the -dograb option to enforce grabbing.
kbuildsycoca running...
kio (KMimeType): WARNING: KServiceType::offers : servicetype ThumbCreator not found
kio (KMimeType): WARNING: KServiceType::offers : servicetype ThumbCreator not found
kdenlive: // INIT EFFECT SEARCH
kdenlive: --------- close 1b
kdenlive: --------- close 2b

Program received signal SIGSEGV, Segmentation fault.
mlt_properties_set (this=0x0, name=0x829fb1c "resource",
value=0x852a7b8 "/usr/share/apps/kdenlive/profiles/metadata.properties")
at mlt_properties.c:277
277 property_list *list = this->local;
Current language: auto; currently c
(gdb) bt
#0 mlt_properties_set (this=0x0, name=0x829fb1c "resource",
value=0x852a7b8 "/usr/share/apps/kdenlive/profiles/metadata.properties")
at mlt_properties.c:277
#1 0xb6ce2bd8 in Mlt::Properties::set ()
from /home/pete/build/lib/libmlt++.so.0
#2 0x081af929 in KRender::KRender ()
#3 0x081b0948 in KRenderManager::createRenderer ()
#4 0x081b0cd0 in KRenderManager::findRenderer ()
#5 0x08192dc6 in KdenliveDoc::KdenliveDoc ()
#6 0x0817c715 in Gui::KdenliveApp::initDocument ()
#7 0x0818a987 in Gui::KdenliveApp::KdenliveApp ()
#8 0x081d0781 in main ()
(gdb)

Any ideas??

cbx33,
I tried your ideas but still could not get MLT to build. It did progress further though so something is helping.
I just had the thought that you could back up the svn versions to some that worked with the sript. I used the other script on the forum successfully around March 23, 2008. I've been using the March svn version of kdenlive ever since. So you would need to manually use svn to rollback to whatever version of ffmpeg, mlt, mlt++, and kdenlive were around at that time.

useful commands would be: "svn log", "svn info", "svn update -r"

Also you might make sure kdenlive is finding the correct libraries when it runs. I have a script like this that I modified from the forums to run kdenlive:
#!/bin/bash
export LD_LIBRARY_PATH=/home/gsking/programs/kdenlive/build/lib:$LD_LIBRARY_PATH
export PATH=/home/gsking/programs/kdenlive/build/bin:$PATH
CPUS=$(cat /proc/cpuinfo | grep processor | tail -1 | awk '{print $3}')
export MLT_AVFORMAT_THREADS=$(($CPUS + 1))
kdenlive

Geoffrey....

Could you give me some more information...namely
1) What is your error message, I will take a look and see if I can help on that one.
2) What revision number did you use? Is it possible to find it. If the most current doesn't build. I can always try that older one then. How stable is it?

Pete

The version from March 23 that is working for me is this:
fmpeg 12566
mlt 1107
mlt++ 1107
kdenlive 1919

To get the script to work I had to edit these files as indicated on the forum:
/home/MYDIR/programs/kdenlive/src/kdenlive/kdenlive/krender.cpp
line 28 becomes: #include

/home/MYDIR/programs/kdenlive/src/kdenlive/cmake/modules/FindLIBFFMPEG.cmake
line 6 should have: libavformat/avformat.h

I did use the kdenlive_builder_31 script, and modified it slightly, it is also attached.
It's been fairly stable, but does crash occasionally. I just save lots of different versions. Seems more stable when I use the RAWDV format compared with Type 1 or 2 AVI. Also seems to have more problems when the videos get longer with lots of clips and transitions, but that is just subjective.

I'll upload the modified script also. It will need to be customized for your directories since I've hardcoded mine into it in a few places.

I hope this helps. Geoff

cc -Wall -fPIC -DPIC   -O4 -pipe -fomit-frame-pointer -ffast-math -DUSE_MMX -g -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -pthread -I/include   -I../.. -DSWSCALE   -c -o factory.o factory.c
factory.c:34:22: error: avformat.h: No such file or directory
factory.c: In function ‘avformat_init’:

I'm getting this error, even after installing libavformat-dev package.

cbx33 wrote:
Ok, I got it built. I had to make two small hacks.

1) I hacked up the script, line 287 becomes
export CFLAGS="$CFLAGS -I$DEST_DIR/include/libavcodec/ -I$DEST_DIR/include/libavformat/ -I$DEST_DIR/include/libswscale/ -I$DEST_DIR/include/libavdevice/ -I$DEST_DIR/include/"
else it complains that it can't find the avcodec.h

2) Hack up a file in mlt source dir mlt/src/modules/avformat/Makefile
Change line 18, to read
LDFLAGS+=-L/home/pete/build/lib

However, even after doing this, it builds, but as soon as it starts, it segfaults, with this.

Quote:
Continuing.
Qt: gdb: -nograb added to command-line options.
Use the -dograb option to enforce grabbing.
kbuildsycoca running...
kio (KMimeType): WARNING: KServiceType::offers : servicetype ThumbCreator not found
kio (KMimeType): WARNING: KServiceType::offers : servicetype ThumbCreator not found
kdenlive: // INIT EFFECT SEARCH
kdenlive: --------- close 1b
kdenlive: --------- close 2b

Program received signal SIGSEGV, Segmentation fault.
mlt_properties_set (this=0x0, name=0x829fb1c "resource",
value=0x852a7b8 "/usr/share/apps/kdenlive/profiles/metadata.properties")
at mlt_properties.c:277
277 property_list *list = this->local;
Current language: auto; currently c
(gdb) bt
#0 mlt_properties_set (this=0x0, name=0x829fb1c "resource",
value=0x852a7b8 "/usr/share/apps/kdenlive/profiles/metadata.properties")
at mlt_properties.c:277
#1 0xb6ce2bd8 in Mlt::Properties::set ()
from /home/pete/build/lib/libmlt++.so.0
#2 0x081af929 in KRender::KRender ()
#3 0x081b0948 in KRenderManager::createRenderer ()
#4 0x081b0cd0 in KRenderManager::findRenderer ()
#5 0x08192dc6 in KdenliveDoc::KdenliveDoc ()
#6 0x0817c715 in Gui::KdenliveApp::initDocument ()
#7 0x0818a987 in Gui::KdenliveApp::KdenliveApp ()
#8 0x081d0781 in main ()
(gdb)

Any ideas??

I couldn't understand what script you hacked. In the kdenlive_builder script given in first post of this thread contains only 226 lines.

I tried this Geoff, thanks. I'm getting a different fail now.

config.h is unchanged
make                    -C libavutil   all
make[1]: Entering directory `/home/pete/source/kdenlive4/ffmpeg/libavutil'
make[1]: Nothing to be done for `all'.
make[1]: Leaving directory `/home/pete/source/kdenlive4/ffmpeg/libavutil'
make                    -C libavcodec  all
make[1]: Entering directory `/home/pete/source/kdenlive4/ffmpeg/libavcodec'
make[1]: Nothing to be done for `all'.
make[1]: Leaving directory `/home/pete/source/kdenlive4/ffmpeg/libavcodec'
make                    -C libavformat all
make[1]: Entering directory `/home/pete/source/kdenlive4/ffmpeg/libavformat'
make[1]: Nothing to be done for `all'.
make[1]: Leaving directory `/home/pete/source/kdenlive4/ffmpeg/libavformat'
make                    -C libavdevice all
make[1]: Entering directory `/home/pete/source/kdenlive4/ffmpeg/libavdevice'
make[1]: Nothing to be done for `all'.
make[1]: Leaving directory `/home/pete/source/kdenlive4/ffmpeg/libavdevice'
: make -C libpostproc all
make  -C libswscale  all
make[1]: Entering directory `/home/pete/source/kdenlive4/ffmpeg/libswscale'
make[1]: warning: jobserver unavailable: using -j1. Add `+' to parent make rule.
make[1]: *** No rule to make target `all'. Stop.
make[1]: Leaving directory `/home/pete/source/kdenlive4/ffmpeg/libswscale'
make: *** [lib] Error 2
pete@ubuntu:~/source/kdenlive4$ 

Working on it, I'll post he results

Ok, I changed the ffmpeg/libswscale/Makefile, line 20, to point to common.mak and not subdir.mak

Building Now...

I got a working kdenlive. Just need to test it for stability now. Thank you so much Geoff. If this works it's a credit for you in the show :)

Now I get the dragging a video clip into the stage error.....can't add any video clips....

Must be an underlying issue somewhere.

Damn it!

Sorry it's not working.
My last suggestion would be to make sure you are only using the new svn versions.
-make sure the mlt..., mlt++, and kdenlive system libraries and dev files are not installed before building
-i also had to uninstall sox.. as it kept trying to use the system libs (this leaves out sox support within ffmpeg)
-make sure to use the script below like to run it after it builds (edit with your directories) otherwise it might try to use incompatible or missing libraries in they system folders:

========= RUN THIS AS A SCRIPT SAVE TO kdenlive-run.sh
#!/bin/bash
export LD_LIBRARY_PATH=/home/geoffrey/programs/kdenlive/build/lib:$LD_LIBRARY_PATH
export PATH=/home/geoffrey/programs/kdenlive/build/bin:$PATH
CPUS=$(cat /proc/cpuinfo | grep processor | tail -1 | awk '{print $3}')
export MLT_AVFORMAT_THREADS=$(($CPUS + 1))
kdenlive
=========

I really can't offer any more suggestions - I'm just lucky to have a working version I guess.
I'm surprised I did get it working, I'm starting to learn and make some sense of this programming stuff.
I hope the developers come up with some revisions in the near future. From my (non-developer) perspective it looks like the problems are due to the constant changes in the ffmpeg svn and moving around of libraries/includes or differences between libraries locations on different linux distributions. MLT and kdenlive have not completely caught up.

Also, from what I can tell in the forums, it seems as though they are spending more of their time working on the KDE4 version instead, which may be a good thing in the long run.

Good Luck, Geoff

Hey Geoff,

Ok, I did have things installed whilst I was building so I will try that.
I did get the old 0.5 working, but I now have issues with the volume plugin. Typical eh?

I'll try that

Pete

If the KDE4 version builds I'd happily use that instead ;)

Here's a few more thoughts on using the March 23rd SVN version ..
1- I've occasionally needed to delete the kdenliverc file if it starts crashing on startup.
it's here: ~/.kde/share/config/kdenliverc
2- I have ubuntu's system > preferences > sound set to alsa. Seems to work better with that setting. (Make sure libsdl1.2debian-all is installed).

I am trying to comple Kdenlive with AC3 audio support on Hardy. First I tried the gui script then I tried the classic script 3.1

I get this error when building... Can anyone help?

gcc -shared -Wl,-soname,libavutil.so.49  -rdynamic -export-dynamic -Wl,--warn-common -Wl,--as-needed -Wl,-rpath-link,"/home/krsnendu/KdenliveBuild/ffmpeg"/libavcodec -Wl,-rpath-link,"/home/krsnendu/KdenliveBuild/ffmpeg"/libavformat -Wl,-rpath-link,"/home/krsnendu/KdenliveBuild/ffmpeg"/libavutil -Wl,-Bsymbolic -o libavutil/libavutil.so.49 libavutil/adler32.o libavutil/aes.o libavutil/base64.o libavutil/crc.o libavutil/des.o libavutil/fifo.o libavutil/intfloat_readwrite.o libavutil/lls.o libavutil/log.o libavutil/lzo.o libavutil/mathematics.o libavutil/md5.o libavutil/mem.o libavutil/random.o libavutil/rational.o libavutil/rc4.o libavutil/sha1.o libavutil/string.o libavutil/tree.o libavutil/  -lz -lbz2 -lm -la52 -lmp3lame -lm -ltheora -logg -lvorbisenc -lvorbis -logg   -ldl -ldl 
/usr/bin/ld: libavutil/: No such file: File format not recognized
collect2: ld returned 1 exit status
make: *** [libavutil/libavutil.so.49] Error 1

Hi everyone!
I downloaded and installed the script on Ubuntu Hardy Heron 8.04 (not Kubuntu).
Downloaded the sources from svn flawlessly.
FFMPEG compiles well, but when the job passes to mlt, i have this error:

cc -shared -o ../libmltsox.so factory.o filter_sox.o  -L/usr/lib -lsox -lsfx -lsamplerate -L../../framework -lmlt
/usr/bin/ld: cannot find -lsfx
collect2: ld returned 1 exit status
make[2]: *** [../libmltsox.so] Error 1
make[2]: Leaving directory `/home/mzambianchi/kdenlive-svn/mlt/src/modules/sox'
make[1]: *** [all] Error 1
make[1]: Leaving directory `/home/mzambianchi/kdenlive-svn/mlt/src/modules'
make: *** [all] Error 1

Do you have any suggestion?

You could try installing the latest sox from

http://sox.sourceforge.net/

, which I think I did get me past this point. (and first uninstall sox using synaptic)
However, most of the recent kdenlive/ffmpeg/mlt I've tried have been unstable. The last version that worked well (but still had annoying crashes) for me was several months old. I've given up trying to use anything new.

Hi, I am having a problem with the script on a Gentoo install. It gets to the kdenlive configure and then gives the following error:

CMake Error: This project requires some variables to be set,
and cmake can not find them.
Please set the following variables:
QT_INCLUDE_DIR (ADVANCED)

As a guess, I tried building after entering "export QT_INCLUDE_DIR=/usr/qt/3/include" into the terminal, and then with "export QT_INCLUDE_DIR=/usr/include/qt4", but it doesn't make any difference. Can anybody tell me how I should set this variable? Thanks in advance!

Trying to get kde3 SVN i get this using the script. On Ubuntu Hardy

make[1]: Leaving directory `/home/user/build/kdenlive_0_6svn/mlt/src/humperdink'
make[1]: Entering directory `/home/user/build/kdenlive_0_6svn/mlt/src/albino'
make[1]: Nothing to be done for `all'.
make[1]: Leaving directory `/home/user/build/kdenlive_0_6svn/mlt/src/albino'
filter_sox.c:261:43: error: missing binary operator before token "("
filter_sox.c:268:43: error: missing binary operator before token "("
filter_sox.c:374:43: error: missing binary operator before token "("
make[2]: *** [depend] Error 1
make[1]: *** [depend] Error 1
make: *** [all] Error 1
user@laptop:~/build/kdenlive_0_6svn$

to use your script to compile kdenlive on my debian sid updated, i must do some changes in "/home/luigi/applicazioni/kdenlive/mlt/src/modules/qimage/configure".
- line 33: qimage_libdir=/usr/lib/qt4 -> /usr/lib
- line 38: qimage_libdir=/usr/lib/qt3 -> /usr/lib

i know that is a problem in mlt, but, maybe, it is useful here.

ciao
luigi