Skip to the text
KDOS
Menu
kdos.dev KDOS from Scratch KDOS 0.2 · 4dd4a10 · 2026-11-30 Contents Index

322.6. avidemux-2.8.1

Qt 6 video cutter, filter and encoder

Version 2.8.1, release 1
Shelf video-tools — Video editing, transcoding, muxing, recording, streaming and webcam apps
Phase 44_apps (Applications), 414 of 422 in build order
Licence GPL-2.0-or-later
Homepage https://avidemux.sourceforge.net/
Build time 7.5 SBU
Installed size 30.4 MiB in 675 files
Recipe ports/core/video-tools/avidemux/kpkgbuild

About

Avidemux is a video editor for cutting, filtering and re-encoding: it trims and joins clips, applies filters, and writes the result through its encoders or copies the streams untouched. The port builds the Qt 6 application avidemux3_qt6, the command-line front end and the plugins for both. Its core carries a private FFmpeg release under avidemux_core/ffmpeg_package, patched by Avidemux and linked as its own libADM6av* libraries, separate from the ffmpeg port.

Sources

Dependencies

Depends on: cmake, make, pkgconf, nasm, patch, qt6-qtbase, qt6-qttools, qt6-qtwayland, sqlite, zlib, x264, x265, libvpx, opus, lame, twolame, libvorbis, faad2, libmad, libass, freetype2, fontconfig, fribidi, alsa-lib, libpulse, mesa, libglvnd, libX11, glu.

Required by: no port names it.

Optional, off in KDOS

These switches in build.sh turn off a feature whose library is a port here. The recipe may turn each off on purpose, or because the library was not yet a port when the recipe was written; this list cannot tell which.

Patches

build.sh applies these; kpkg applies nothing by itself.

Installation

From the repository root, inside the build container, this is the line kdosbuild runs for the port:

script/chroot/exec.sh bash -c 'source script/phases/44_apps/phase.env && kpkg install avidemux'

What kpkg does

kpkg runs these steps, in this order, as root inside the chroot. The port directory is /ports/core/video-tools/avidemux.

1. Verify every declared source. Each file a sha256 = line names, found in the port directory or in /var/cache/kpkg/sources, must hash to its line; a mismatch stops the build before anything is unpacked.

cd /ports/core/video-tools/avidemux
echo '77d9bdca8683ce57c192b69d207cfab7cf92a7759ce0f63fa37b5c8e42ad3da2  avidemux-2.8.1.tar.gz' | sha256sum -c -

2. Unpack. The work directory is emptied and the first source is unpacked into $SRC with its top directory stripped; any later tarball lands unstripped beside it in $SRC_ROOT, and a file that is not a tarball is copied into $SRC.

SRC_ROOT=/var/cache/kpkg/work/avidemux
SRC=$SRC_ROOT/avidemux-2.8.1
PKG=$SRC_ROOT/pkg
rm -rf "$SRC_ROOT"
mkdir -p "$SRC" "$PKG"
tar --no-same-permissions --warning=no-unknown-keyword -xf avidemux-2.8.1.tar.gz -C "$SRC" --strip-components=1

Every config.guess and config.sub older than automake’s is then replaced with automake’s, so a configure script recognises the musl target.

3. Build. build.sh is sourced in a subshell under set -e, from $SRC, with name, version, release and the five paths PKGNAME, PORT_SRC, SRC_ROOT, SRC and PKG set as shell variables. Its body, verbatim:

patch -p1 -i "$PORT_SRC/no-update-check.patch"
patch -p1 -i "$PORT_SRC/ffmpeg-mathops-shift.patch"
patch -p1 -i "$PORT_SRC/musl-glibc-calls.patch"
patch -p1 -i "$PORT_SRC/qt6-moc-headers-only.patch"
patch -p1 -i "$PORT_SRC/qt6-no-cxx11.patch"
patch -p1 -i "$PORT_SRC/mp4-menu-sentinel.patch"
patch -p1 -i "$PORT_SRC/x265-stat-filename.patch"
patch -p1 -i "$PORT_SRC/fluxsmooth-table-size.patch"

