MediaFX is a video (and soon audio) non-linear media editor. It is based on the Qt QML language with QtQuick and QtMultimedia. This means any QML effect or object can be incorporated into the generated video - ShaderEffect, 3D effects, Adobe After Effects animations, Timeline animations, web browser content, and so on.
See the full MediaFX documentation for the QML elements and modules.
MediaFX use Qt 6.6, and FFmpeg.
Given a file demo.qml
containing:
// Copyright (C) 2024 Andrew Wason
// SPDX-License-Identifier: GPL-3.0-or-later
import QtQuick
import QtQuick.Effects
import MediaFX
Item {
MediaClip {
id: videoClip
startTime: 2000
endTime: 3000
source: Qt.resolvedUrl("../fixtures/assets/red-320x180-15fps-8s.mp4")
audioRenderer: AudioRenderer {
}
Component.onCompleted: {
videoClip.clipEnded.connect(videoClip.RenderSession.session.endSession);
}
}
VideoRenderer {
id: videoRenderer
mediaClip: videoClip
layer.enabled: true
anchors.fill: parent
}
MultiEffect {
source: videoRenderer
saturation: -1.0
anchors.fill: parent
}
}
MediaClip is attached to VideoRenderer.mediaClip
and renders one second of the video frames of it's MediaClip.source.
The MultiEffect
filter is applied to the VideoRenderer
to desaturate it.
When the clip finishes, it's clipEnded signal triggers the
RenderSession.endSession slot via the RenderSession.session attached property to end encoding.
See Qt signals and slots.
To run this and generate a video:
$ mediafx encoder demo.qml output.nut
This will create a NUT format video with raw audio and video.
To encode to another format, pipe into ffmpeg
, e.g.
$ mediafx encoder demo.qml - | ffmpeg -i - output.mp4