Jump to content

Kdenlive/Development: Difference between revisions

From KDE Community Wiki
m Fix minor typos
Joseph (talk | contribs)
Removed Telegram info and link
 
(91 intermediate revisions by 10 users not shown)
Line 1: Line 1:
This page should guide the developer to a build environment and provide a general “getting started”.
Kdenlive is rather easy to build (at least on supported platforms), and this page should show you the simple steps to get there. If you encounter any problem during the process or spot any information that should be added/updated, please don't hesitate to reach out to the [[#Developer_Mailing_List| Developer's mailing list]] or the [https://webchat.kde.org/#/room/#kdenlive-dev:kde.org Developers' Matrix room].


== Pre-requisites ==
== Building Instructions ==


Current development code (2018) requires '''Qt >= 5.7''' and '''MLT >= 6.6.0'''. If your distro does not provide a recent MLT, you will need to compile it by yourself, see [[Kdenlive/Development/KF5|Kdenlive KF5 development page]].
The building instructions have been moved to the [https://invent.kde.org/multimedia/kdenlive/-/blob/master/dev-docs/build.md dev-docs folder in the code tree].


It is recommended to uninstall the official kdenlive package since our version will replace it:
(the rest of this page should follow)
<pre>
sudo apt-get remove kdenlive kdenlive-data
</pre>
You will need to install several Qt/KDE devel packages to successfully compile.
On Ubuntu the following packages will pull all the necessary dependencies:


sudo apt-get install \
== Next Steps ==
  libkf5archive-dev libkf5bookmarks-dev libkf5coreaddons-dev libkf5config-dev \
Once you've got a working dev environment, you should checkout the [https://invent.kde.org/multimedia/kdenlive/-/blob/master/dev-docs/contributing.md Contributing Guide] and [https://invent.kde.org/multimedia/kdenlive/-/blob/master/dev-docs/coding.md Coding Guide].
  libkf5configwidgets-dev libkf5dbusaddons-dev libkf5kio-dev libkf5widgetsaddons-dev \
  libkf5notifyconfig-dev libkf5newstuff-dev libkf5xmlgui-dev libkf5declarative-dev \
  libkf5notifications-dev libkf5guiaddons-dev libkf5textwidgets-dev libkf5iconthemes-dev \
  kdoctools-dev libkf5crash-dev libkf5filemetadata-dev extra-cmake-modules \
  libsm-dev cmake qtdeclarative5-dev libqt5svg5-dev kde-runtime kinit  kio \
  qml-module-qtquick-controls qml-module-qtquick-dialogs \
  libmlt-dev libmlt++-dev melt frei0r-plugins ffmpeg


<div style="background:#F5F5DC">Note: on slightly older Ubuntu (<= Xenial), the libkf5kio-dev package is called kio-dev</div>
Now you can [https://invent.kde.org/multimedia/kdenlive/-/issues/?sort=created_date&state=opened&label_name%5B%5D=Welcome%20tasks&first_page_size=20 find some nice first issues to solve]. Welcome on board!


== Getting the sources ==
A instruction of the workflow with KDE's GitLab can be found [[Infrastructure/GitLab|here]]. You can also gain more general knowledge by [https://techbase.kde.org/Development/Tutorials exploring the tutorials on TechBase].
 
Downloading Kdenlive source code:
 
We are cloning the git repository for kdenlive into a local folder on your hard drive.  This step will create a new kdenlive folder in the current directory. In this example, I cloned into ~/kdenlive/kdenlive_git.  Which creates ~/kdenlive/kdenlive_git/kdenlive
 
<pre>
cd ~/kdenlive
mkdir kdenlive_git
cd kdenlive_git
git clone git://anongit.kde.org/kdenlive.git
</pre>
 
 
The development branch is currently in 'refactoring_timeline'. So to get the latest code:
<pre>
cd kdenlive
git checkout -b refactoring_timeline origin/refactoring_timeline
</pre>
To avoid problems with plugins and libraries, it is easier to install Kdenlive in /usr:
<pre>
cmake . -DKDE_INSTALL_USE_QT_SYS_PATHS=ON -DCMAKE_INSTALL_PREFIX=/usr
</pre>
 
Then build and install:
<pre>
make -j5
sudo make install
</pre>
 
You can then start your compiled version by simple entering:
<pre>
kdenlive
</pre>
Some more detailed information if you also want to compile MLT to get the by yourself can be found on our [[Kdenlive/Development/KF5|KF5 development page]].<br/>
You can also get some general info on the TechBase tutorial [https://techbase.kde.org/Development/Tutorials/Building_An_Existing_Application Building An Existing Application]. You may also be interested in the other [https://techbase.kde.org/Development/Tutorials tutorials on TechBase].
 
== IDE Setup ==
Pick your favourite!
 
=== Setting up KDevelop ===
Open KDevelop and go to Project > Open/Import project
Then select the CMakeLists.txt file in the kdenlive source folder.
You can now start hacking on Kdenlive!
 
=== Setting up QtCreator ===
After checking out Kdenlive from git—when working on refactoring, you may want to clone two copies, one with the next branch and another one on the refactoring branch—, you can open the CMakeLists.txt in QtCreator, which will load the project if cmake succeeds. If you run/debug Kdenlive, make sure that kdenlive and not kdenlive_render is selected as an active project.
 
If you let QtCreator restore the previous session (File > Session manager), it will remember the open documents. Environment variables (see below) can be set in Projects > Build Environment.


== MLT documentation ==
== MLT documentation ==
Line 86: Line 25:
     strace build/src/kdenlive 2>&1 | grep kdenliveui.rc
     strace build/src/kdenlive 2>&1 | grep kdenliveui.rc


== Kdenlives File Format ==
A description on Kdenlives file format can be found [https://invent.kde.org/multimedia/kdenlive/-/blob/master/dev-docs/fileformat.md here].


== Developer Mailing List ==
== Contact ==
The kdenlive developer mailing list archives can be found [http://mail.kde.org/pipermail/kdenlive/ here]
 
A searchable archive of the kdenlive developer mailing list can be found [http://www.mail-archive.com/[email protected]/ here]


Information on how to subscribe can be found [https://mail.kde.org/mailman/listinfo/kdenlive here]
See [[Kdenlive#Contact|Contact]]

Latest revision as of 15:56, 22 August 2023

Kdenlive is rather easy to build (at least on supported platforms), and this page should show you the simple steps to get there. If you encounter any problem during the process or spot any information that should be added/updated, please don't hesitate to reach out to the Developer's mailing list or the Developers' Matrix room.

Building Instructions

The building instructions have been moved to the dev-docs folder in the code tree.

(the rest of this page should follow)

Next Steps

Once you've got a working dev environment, you should checkout the Contributing Guide and Coding Guide.

Now you can find some nice first issues to solve. Welcome on board!

A instruction of the workflow with KDE's GitLab can be found here. You can also gain more general knowledge by exploring the tutorials on TechBase.

MLT documentation

Kdenlive uses MLT’s C++ API called mlt++. This API is not documented as it is simply a wrapper to C functions. For example, the documentation of Mlt::Consumer::position() can be found in framework/mlt_consumer.c:mlt_consumer_position(). The actual C function name is usually a combination of the class name and the function name, but can also be found by consulting mlt++/MltConsumer.cpp:position().

Environment variables

If kdenlive crashes on startup (e.g. in QtCreator) and shows a message like:

   kdenlive(24309) KXMLGUIClient::setXMLFile: cannot find .rc file "kdenliveui.rc" for component "kdenlive"

then you have to ensure the .rc file is found. If CMake is configured to install Kdenlive to /usr/local, the .rc file is put there, but when kdenlive is then run from the build directory, the KXMLGUIClient will not search there. Solution: Set the environment variable KDEDIRS to $KDEDIRS:/usr/local.

You can get more information about the paths that are checked by running kdenlive like this:

   strace build/src/kdenlive 2>&1 | grep kdenliveui.rc

Kdenlives File Format

A description on Kdenlives file format can be found here.

Contact

See Contact