Kdenlive/Developer HOWTO

From Wikibooks, open books for an open world
Jump to navigation Jump to search

(this page is merely a skeleton with lots of notes in parentheses which are indications for further rewriting later today; do not complain on its content until 2008-04-25 :) )

This page is intended for people who want to contribute code to Kdenlive, either occasionally or as a Kdenlive developer.

Intended audience[edit | edit source]

This HOWTO is intended for occasional contributors who are only interested in doing a limited number of specific fixes as well as regular developers willing to tackle bug tracker entries on a (more or less) regular basis.

The needed setup is the same for both contributors and developers, who must

  • have svn installed;
  • use the latest kdenlive source code via svn;
  • have development versions (headers at least, possibly source code as well) of all needed libs;
  • be subscribed to the kdenlive devel mailing list.

Developers also need:

  • a working sourceforge.net account (needed for being registered as a kdenlive developer)
  • a kdenlive developer account (granted by the project admin)

Getting Kdenlive source code[edit | edit source]

Kdenlive source code can be retrieved using svn Webinterface for the kdenlive svn: http://kdenlive.svn.sourceforge.net/ checkout kde3-version of kdenlive kde4-version (most work is now done here)

svn co https://kdenlive.svn.sourceforge.net/svnroot/kdenlive/branches/KDE4

Warning : kdenlive for kde3 will not maintained so you need to install a minimal KDE4 environment.

Also see Getting and installing Kdenlive.

First time:

cd <somedir>
svn co ...

Next times:

