Skip to content

Instantly share code, notes, and snippets.

@valera-rozuvan
Created May 29, 2025 19:51
Show Gist options
  • Save valera-rozuvan/26b0b39a3fb66621671b0464fe2a6cf6 to your computer and use it in GitHub Desktop.
Save valera-rozuvan/26b0b39a3fb66621671b0464fe2a6cf6 to your computer and use it in GitHub Desktop.
Build Kdenlive 25.04.1 on Ubuntu 24.10 GNOME
#!/bin/bash
# Some online tutorials:
#
# 1. https://www.linuxuntu.com/install-kdenlive-linux/
# 2. https://invent.kde.org/bleuzen/kdenlive/-/blob/master/dev-docs/build.md?ref_type=heads
# 3. https://ubuntuhandbook.org/index.php/2024/12/compile-kdenlive-source-ubuntu/
# 4. https://www.mltframework.org/docs/buildscripts/
#
#
# After a fresh install of Ubuntu 24.10 Gnome edition, don't forget to update & upgrade:
sudo apt-get update
sudo apt-get upgrade
# It's going to pull a lot of dependencies, so do a system restart after this.
#
#
# We want X11 runtime. Edit the file '/etc/gdm3/custom.conf' and make sure that the line:
#
#
# WaylandEnable=false
#
#
# is NOT commented out. Restart the machine.
# Then you can check that you are running via X11:
echo "$XDG_SESSION_TYPE"
# You should see output of "x11"
#
#
# We are going to build without using `libmlt-dev`, `libmlt++-dev`, `frei0r-plugins-dev`.
# We are going to be compiling `mlt` and `frei0r` from source.
#
#
# Now come the actual application dependencies:
sudo apt-get install --no-install-recommends -y build-essential git cmake \
extra-cmake-modules libsm-dev clang-format ninja-build libxml++2.6-dev \
libswscale-dev libavfilter-dev libavutil-dev \
libavdevice-dev libsdl1.2-dev librtaudio-dev libsox-dev \
libsamplerate0-dev librubberband-dev libebur128-dev \
qtbase5-private-dev qt6-tools-dev qt6-l10n-tools debhelper \
pkg-kde-tools cmake extra-cmake-modules ffmpeg \
libavcodec-dev libswresample-dev pkgconf \
qt6-declarative-dev qt6-multimedia-dev qt6-networkauth-dev qt6-svg-dev \
libv4l-dev libkf6archive-dev libkf6bookmarks-dev libkf6codecs-dev \
libkf6crash-dev libkf6dbusaddons-dev libkf6filemetadata-dev \
libkf6iconthemes-dev libkf6newstuff-dev libkf6notifications-dev \
libkf6notifyconfig-dev libkf6purpose-dev libkf6solid-dev \
libkf6textwidgets-dev libkf6widgetsaddons-dev libkf6xmlgui-dev \
qml6-module-org-kde-desktop qml-module-org-kde-sonnet \
qml6-module-qtqml-models qml6-module-qtquick-window mediainfo \
chrpath dh-python \
imagemagick ladspa-sdk libarchive-dev libavformat-dev \
libdv4-dev libexif-dev libfftw3-dev libgavl2 \
libgdk-pixbuf-2.0-dev libjack-dev libmovit-dev libopencv-dev \
libpango1.0-dev qt6-5compat-dev \
libsdl1.2-compat-dev libsdl2-dev \
libvidstab-dev libvorbis-dev libxine2-dev libxml2-dev \
python3-dev swig clang-format-14 qtwayland5 \
qml-module-qtgraphicaleffects qml-module-org-kde-graphicaleffects \
qml6-module-qtquick-shapes qml6-module-qt5compat-graphicaleffects \
qml6-module-qtqml-statemachine \
qml6-module-qtqml-workerscript \
libqt6quick6 libqt6core5compat6 libqt6qmlworkerscript6 libgavl-dev
# It's going to pull a lot of dependencies, so do a system restart after this.
#
#
# Time to kick off the build process. Note that we are putting things
# in user directories, and not using `sudo`.
mkdir -p ~/dev
INSTALL_PREFIX=$HOME/.local
JOBS=6
cd ~/dev
git clone https://github.com/dyne/frei0r.git
cd ./frei0r
git checkout v2.3.3
git submodule update --init --recursive
mkdir ./build && cd ./build
cmake .. -GNinja -DCMAKE_INSTALL_PREFIX=$INSTALL_PREFIX -DWITHOUT_OPENCV=true
ninja -j $JOBS install
mkdir -p "/home/$USER/.frei0r-1"
ln -s "/home/$USER/.local/lib/frei0r-1" "/home/$USER/.frei0r-1/lib"
export FREI0R_PATH="/home/$USER/.frei0r-1/lib"
export PKG_CONFIG_PATH="/home/$USER/.local/lib/pkgconfig"
cd ~/dev
git clone https://github.com/mltframework/mlt.git
cd ./mlt
git checkout v7.32.0
git submodule update --init --recursive
mkdir ./build && cd ./build
cmake .. -GNinja \
-DCMAKE_INSTALL_PREFIX=$INSTALL_PREFIX \
-DCMAKE_BUILD_TYPE=Debug \
-DMOD_GLAXNIMATE_QT6=ON \
-DMOD_QT6=ON \
-DMOD_KDENLIVE=ON \
-DSWIG_PYTHON=ON \
-DMOD_OPENCV=ON \
-DMOD_GLAXNIMATE=OFF \
-DMOD_QT=OFF
ninja -j $JOBS install
export MLT_PROFILES_PATH="/home/$USER/.local/share/mlt-7/profiles"
cd ~/dev
git clone https://invent.kde.org/multimedia/kdenlive.git
cd ./kdenlive
git checkout v25.04.1
git submodule update --init --recursive
mkdir ./build && cd ./build
cmake .. -GNinja -DCMAKE_INSTALL_PREFIX=$INSTALL_PREFIX -DCMAKE_BUILD_TYPE=Debug -DKDE_INSTALL_USE_QT_SYS_PATHS=OFF -DRELEASE_BUILD=OFF -DQT_MAJOR_VERSION=6
ninja -j $JOBS install
# To run the application:
cd ~/dev/kdenlive/build
. ./prefix.sh
./bin/kdenlive
# Upon subsequent runs (after system reboot, etc.), you might want to add
# the following two lines to `~/dev/kdenlive/build/prefix.sh` file:
#
# export FREI0R_PATH="/home/$USER/.frei0r-1/lib"
# export MLT_PROFILES_PATH="/home/$USER/.local/share/mlt-7/profiles"
#
# So that Kdenlive knows about these two paths.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment