MLT document model: pure builders that produce xml.cljc node trees.
MLT's XML vocabulary, smallest useful subset: mlt root; LC_NUMERIC="C" so float serialization is locale-invariant profile frame geometry; the document carries one producer a clip source; resource lives in a property child playlist a track: <entry producer=.../> and <blank length=.../> refs tractor the timeline: <multitrack> of <track producer=.../> refs filter an effect on a producer/playlist/tractor transition a compositor between two tracks (a_track/b_track)
Builders return xml.cljc nodes; document assembles and xml/emit
serializes. No IO, no host conditionals — core + string only.
MLT document model: pure builders that produce xml.cljc node trees. MLT's XML vocabulary, smallest useful subset: mlt root; LC_NUMERIC="C" so float serialization is locale-invariant profile frame geometry; the document carries one producer a clip source; resource lives in a property child playlist a track: <entry producer=.../> and <blank length=.../> refs tractor the timeline: <multitrack> of <track producer=.../> refs filter an effect on a producer/playlist/tractor transition a compositor between two tracks (a_track/b_track) Builders return xml.cljc nodes; `document` assembles and `xml/emit` serializes. No IO, no host conditionals — core + string only.
(aspect width height)[w h] reduced: the display aspect of square pixels at WIDTH x HEIGHT. A vertical 1080x1920 profile is 9:16; the profile default of 16:9 would tell a player to stretch it.
[w h] reduced: the display aspect of square pixels at WIDTH x HEIGHT. A vertical 1080x1920 profile is 9:16; the profile default of 16:9 would tell a player to stretch it.
(blank length)A <blank length="n"/> gap in a playlist.
A <blank length="n"/> gap in a playlist.
(document & children)Assemble the root <mlt> node. children are profile, producers, playlists,
tractor in emission order.
Assemble the root <mlt> node. `children` are profile, producers, playlists, tractor in emission order.
(emit node)Serialize a document (or any node) to an MLT XML string.
Serialize a document (or any node) to an MLT XML string.
(entry id & {:keys [in out filters] :as _opts})A playlist <entry> referencing producer id, optionally cut by :in/:out.
:filters (filter nodes) are nested inside the entry, so they act on this
cut only. A nested filter's keyframes count from ITS OWN in, and its in/out
are source frames like the entry's: give it in/out or its keyframes are
read as source positions (measured 2026-09-15, melt 7.22).
A playlist <entry> referencing producer `id`, optionally cut by :in/:out. :filters (filter nodes) are nested inside the entry, so they act on this cut only. A nested filter's keyframes count from ITS OWN in, and its in/out are source frames like the entry's: give it in/out or its keyframes are read as source positions (measured 2026-09-15, melt 7.22).
(filter mlt-service args & {:keys [id in out] :as _opts})A <filter> node. mlt-service names the effect (e.g. "obscure", "volume");
args is a map of effect parameters, emitted as <property> children so any
mlt-service parameter is reachable without per-effect code.
A <filter> node. `mlt-service` names the effect (e.g. "obscure", "volume"); `args` is a map of effect parameters, emitted as <property> children so any mlt-service parameter is reachable without per-effect code.
MLT version stamped on emitted documents.
MLT version stamped on emitted documents.
(parse s)Parse an MLT XML string (kdenlive project file, melt output) into nodes.
Parse an MLT XML string (kdenlive project file, melt output) into nodes.
(playlist id items)A <playlist id=...> from a seq of entry/blank nodes.
A <playlist id=...> from a seq of entry/blank nodes.
(producer resource & {:keys [id in out length ttl] :as opts})A <producer> for resource (path/URL/color/...).
opts: :id :in :out :length :ttl :properties (map of extra properties).
A <producer> for `resource` (path/URL/color/...). opts: :id :in :out :length :ttl :properties (map of extra properties).
(profile &
{:keys [width height fps sar dar colorspace progressive]
:or {width 1920
height 1080
fps 25
sar [1 1]
dar [16 9]
progressive 1
colorspace 709}
:as _opts})A <profile> node. opts: :width :height :fps [num den] :sar :dar :colorspace. fps may be a number (converted to the nearest standard fraction) or a [num den] pair for exact rates like [30000 1001].
A <profile> node. opts: :width :height :fps [num den] :sar :dar :colorspace. fps may be a number (converted to the nearest standard fraction) or a [num den] pair for exact rates like [30000 1001].
(properties m)Map (or seq of pairs) to property nodes, in map order.
Map (or seq of pairs) to property nodes, in map order.
(property k v)A <property name="k">v</property> node. Keyword keys lose the colon
(:rect -> "rect"); v is stringified as-is.
A <property name="k">v</property> node. Keyword keys lose the colon (`:rect` -> "rect"); v is stringified as-is.
(qt-weight css-weight)The Qt5 weight for a CSS weight (100..900), rounding down to a named step.
The Qt5 weight for a CSS weight (100..900), rounding down to a named step.
(rgba colour)"#rrggbb" or "#rrggbbaa" (CSS order, alpha LAST) -> "r,g,b,a", the colour spelling of a Kdenlive title. Not MLT's #AARRGGBB, where alpha comes first and "#ff0000ff" is opaque blue.
"#rrggbb" or "#rrggbbaa" (CSS order, alpha LAST) -> "r,g,b,a", the colour spelling of a Kdenlive title. Not MLT's #AARRGGBB, where alpha comes first and "#ff0000ff" is opaque blue.
(title &
{:keys [width height frames text font size weight color background align
x y box-width]
:or {font "DejaVu Sans"
size 96
weight 700
color "#ffffff"
background "#00000000"
align :center}})A <kdenlivetitle> node: one text block on a transparent (or :background)
canvas of WIDTH x HEIGHT, FRAMES long. xml/emit it for the xmldata of a
kdenlivetitle producer.
opts :text (newlines break lines) :font :size (pixels) :weight (CSS) :color :background ("#rrggbb[aa]") :align (:left :center :right) :x :y (top-left of the text box) :box-width Unset :y centres the block vertically, from the line count and 1.25 x size per line; unset :x and :box-width span the canvas, so :align decides.
A <kdenlivetitle> node: one text block on a transparent (or :background)
canvas of WIDTH x HEIGHT, FRAMES long. `xml/emit` it for the xmldata of a
kdenlivetitle producer.
opts :text (newlines break lines) :font :size (pixels) :weight (CSS)
:color :background ("#rrggbb[aa]") :align (:left :center :right)
:x :y (top-left of the text box) :box-width
Unset :y centres the block vertically, from the line count and 1.25 x size
per line; unset :x and :box-width span the canvas, so :align decides.(title-producer title-xml frames & {:keys [id]})A kdenlivetitle <producer> for title XML text, FRAMES long. The resource is empty, as in a Kdenlive project; the title lives in xmldata.
A kdenlivetitle <producer> for title XML text, FRAMES long. The resource is empty, as in a Kdenlive project; the title lives in xmldata.
(track playlist-id & {:keys [hide] :as _opts})A <track producer="playlist-id"/> reference inside a multitrack. opts: :hide (:audio or :video) mutes one leg of the track.
A <track producer="playlist-id"/> reference inside a multitrack. opts: :hide (:audio or :video) mutes one leg of the track.
(tractor id tracks & {:keys [transitions filters] :as _opts})A <tractor> timeline over tracks (track nodes), with optional
transitions and filters appended after the multitrack.
A <tractor> timeline over `tracks` (track nodes), with optional transitions and filters appended after the multitrack.
(transition mlt-service a-track b-track args & {:keys [in out] :as _opts})A <transition> compositing b-track over a-track.
mlt-service e.g. "mix" (audio) or "frei0r.cairoblend" (video).
A <transition> compositing `b-track` over `a-track`. `mlt-service` e.g. "mix" (audio) or "frei0r.cairoblend" (video).
cljdoc builds & hosts documentation for Clojure/Script libraries
| Ctrl+k | Jump to recent docs |
| ← | Move to previous article |
| → | Move to next article |
| Ctrl+/ | Jump to the search field |