cd <somedir>kdenlive (make sure people notice it's <somedir>/kdenlive, not <somedir>)
svn update

when your modifications conflict with the svn version resolve it (Example how to use svn resolve) or google for "svn resolve"

(add a note on developer's current modifications wrt svn update: when to manually merge, how to do it)

Creating Kdenlive patches[edit | edit source]

For a single file, run 'svn diff' with the full path of the file. Exemple:

 svn diff kdenlive/krender.cpp

You can diff several files at once:

 svn diff 'file1.cpp file2.cpp ...'

You can diff a whole directory in one go:

 svn diff 'directory' 

to create a patch file:

 svn diff kdenlive/krender.cpp  > my-first.patch

Of course you can mix and match, e.g. create a single patch for a bunch of files and directories; but the bigger a patch is, the harder it is for people to review it. As a guideline, a patch should only contain modifications related to a single issue. If your local source tree contains modifications for several issues, make a pach for each issue.

Submitting Kdenlive patches[edit | edit source]

Occasional contributors must submit patches to devel mailing list (http://sourceforge.net/mail/?group_id=46786) for review and inclusion.

Developers can commit svn changes directly.

IRC-Talk[edit | edit source]

for questions or hints you could try to aks on #kdenlive-dev if a developer is present

Platform-specific developer notes[edit | edit source]

Contributors and developers: feel free to update/add platform-specific notes.

Mandriva 2008.1 (Spring) x86_64[edit | edit source]

As of 2008-04-24, Mandriva 2008.1/x86_64 provides MLT(++) version 0.2.5 but development libraries are still version 0.2.2, which is too old for kdenlive! This means that kdenlive developers on Mandriva 2008.1/x86_64 must also get MLT through SVN and compile it locally (add details on how to use user-generated MLT(++) libs for kdenlive debugging while leaving the production libs and kdenlive untouched).

Mdv2008.1's ffmpeg also lacks swscale support (amon other things) so it can also benefit from being recompiled.

  • Getting and Configuring ffmpeg on Mdv2008.1/x86_64
 svn checkout svn://svn.mplayerhq.hu/ffmpeg/trunk ffmpeg

I took my ./configure settings from a merge of the Mdv2008.1/x86_64 ffmpeg settings and the [[Kdenlive/Getting_and_installing|Getting and installing Kdenlive] page, with the following notable points:

  • forced --shlibdir to /usr/lib64 otherwise dynamic would end up in /usr/lib instead.
  • forced --incdir to /usr/include otherwise pkg-config files (*.pc) would include an illegal '$PREFIX'.
  • disabled static libs as they were no use.
  • removed libogg and some others which were not recognized any more by ffmpeg
  • changed --enable-pp into --enable-postproc and --enable-swscaler into --enable-swscale.
 ./configure --prefix=/usr --libdir=/usr/lib64 --shlibdir=/usr/lib64 --incdir=/usr/include --enable-shared --disable-static --enable-liba52 --enable-postproc --enable-gpl --enable-pthreads --enable-libnut --enable-libtheora --enable-libvorbis --enable-x11grab --enable-libmp3lame --enable-libfaad --enable-libfaac --enable-libx264 --enable-libxvid --enable-libamr_nb --enable-libamr_wb --enable-swscale --enable-nonfree

The make and make install steps went fine as far as I can tell. The newly installed ffmpeg and libs seem to work anyway. :)

  • Getting and Configuring mlt on Mdv2008.1/x86_64
 svn co https://mlt.svn.sourceforge.net/svnroot/mlt/trunk/mlt mlt

From the suggested configure settings, I enabled mmx (no reason not to support it), used --avformat-shared (to use the ffmpeg libs I'd just installed) and disabled frei0r (not available on my system), gtk2 (I don't use Gtk), jackrack (I don't use jack) and qimage (for some reason, it cannot find some qt-mt lib if I keep it enabled; maybe that's a KDE3 vs KDE4 issue; I am still using KDE3).

 ./configure --prefix=/usr --libdir=/usr/lib64 --enable-gpl --avformat-shared --enable-motion-est --disable-frei0r
 --disable-gtk2 --disable-jackrack --disable-qimage

Again, make and make install went fine.

  • Getting and Configuring mlt++ on Mdv2008.1/x86_64
 svn co https://mlt.svn.sourceforge.net/svnroot/mlt/trunk/mlt++ mlt++

I just needed to make sure the lib directory would be /usr/lib64 (by default it would have been /usr/lib)

 ./configure --libdir=/usr/lib64

There too, make and make install went fine.

  • Getting and Configuring Kdenlive on Mdv2008.1/x86_64
 svn co https://kdenlive.svn.sourceforge.net/svnroot/kdenlive/trunk/kdenlive


Fedora 10 (Cambridge) x86_64[edit | edit source]

This is quite similar to Mandriva installs so I just did some cut-and-paste from the above, here. I was not able to compile/use kdenlive as of Fedora 7 onward. Today I did it with Fedora 10 Preview and these are steps I followed (Italian Transl.):

  • OS and repositories

As Fedora 10 is still preview, no surprise it was difficult to find up-to-date repositories: then I came into fresh new RpmFusion repository that contained almost all needed dependencies.

  • Installed Devel Packages
 yum install cmake kdelibs-devel ladspa-devel libdv-devel libsamplerate libquicktime-devel libtheora-devel
 jack-audio-connection-kit-devel jack-rack soprano-devel libmad-devel faad2-devel faac-devel lame-devel lame-libs 

Maybe I'm missing many other...

  • Getting and Configuring ffmpeg
 svn checkout svn://svn.mplayerhq.hu/ffmpeg/trunk ffmpeg
 cd ffmpeg
 ./configure --enable-gpl --enable-shared --enable-pthreads --enable-libmp3lame --enable-libfaac --enable-libfaad
 --enable-libvorbis --enable-swscale --prefix=/usr

Note that, as far as i can understand, --prefix must be declared same as for mlt

 make && make install

Building ends seamlessly.

  • Getting and Configuring frei0r
 wget http://propirate.net/frei0r/latest.tar.gz
 tar xvzf latest.tar.gz
 cd frei0r-plugins.1.1.22/
 make && make install
  • Getting and Configuring Mlt
 svn co https://mlt.svn.sourceforge.net/svnroot/mlt/trunk/mlt mlt

Then I found I have to fix pkg-config path in order to let mlt configure to find avformat libs (maybe I messed up with the above --prefix: but I'm not sure )


qimage libraries path need tuning in order to use Qt4 (consider P.S. at end):

 ./configure --prefix=/usr --enable-gpl --qimage-libdir=/usr/lib64/ --qimage-includedir=/usr/include/Qt --avformat-swscale
 --disable-mmx --disable-sox

Note that, in my experience, without disabling mmx and sox, compile will exit with errors.

Again, make and make install went fine.

  • Getting and Configuring mlt++
 svn co https://mlt.svn.sourceforge.net/svnroot/mlt/trunk/mlt++ mlt++
 ./configure --prefix=/usr

There too, make and make install went fine.

  • Getting and Configuring Kdenlive
 svn co https://kdenlive.svn.sourceforge.net/svnroot/kdenlive/branches/KDE4
 cd KDE4
 mkdir build && cd build
 make && make install


P.S.(Latest news): However same procedure works on my home desktop while doesn't on the laptop at office; seems like mlt does not detect Qt4 includes correctly and build against qt3 on that laptop, thus crashing at launch. :-(