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

264.1. vlc-3.0.24

VLC media player 3 with its Qt 5 interface — plays files, discs, devices and streams

Version 3.0.24, release 2
Shelf video-players — Video players and media centres, and their front-end add-ons
Phase 43_toolkits (Toolkits), 283 of 344 in build order
Licence GPL-2.0-or-later AND LGPL-2.1-or-later
Homepage https://www.videolan.org/vlc/
Build time 8.8 SBU
Installed size 20.9 MiB in 623 files
Recipe ports/core/video-players/vlc/kpkgbuild

About

VLC is VideoLAN’s media player: files, DVDs, Blu-ray discs, audio CDs, capture devices and network streams, with transcoding and streaming out (sout) as well. This port builds VLC 3 with its Qt 5 interface, libvlc and libvlccore for programs that embed it, the ncurses text interface, and the modules its configure line names.

The Qt interface is built with its X11 helpers (qt5-qtx11extras), and VLC 3 then starts Qt on its xcb platform whatever QT_QPA_PLATFORM says, and does not open the interface at all when no X display answers. So VLC runs under Xwayland, embeds the video in its window by X window id, and draws through the xcb, XVideo, GLX and EGL-on-X11 video outputs. --enable-wayland builds the Wayland outputs as well, with an xdg-shell video window that VLC opens when it runs without the Qt interface and with no X display, as cvlc does with DISPLAY unset.

Sources

Dependencies

Depends on: pkgconf, lua54, dbus, zlib, minizip, libidn, freetype2, libogg, libxcb, libarchive, libdvdread, libdvdnav, libbluray, samba, libssh2, libnfs, v4l-utils, libdvbpsi, libgme, libebml, libmatroska, libmodplug, libmad, mpg123, ffmpeg, libva, faad2, dav1d, libvpx, flac, libvorbis, speex, speexdsp, opus, libtheora, libpng, libjpeg-turbo, x264, x265, a52dec, libmpeg2, twolame, fluidsynth, fribidi, harfbuzz, fontconfig, libass, librsvg, libpulse, alsa-lib, libsamplerate, soxr, libspatialaudio, chromaprint, qt5-qtbase, qt5-qtsvg, qt5-qtx11extras, qt5-qtwayland, ncurses, avahi, eudev, lirc, libmtp, libxml2, libgcrypt, gnutls, taglib, libsecret, xcb-util-keysyms, libX11, libSM, libICE, libsrt, librist, mesa, wayland, wayland-protocols.

Required by (5): elisa, kalarm, kasts, obs-studio, phonon-backend-vlc.

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/43_toolkits/phase.env && kpkg install vlc'

What kpkg does

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

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-players/vlc
echo 'e7cab503d1d7d5849b89d2cf0e1ee60d0ef6d012407791b644b9cfc0cc225fdf  vlc-3.0.24.tar.xz' | 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/vlc
SRC=$SRC_ROOT/vlc-3.0.24
PKG=$SRC_ROOT/pkg
rm -rf "$SRC_ROOT"
mkdir -p "$SRC" "$PKG"
tar --no-same-permissions --warning=no-unknown-keyword -xf vlc-3.0.24.tar.xz -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/musl-ioctl.patch"
patch -p1 -i "$PORT_SRC/fribidi_allow_deprecated.patch"

export LUA_CFLAGS="$(pkg-config --cflags lua5.4)"
export LUA_LIBS="$(pkg-config --libs lua5.4)"
export LUAC=luac5.4

export BUILDCC="gcc -std=gnu11"

./configure --prefix=/usr --sysconfdir=/etc --libdir=/usr/lib \
	--disable-static \
	--disable-rpath \
	--disable-nls \
	--disable-debug \
	--disable-update-check \
	--disable-addonmanagermodules \
	--enable-vlc \
	--enable-dbus \
	--enable-sout \
	--enable-lua \
	--enable-vlm \
	--enable-archive \
	--enable-dvdread \
	--enable-dvdnav \
	--enable-bluray \
	--enable-smbclient \
	--enable-sftp \
	--enable-nfs \
	--enable-v4l2 \
	--enable-vcd \
	--enable-screen \
	--enable-dvbpsi \
	--enable-gme \
	--enable-ogg \
	--enable-matroska \
	--enable-mod \
	--enable-wma-fixed \
	--enable-mad \
	--enable-mpg123 \
	--enable-merge-ffmpeg \
	--enable-avcodec \
	--enable-avformat \
	--enable-swscale \
	--enable-libva \
	--enable-faad \
	--enable-dav1d \
	--enable-vpx \
	--enable-a52 \
	--enable-libmpeg2 \
	--enable-twolame \
	--enable-flac \
	--enable-vorbis \
	--enable-speex \
	--enable-opus \
	--enable-theora \
	--enable-oggspots \
	--enable-png \
	--enable-jpeg \
	--enable-x264 \
	--enable-x265 \
	--enable-fluidsynth \
	--enable-telx \
	--enable-css \
	--enable-gles2 \
	--with-x \
	--enable-xcb \
	--enable-xvideo \
	--enable-wayland \
	--enable-freetype \
	--enable-fribidi \
	--enable-harfbuzz \
	--enable-fontconfig \
	--enable-libass \
	--enable-svg \
	--enable-svgdec \
	--enable-pulse \
	--enable-alsa \
	--enable-samplerate \
	--enable-soxr \
	--enable-spatialaudio \
	--enable-chromaprint \
	--enable-qt \
	--enable-ncurses \
	--enable-avahi \
	--enable-udev \
	--enable-lirc \
	--enable-mtp \
	--enable-libxml2 \
	--enable-libgcrypt \
	--enable-gnutls \
	--enable-taglib \
	--enable-secret \
	--disable-live555 \
	--disable-dc1394 \
	--disable-dv1394 \
	--disable-linsys \
	--disable-opencv \
	--disable-dsm \
	--disable-smb2 \
	--disable-decklink \
	--disable-libcddb \
	--disable-vnc \
	--disable-freerdp \
	--disable-realrtsp \
	--disable-asdcp \
	--disable-shout \
	--disable-sid \
	--disable-mpc \
	--disable-shine \
	--disable-omxil \
	--disable-crystalhd \
	--disable-gst-decode \
	--disable-postproc \
	--disable-aom \
	--disable-fdkaac \
	--disable-dca \
	--disable-tremor \
	--disable-daala \
	--disable-openapv \
	--disable-bpg \
	--disable-x262 \
	--disable-x26410b \
	--disable-vpl \
	--disable-fluidlite \
	--disable-zvbi \
	--disable-aribsub \
	--disable-aribb25 \
	--disable-kate \
	--disable-tiger \
	--disable-vdpau \
	--disable-sdl-image \
	--disable-aa \
	--disable-caca \
	--disable-mmal \
	--disable-evas \
	--disable-oss \
	--disable-sndio \
	--disable-jack \
	--disable-chromecast \
	--disable-skins2 \
	--enable-srt \
	--enable-librist \
	--disable-goom \
	--disable-projectm \
	--disable-vsxu \
	--disable-upnp \
	--disable-microdns \
	--disable-kwallet \
	--disable-notify \
	--disable-libplacebo
