### Install Kdenlive Documentation and Licenses Source: https://github.com/multimedia/kdenlive/blob/master/CMakeLists.txt Installs project documentation files like AUTHORS, README.md, and the entire LICENSES directory to the appropriate installation paths. ```cmake include(GNUInstallDirs) install(FILES AUTHORS README.md DESTINATION ${CMAKE_INSTALL_DOCDIR}) install(DIRECTORY LICENSES DESTINATION ${CMAKE_INSTALL_DOCDIR}) ``` -------------------------------- ### GPL v3.0 Interactive Mode Notice Source: https://github.com/multimedia/kdenlive/blob/master/LICENSES/GPL-3.0-only.txt This example demonstrates the short notice to be displayed by a program when it starts in interactive mode, informing users about its free software status and warranty conditions. ```text Copyright (C) This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'. This is free software, and you are welcome to redistribute it under certain conditions; type `show c' for details. ``` -------------------------------- ### Install Kdenlive (using Ninja) Source: https://github.com/multimedia/kdenlive/blob/master/dev-docs/build.md Standard installation command after building Kdenlive with Ninja. ```bash ninja -j$JOBS sudo ninja install ``` -------------------------------- ### Install Plugin Source: https://github.com/multimedia/kdenlive/blob/master/plugins/sampleplugin/CMakeLists.txt Installs the compiled plugin library to the Kdenlive plugin directory. ```cmake install(TARGETS kdenlive_sampleplugin DESTINATION ${KDE_INSTALL_PLUGINDIR}) ``` -------------------------------- ### Build and Install Kdenlive Flatpak Source: https://github.com/multimedia/kdenlive/blob/master/packaging/flatpak/README.md Builds and installs the Kdenlive Flatpak from the root of the Kdenlive repository. This command uses the specified manifest file to configure the build process. ```bash flatpak-builder ~/flatpak-buildir .flatpak-manifest.json --install ``` -------------------------------- ### Install Logging Categories Source: https://github.com/multimedia/kdenlive/blob/master/CMakeLists.txt Installs Kdenlive's logging categories, making them available for use in the installed application. ```cmake ecm_qt_install_logging_categories( EXPORT KDENLIVE FILE kdenlive.categories DESTINATION ${KDE_INSTALL_LOGGINGCATEGORIESDIR} ) ``` -------------------------------- ### Build frei0r Effects Library Source: https://github.com/multimedia/kdenlive/blob/master/dev-docs/build.md Steps to build and install the latest frei0r effects library, including installing build dependencies, cloning the repository, and configuring the build with CMake. This example uses Ninja as the build system and disables OpenCV support. ```bash sudo apt build-dep frei0r git clone https://github.com/dyne/frei0r.git cd frei0r mkdir build cd build cmake .. -GNinja -DWITHOUT_OPENCV=true -DCMAKE_INSTALL_PREFIX=$INSTALL_PREFIX ``` -------------------------------- ### Define Installation Prefix Source: https://github.com/multimedia/kdenlive/blob/master/dev-docs/build.md Set the INSTALL_PREFIX environment variable to specify a custom installation directory for builds. Note that some Qt plugins may still be installed in system paths. ```bash INSTALL_PREFIX=$HOME/.local # or any other choice, the easiest would be to leave it empty ("")$ ``` -------------------------------- ### Installing the Renderer Executable Source: https://github.com/multimedia/kdenlive/blob/master/renderer/CMakeLists.txt Installs the kdenlive_render executable to the appropriate binary directory on the system. ```cmake install(TARGETS kdenlive_render DESTINATION ${KDE_INSTALL_BINDIR}) ``` -------------------------------- ### Install Flatpak and flatpak-builder on Ubuntu Source: https://github.com/multimedia/kdenlive/blob/master/packaging/flatpak/README.md Installs the flatpak and flatpak-builder tools on Ubuntu systems. These are prerequisites for building Flatpak applications. ```bash sudo apt install flatpak flatpak-builder ``` -------------------------------- ### Install KDE SDK for Flatpak Source: https://github.com/multimedia/kdenlive/blob/master/packaging/flatpak/README.md Installs the KDE SDK, which provides necessary development tools and libraries for building Kdenlive as a Flatpak. This command should be run before building the application. ```bash flatpak install org.kde.Sdk ``` -------------------------------- ### Install MLT Dependencies Source: https://github.com/multimedia/kdenlive/blob/master/dev-docs/build.md Installs all required dependencies for building the MLT framework from source. ```bash sudo apt install libxml++2.6-dev libavformat-dev libswscale-dev libavfilter-dev \ libavutil-dev libavdevice-dev libsdl1.2-dev librtaudio-dev libsox-dev \ libsamplerate0-dev librubberband-dev libebur128-dev libarchive-dev frei0r-plugins-dev ``` -------------------------------- ### Spin up a Docker Container for Building Source: https://github.com/multimedia/kdenlive/blob/master/dev-docs/build.md Demonstrates how to start a Docker container for building Kdenlive or its dependencies. The `--rm` flag ensures the container is removed upon exit. Note that GUI applications like Kdenlive cannot be easily run from within this container. ```bash # Spin up a Docker container # The --rm flag removes the container after it is stopped. docker run -it --rm ubuntu:22.04 # Now install the dependencies etc. # Note that you are root in the container, and sudo neither exists nor works. apt install … # When you are done, exit exit ``` -------------------------------- ### Freesound Provider Configuration Example Source: https://github.com/multimedia/kdenlive/blob/master/data/resourceproviders/README.md Example JSON configuration for the Freesound provider, demonstrating all available fields for name, homepage, type, integration, OAuth2 settings, and API endpoints. ```json { "name": "Freesound", "homepage": "https://freesound.org", "type": "sound", "integration": "buildin", "downloadOAuth2": true, "clientkey": "1234", "api": { "root": "https://freesound.org/apiv2", "oauth2": { "authorizationUrl": "https://freesound.org/apiv2/oauth2/authorize/", "accessTokenUrl": "https://freesound.org/apiv2/oauth2/access_token/", "clientId": "9876" }, "search": { "req": { "path": "/search/text/", "method": "GET", "params": [ { "key": "format", "value": "json" }, { "key": "fields", "value": "id,url,name,description,license,filesize,duration,username,download,previews,images,type" }, { "key": "page_size", "value": "%perpage%" }, { "key": "page", "value": "%pagenum%" }, { "key": "query", "value": "%query%" }, { "key": "token", "value": "%clientkey%" } ] }, "res": { "format": "json", "resultCount":"count", "list":"results", "name":"name", "filetype":"type", "id":"id", "url":"url", "licenseUrl":"license", "description": "description", "author": "username", "authorUrl": "$https://freesound.org/people/{username}", "duration": "duration", "filesize":"filesize", "downloadUrl": "download", "previewUrl": "previews.preview-hq-mp3", "imageUrl": "images.waveform_m" } } } } ``` -------------------------------- ### Install Kdenlive Scripts Source: https://github.com/multimedia/kdenlive/blob/master/data/scripts/CMakeLists.txt Installs Python scripts to the data directory of the Kdenlive installation. Ensure that the DATA_INSTALL_PREFIX is correctly defined for the target installation path. ```cmake INSTALL( FILES checkpackages.py otiointerface.py checkgpu.py generate_transition_previews.py DESTINATION ${KDE_INSTALL_DATADIR}${DATA_INSTALL_PREFIX}/scripts ) ``` -------------------------------- ### Kdenlive Project XML Structure Example Source: https://github.com/multimedia/kdenlive/blob/master/dev-docs/fileformat.md Illustrates the hierarchical structure of a Kdenlive project file, including profile, producers, playlists, tracks, and tractors. ```xml 3 ... ... ... ... 237 ... ... 1 ``` -------------------------------- ### Install Translation Tools on Debian/Ubuntu Source: https://github.com/multimedia/kdenlive/blob/master/dev-docs/build.md Installs the required tools for translation management on Debian or Ubuntu systems, including `gettext` and `kde-dev-utils`. ```bash # Debian/Ubuntu sudo apt install gettext kde-dev-utils ``` -------------------------------- ### Install Explicit Dependencies on Debian/Ubuntu Source: https://github.com/multimedia/kdenlive/blob/master/dev-docs/build.md Installs a comprehensive list of explicit dependencies for Kdenlive on Debian/Ubuntu, covering Qt6, KDE Frameworks 6, multimedia libraries, and additional development tools. ```bash # Qt6 modules sudo apt install qt6-base-dev qt6-svg-dev qt6-multimedia-dev qt6-networkauth-dev \ qml6-module-qtqml-workerscript qml6-module-qtquick-window qml6-module-org-kde-desktop \ qt6-declarative-private-dev # KDE Frameworks 6, based on Qt6 sudo apt install kf6-breeze-icon-theme libkf6archive-dev libkf6bookmarks-dev \ libkf6codecs-dev libkf6config-dev libkf6configwidgets-dev libkf6coreaddons-dev \ libkf6crash-dev libkf6dbusaddons-dev libkf6doctools-dev libkf6filemetadata-dev \ libkf6guiaddons-dev libkf6iconthemes-dev libkf6kio-dev libkf6newstuff-dev \ libkf6notifications-dev libkf6notifyconfig-dev libkf6purpose-dev \ libkf6solid-dev libkf6textwidgets-dev libkf6widgetsaddons-dev libkf6xmlgui-dev # KDE Style Breeze sudo apt install kde-style-breeze # Multimedia stack sudo apt install frei0r-plugins ffmpeg mediainfo sudo apt install ladspa-sdk libfftw3-dev libxine2-dev debhelper \ libarchive-dev libgdk-pixbuf-2.0-dev libsdl2-dev libxml2-dev libavdevice-dev \ librtaudio-dev libsox-dev frei0r-plugins-dev libdv4-dev libmovit-dev \ librubberband-dev libswscale-dev libebur128-dev libopencv-dev libsamplerate0-dev \ libvidstab-dev libexif-dev libpango1.0-dev libsdl1.2-compat-dev libvorbis-dev \ libavformat-dev libavcodec-dev libswresample-dev libavutil-dev libopentimelineio-dev # Additional libraries sudo apt install chrpath debhelper dh-python libxml2-dev python3-dev swig # Dependencies for localization sudo apt install ruby subversion gnupg2 gettext ``` -------------------------------- ### Example Configuration for Download URL Template Source: https://github.com/multimedia/kdenlive/blob/master/data/resourceproviders/README.md This configuration snippet demonstrates how to define a 'downloadUrls' template within the resource provider settings. It uses a template string with placeholders that will be dynamically replaced. ```json { ... "api": { ... "search": { ... "res": { ... "downloadUrls": { "key": "files", "url":"$https://example.org/files/{picname}-{id}", "name":"picname" } } } } } ``` -------------------------------- ### Install Build Tooling on Debian/Ubuntu Source: https://github.com/multimedia/kdenlive/blob/master/dev-docs/build.md Installs essential build tools like compilers, CMake, and Ninja for faster builds on Debian/Ubuntu systems. ```bash # Debian/Ubuntu sudo apt install build-essential git cmake extra-cmake-modules libsm-dev clang-format # For faster builds install Ninja sudo apt install ninja-build ``` -------------------------------- ### Install Translation Tools on Arch Linux Source: https://github.com/multimedia/kdenlive/blob/master/dev-docs/build.md Installs the necessary tools for translation management on Arch Linux, specifically `gettext` for handling `.po` files and `kde-dev-scripts` for KDE-specific i18n utilities. ```bash # Arch Linux sudo pacman -S gettext kde-dev-scripts ``` -------------------------------- ### Install MLT Development Packages Source: https://github.com/multimedia/kdenlive/blob/master/dev-docs/build.md Installs the necessary MLT development packages if your distribution has a recent version. ```bash sudo apt install libmlt++-dev libmlt-dev melt ``` -------------------------------- ### Install Build Tooling on Arch Linux Source: https://github.com/multimedia/kdenlive/blob/master/dev-docs/build.md Installs essential build tools like compilers, CMake, and Ninja for faster builds on Arch Linux systems. ```bash # Arch Linux sudo pacman -S base-devel git cmake extra-cmake-modules libx11 # Optional for faster builds install Ninja sudo pacman -S ninja ``` -------------------------------- ### Install Kdenlive Icons Source: https://github.com/multimedia/kdenlive/blob/master/data/icons/CMakeLists.txt Use the `ecm_install_icons` function to install various Kdenlive icon files to the specified KDE icon directory. This is typically used in a CMakeLists.txt file. ```cmake # SPDX-License-Identifier: BSD-2-Clause # SPDX-FileCopyrightText: Vincent Pinon , Julius Künzel , Jean-Baptiste Mardelle ecm_install_icons(ICONS sc-apps-kdenlive.svg 16-apps-kdenlive.png 22-apps-kdenlive.png 32-apps-kdenlive.png 48-apps-kdenlive.png 64-apps-kdenlive.png 128-apps-kdenlive.png 256-apps-kdenlive.png 512-apps-kdenlive.png 32-mimetypes-application-x-kdenlivetitle.png 64-mimetypes-application-x-kdenlivetitle.png 128-mimetypes-application-x-kdenlivetitle.png sc-mimetypes-application-x-kdenlive.svgz sc-mimetypes-application-x-kdenlive.svgz sc-mimetypes-video-mlt-playlist.svgz DESTINATION ${KDE_INSTALL_ICONDIR}) ``` -------------------------------- ### Example of Fetching Download URLs for Special Cases Source: https://github.com/multimedia/kdenlive/blob/master/data/resourceproviders/README.md This JSON configuration demonstrates how to fetch download URLs when they are not directly provided in the initial search response, such as from archive.org. It includes the request details to fetch item metadata and the response structure for handling download URLs, including object-based file listings and dynamic URL/name formatting. ```json "downloadUrls": { "req": { "path": "/details/%id%", "method": "GET", "params": [ { "key": "output", "value": "json"} ] }, "res": { "format": "json", "downloadUrls": {"key":"files", "isObject":true, "url":"$http://archive.org/download/%id%{&}", "format": "format", "name":"${source} {format} {width}x{height}"} } } ``` -------------------------------- ### Configure Kdenlive Build with CMake Source: https://github.com/multimedia/kdenlive/blob/master/dev-docs/build.md Configures the Kdenlive build with CMake, specifying Ninja, installation prefix, Qt system paths, and disabling release build. ```bash mkdir build && cd build cmake .. -GNinja -DCMAKE_INSTALL_PREFIX=$INSTALL_PREFIX -DKDE_INSTALL_USE_QT_SYS_PATHS=ON \ -DRELEASE_BUILD=OFF -DCMAKE_FIND_ROOT_PATH=/usr/local/KDAB/KDDockWidgets-2.5.0 ``` -------------------------------- ### Install Build Dependencies using Distribution Packages Source: https://github.com/multimedia/kdenlive/blob/master/dev-docs/build.md Conveniently installs build dependencies for MLT and Kdenlive using distribution-specific package management commands. Ensure deb-src entries are enabled for Debian/Ubuntu. ```bash # Debian/Ubuntu -- Enable deb-src entries /etc/apt/sources beforehand sudo apt build-dep mlt kdenlive # Arch Linux -- Install expac beforehand sudo pacman -S $(expac -S "%D" mlt) $(expac -S "%D" kdenlive) # Fedora/CentOS -- Install builddep beforehand dnf builddep mlt kdenlive # OpenSUSE zypper source-install --build-deps-only mlt kdenlive ``` -------------------------------- ### Add New Setting to kdenlivesettings.kcfg Source: https://github.com/multimedia/kdenlive/blob/master/dev-docs/coding.md Example of how to add a new boolean setting with a label and default value to the kdenlivesettings.kcfg file. ```xml true ``` -------------------------------- ### Include Qt Use File Source: https://github.com/multimedia/kdenlive/blob/master/plugins/sampleplugin/CMakeLists.txt Imports Qt build system integration, typically setting up Qt variables and targets. ```cmake include(${QT_USE_FILE}) ``` -------------------------------- ### Link Plugin Libraries Source: https://github.com/multimedia/kdenlive/blob/master/plugins/sampleplugin/CMakeLists.txt Links the sample plugin against necessary Kdenlive and Qt libraries. ```cmake target_link_libraries(kdenlive_sampleplugin KF5::KDELibs4Support KF5::KIOCore ${QT_LIBRARIES} ) ``` -------------------------------- ### Clone Kdenlive Packaging Repository Source: https://github.com/multimedia/kdenlive/blob/master/dev-docs/packaging.md Clone the Kdenlive packaging repository from Launchpad. Replace $USER with your Launchpad username. ```bash git clone git+ssh://$USER@git.launchpad.net/~kdenlive/+git/kdenlive-packaging ``` -------------------------------- ### Install KDDockWidgets on Debian/Ubuntu Source: https://github.com/multimedia/kdenlive/blob/master/dev-docs/build.md Installs the KDDockWidgets package if your distribution provides a recent enough version, such as on Ubuntu 25.10. ```bash sudo apt install kddockwidgets-qt6 ``` -------------------------------- ### Build Kdenlive with KDE Craft Source: https://github.com/multimedia/kdenlive/blob/master/dev-docs/build.md Initiates a Kdenlive build using the KDE Craft tool, specifying the master version. ```bash craft --option kdenlive.version=master kdenlive ``` -------------------------------- ### Install flatpak-external-data-checker Source: https://github.com/multimedia/kdenlive/blob/master/packaging/flatpak/README.md Installs the flatpak-external-data-checker tool, which is used to check for updates to Flatpak dependencies. This tool helps maintain up-to-date dependencies for the Flatpak. ```bash flatpak install --from https://dl.flathub.org/repo/appstream/org.flathub.flatpak-external-data-checker.flatpakref ``` -------------------------------- ### Add Sample Plugin Library Source: https://github.com/multimedia/kdenlive/blob/master/plugins/sampleplugin/CMakeLists.txt Defines the sample plugin as a loadable module library, including its source and UI files. ```cmake add_library(kdenlive_sampleplugin MODULE WITH_PREFIX ${sampleplugin_SRCS} ${sampleplugin_UIS} ) ``` -------------------------------- ### Applying GPL v3.0 to New Programs Source: https://github.com/multimedia/kdenlive/blob/master/LICENSES/GPL-3.0-only.txt This snippet shows the standard header to include at the beginning of each source file when licensing a program under the GPL v3.0. It ensures proper attribution and states the terms of redistribution. ```text Copyright (C) This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see . ``` -------------------------------- ### Example JSON Response Structure Source: https://github.com/multimedia/kdenlive/blob/master/data/resourceproviders/README.md This is an example of a JSON response structure that might be received from an API. It shows nested objects and arrays, which are relevant for template key extraction. ```json { "results": [ { "name": "example", "files": [ {"picname": "nice-picture", "id": "1234"}, ... ] } ] } ``` -------------------------------- ### Craft Packaging Command Source: https://github.com/multimedia/kdenlive/blob/master/dev-docs/packaging.md Use the craft command to package Kdenlive. Refer to the KDE Craft documentation for further instructions. ```bash craft --package kdenlive ``` -------------------------------- ### Write Setting to KdenliveSettings Source: https://github.com/multimedia/kdenlive/blob/master/dev-docs/coding.md Demonstrates how to write a boolean setting named 'logscale' to KdenliveSettings in C++. ```cpp // Write KdenliveSettings::setLogscale(true); ``` -------------------------------- ### Add Thumbnailer Plugin Source: https://github.com/multimedia/kdenlive/blob/master/thumbnailer/CMakeLists.txt Adds the 'mltpreview' plugin using kcoreaddons_add_plugin. Specifies the installation namespace. ```cmake kcoreaddons_add_plugin(mltpreview INSTALL_NAMESPACE "kf${QT_MAJOR_VERSION}/thumbcreator") ``` -------------------------------- ### Uninstall MLT Source: https://github.com/multimedia/kdenlive/blob/master/dev-docs/build.md Uninstalls MLT using the generated install manifest, useful for cleaning up a source build. ```bash sudo xargs -d '\n' rm < install_manifest.txt ``` -------------------------------- ### Package Kdenlive with Craft Source: https://github.com/multimedia/kdenlive/blob/master/dev-docs/build.md Packages Kdenlive for distribution (e.g., .dmg, .exe, .appimage) using the KDE Craft tool. ```bash craft --target=master --package kdenlive ``` -------------------------------- ### Enable Fuzzing during CMake Configuration Source: https://github.com/multimedia/kdenlive/blob/master/dev-docs/build.md Appends CMake options to enable fuzzing, specifying the C++ compiler (clang++). Requires clang to be installed. ```bash -DBUILD_FUZZING=ON -DCMAKE_CXX_COMPILER=/usr/bin/clang++ ``` -------------------------------- ### Check MLT Version Source: https://github.com/multimedia/kdenlive/blob/master/dev-docs/build.md Use this command to check the installed version of MLT. This is important as Kdenlive often requires the latest MLT version. ```bash melt --version ``` -------------------------------- ### Configure Kdenlive Header File Source: https://github.com/multimedia/kdenlive/blob/master/CMakeLists.txt Configures the 'config-kdenlive.h' file using a CMake template, allowing build-time variables like FFMPEG_SUFFIX to be embedded. ```cmake set(FFMPEG_SUFFIX "" CACHE STRING "FFmpeg custom suffix") configure_file(config-kdenlive.h.cmake config-kdenlive.h @ONLY) ``` -------------------------------- ### Set Environment Variables for Running Kdenlive Source: https://github.com/multimedia/kdenlive/blob/master/dev-docs/build.md Sources the generated script to set necessary environment variables for running Kdenlive when not installed in a standard system path. ```bash . prefix.sh kdenlive ``` -------------------------------- ### Include Directories and Definitions Source: https://github.com/multimedia/kdenlive/blob/master/tests/CMakeLists.txt Sets include directories and configures test definitions header. ```cmake include_directories(..) set(TEST_SOURCES ${CMAKE_CURRENT_SOURCE_DIR}) configure_file(tests_definitions.h.in tests_definitions.h) kde_enable_exceptions() ``` -------------------------------- ### Build KDDockWidgets with Qt6 Source: https://github.com/multimedia/kdenlive/blob/master/dev-docs/build.md Clones the KDDockWidgets repository and builds it using CMake with Qt6 support and the Qt Widgets frontend. This is an alternative if your distribution does not provide a recent enough version. ```bash git clone https://github.com/KDAB/KDDockWidgets.git cd KDDockWidgets mkdir build && cd build # To build with Qt6 cmake .. -GNinja -DKDDockWidgets_QT6=ON -DKDDockWidgets_FRONTENDS=qtwidgets ``` -------------------------------- ### Read Setting from KdenliveSettings Source: https://github.com/multimedia/kdenlive/blob/master/dev-docs/coding.md Demonstrates how to read a boolean setting named 'logscale' from KdenliveSettings in C++. ```cpp // Read bool logScale = KdenliveSettings::logscale(); ``` -------------------------------- ### Example of Multiple Download URLs in Search Response Source: https://github.com/multimedia/kdenlive/blob/master/data/resourceproviders/README.md This JSON snippet illustrates how multiple download URLs for an item are structured within a search response. It specifies the key for the list of files, a generic URL placeholder, and a template for naming file versions based on quality and dimensions. ```json "downloadUrls": { "key": "video_files", "url":"link", "name":"${quality} {width}x{height}" } ```