_features="-DQT6=ON -DOPENGL=ON -DSDL=OFF
	-DALSA=ON -DPULSEAUDIO=ON -DJACK=OFF -DARTS=OFF
	-DESD=OFF -DOSS=OFF -DVDPAU=OFF -DNVENC=OFF -DXVIDEO=OFF
	-DLIBVA=OFF -DVAPOURSYNTH=OFF -DX264=ON -DX265=ON
	-DVPXENC=ON -DAOMDEC=OFF -DOPUS=ON -DOPUS_ENCODER=ON -DLAME=ON
	-DVORBIS=ON -DLIBVORBIS=ON -DFAAD=ON -DFDK_AAC=OFF -DFAAC=OFF
	-DTWOLAME=ON -DAFTEN=OFF -DDCAENC=OFF -DLIBDCA=OFF -DXVID=OFF
	-DOPENCORE_AMRNB=OFF -DOPENCORE_AMRWB=OFF -DFREETYPE2=ON
	-DFONTCONFIG=ON -DFRIBIDI=ON -DGETTEXT=OFF
	-DTINYPY=ON -DUSE_EXTERNAL_LIBASS=ON -DUSE_EXTERNAL_LIBMAD=ON"

_part() {
	cmake -S "$2" -B "$1" -G "Unix Makefiles" \
		-DCMAKE_POLICY_VERSION_MINIMUM=3.5 \
		-DCMAKE_BUILD_TYPE=Release \
		-DCMAKE_INSTALL_PREFIX=/usr \
		-DFAKEROOT="$PKG" \
		-DENABLE_QT6=True \
		-DLRELEASE_EXECUTABLE=/usr/lib/qt6/bin/lrelease \
		$_features "${@:3}" \
		-Wno-dev
	make -C "$1"
	make -C "$1" DESTDIR="$PKG" install
}

_part buildCore avidemux_core
_part buildQt6 avidemux/qt4
_part buildCli avidemux/cli
_part buildPluginsCommon avidemux_plugins -DPLUGIN_UI=COMMON
_part buildPluginsQt6 avidemux_plugins -DPLUGIN_UI=QT4
_part buildPluginsCLI avidemux_plugins -DPLUGIN_UI=CLI
_part buildPluginsSettings avidemux_plugins -DPLUGIN_UI=SETTINGS

rm -rf "$PKG/usr/share/avidemux6/qt6/i18n"

cat > "$PKG/usr/share/applications/org.avidemux.Avidemux.desktop" <<'DESKTOP'
[Desktop Entry]
Type=Application
Name=Avidemux
GenericName=Video Cutter
Comment=Cut, filter and re-encode video files
Exec=avidemux3_qt6 %f
Icon=org.avidemux.Avidemux
Terminal=false
StartupWMClass=avidemux3_qt6
Categories=AudioVideo;AudioVideoEditing;Video;
Keywords=video;cut;trim;encode;filter;avidemux;
DESKTOP
chmod 644 "$PKG/usr/share/applications/org.avidemux.Avidemux.desktop"

The switches, and why each is set:

The common switches of each build system are explained in the Flag glossary.

4. Package. kpkg removes libtool archives, the info directory index, mimeinfo.cache and every fonts.dir from $PKG, copies the source’s licence files into /usr/share/licenses/avidemux, prunes what the image does not ship, lints the tree and rolls it reproducibly:

tar --sort=name --format=gnu --numeric-owner --owner=0 --group=0 \
    --mtime=@$SOURCE_DATE_EPOCH \
    --use-compress-program='xz -9 -T0 --block-size=32MiB --no-adjust' \
    -cf avidemux-2.8.1-1.tar.xz -C "$PKG" .

5. Adopt. kpkgadd installs the package’s files over the root, refusing a path another package owns, records the file list in /var/lib/kpkg/db/avidemux, and runs the triggers its paths call for.

Contents

Installed programs: avidemux3_cli, avidemux3_jobs_qt6, avidemux3_qt6.

Installed libraries: libADM6avcodec.so, libADM6avformat.so, libADM6avutil.so, libADM6postproc.so, libADM6swscale.so, libADM_UIQT66.so, libADM_UI_Cli6.so, libADM_audioParser6.so, libADM_core6.so, libADM_coreAudio6.so, libADM_coreAudioDevice6.so, libADM_coreAudioEncoder6.so, libADM_coreAudioFilterAPI6.so, libADM_coreDemuxer6.so, libADM_coreDemuxerMpeg6.so, libADM_coreImage6.so, libADM_coreImageLoader6.so, libADM_coreJobs.so, libADM_coreMuxer6.so, libADM_coreScript.so, libADM_coreSocket6.so, libADM_coreSqlLight3.so, libADM_coreSubtitles6.so, libADM_coreUI6.so, libADM_coreUtils6.so, libADM_coreVideoCodec6.so, libADM_coreVideoEncoder6.so, libADM_coreVideoFilter6.so, libADM_openGLQT66.so, libADM_render6_QT6.so, libADM_render6_cli.so.

Installed directories: /usr/include/avidemux, /usr/lib/ADM_plugins6, /usr/share/ADM6_addons, /usr/share/avidemux6, /usr/share/licenses/avidemux.

Notes