make
make -j1 DESTDIR=$PKG install

rm -f "$PKG/usr/lib/vlc/plugins/plugins.dat"

rm -rf "$PKG/usr/lib/mozilla" "$PKG/usr/share/kde4"

cat > "$PKG/usr/share/applications/vlc.desktop" <<'DESKTOP'
[Desktop Entry]
Type=Application
Name=VLC media player
GenericName=Media Player
Comment=Read, capture and stream multimedia, discs and devices
TryExec=vlc
Exec=vlc --started-from-file %U
Icon=vlc
Terminal=false
StartupNotify=true
StartupWMClass=vlc
X-KDE-Protocols=ftp,http,https,mms,rtmp,rtsp,sftp,smb
Categories=Qt;AudioVideo;Player;Recorder;Video;
Keywords=player;capture;dvd;audio;video;playlist;stream;vlc;
Actions=play-dvd;play-cd;

[Desktop Action play-dvd]
Name=Play a DVD
Exec=vlc dvd://

[Desktop Action play-cd]
Name=Play an audio CD
Exec=vlc cdda://
DESKTOP
chmod 644 "$PKG/usr/share/applications/vlc.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/vlc, 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 vlc-3.0.24-2.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/vlc, and runs the triggers its paths call for.

Contents

Installed programs: cvlc, nvlc, qvlc, rvlc, vlc, vlc-wrapper.

Installed libraries: libvlc.so, libvlccore.so.

Installed directories: /usr/include/vlc, /usr/lib/vlc, /usr/share/doc/vlc, /usr/share/licenses/vlc, /usr/share/vlc.

Short descriptions

vlc the VLC media player
vlc-wrapper a wrapper to drop privileges with VLC
libvlc.pc VLC media player external control library
vlc-plugin.pc VLC media player plugin interface

Notes

The install hook writes plugins.dat, a cache of each plugin’s size and modification time. Packaging resets every modification time, so the installed files would not match the cache, and the cache would differ between two builds; build.sh deletes it. kpkg writes it instead, once the files are in place, by running vlc-cache-gen whenever a package touches /usr/lib/vlc/plugins (see Shared indexes). Without the cache libvlc loads every plugin at start to learn what it does, the Qt 5 interface included, and Elisa, a Qt 6 program that links libvlc, crashes inside it.

The browser-plugin directory /usr/lib/mozilla and the KDE 4 service menus in /usr/share/kde4 name programs KDOS does not have, and are removed.

build.sh replaces upstream’s desktop entry. The Qt interface sets the window class vlc, which StartupWMClass names. The entry has no MimeType line: other players’ entries claim the audio and video types, and the default for each type is chosen in the desktop’s mimeapps table, /usr/share/kdos/xdg/kde-mimeapps.list. Every video row of that table, and the WebM-audio and AC-3 rows, names vlc.desktop behind Haruna’s entry, and those rows are the only place VLC is offered for a type. The installation medium carries both players, VLC because elisa plays through libvlc; a video opens in Haruna, and in VLC once Haruna is removed. The icons are upstream’s, from make install.

The Qt interface asks a privacy question on its first start, in a dialog in front of the first file played, unless qt-privacy-ask is 0. /etc/skel/.config/vlc/vlcrc sets it to 0 for every new account, with metadata-network-access=0, the answer the dialog leaves unticked: VLC fetches no album art or track details from the network. VLC reads the file from $XDG_CONFIG_HOME/vlc/vlcrc, skipping every line that starts with # or [, and rewrites it whole when its preferences are saved.