Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

47 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

kdenlive-cpp-cli

License: GPL-3.0 C++17 Platform: Linux Kdenlive Based on kdenliveLib Kdenlive C++ CLI

A headless command-line interface for Kdenlive project files. Links directly against kdenliveLib — Kdenlive's own internal library — and calls the same APIs the GUI uses. No logic is re-implemented; the CLI is a thin layer that exposes Kdenlive's timeline model to the terminal.

Features

Area Operations
Projects create, configure
Assets import, list, remove
Tracks add, remove, mute, effects
Clips add, remove, move, trim, cut, rename, shift, align, extract frames
Effects & Fades add, remove, configure on clips and tracks
Audio per-clip volume control
Metadata list available profiles, list available effects

Build

Clone this repo with its submodule (patched Kdenlive source):

git clone --recurse-submodules git@github.com:AhmedHodiani/kdenlive-cpp-cli.git
cd kdenlive-cpp-cli

Configure and build:

mkdir build && cd build
cmake ../kdenlive_src -DCMAKE_BUILD_TYPE=Release
cmake --build . --target kdenlive-cpp-cli -j$(nproc)

The binary is at build/bin/kdenlive-cpp-cli.

Dependencies

All inherited from Kdenlive. On Arch / CachyOS:

sudo pacman -S qt6-base qt6-svg qt6-declarative qt6-multimedia qt6-networkauth qt6-5compat \
  extra-cmake-modules kio kiconthemes knotifications knewstuff kfilemetadata solid purpose \
  ktextwidgets kguiaddons kconfigwidgets kbookmarks kcodecs karchive knotifyconfig kdbusaddons \
  kddockwidgets ffmpeg opentimelineio imath mlt

Usage

kdenlive-cpp-cli create --profile hdv_1080_25p --out project.kdenlive

kdenlive-cpp-cli track add    --project project.kdenlive --type video --name "Main Video"
kdenlive-cpp-cli assets import --project project.kdenlive --file clip.mp4

kdenlive-cpp-cli clips add    --project project.kdenlive --asset clip.mp4 --track 1 --position 00:00:00.000
kdenlive-cpp-cli clips trim   --project project.kdenlive --id 1 --in 00:00:02.000 --out 00:00:08.000
kdenlive-cpp-cli clips cut    --project project.kdenlive --id 1 --position 00:00:05.000

Design

  • No re-implementation — every operation calls an existing kdenliveLib function
  • No GUI — uses Core::build(..., testMode=true) and pCore->initHeadless(), same as Kdenlive's own test suite
  • Built inside Kdenlive's source tree — added as a CMake target to kdenlive_src/src/CMakeLists.txt, inheriting all dependencies automatically

License

GPL-3.0-only — matching Kdenlive's license.

About

Headless CLI for Kdenlive — manipulate .kdenlive project files from the terminal by calling Kdenlive's own internal APIs directly.

Topics

Resources

Stars

3 stars

Watchers

0 watching

Forks

Contributors

Languages