Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
19 commits
Select commit Hold shift + click to select a range
e6957ce
Add the MXL demuxer/muxer patch to the FFmpeg 8.x series
matiaspl Sep 9, 2026
466e56b
Add MXL round-trip demo
matiaspl Sep 9, 2026
66fffc8
Fold the MXL Dockerfile into the shared mixer image
matiaspl Sep 9, 2026
8f4e7cd
Bump MXL SDK from v1.1.0-beta-1 to v1.1.0
matiaspl Sep 13, 2026
22b07a4
Warn on input options not consumed by libavformat
matiaspl Sep 14, 2026
e8f65ee
Read MXL flows straight onto the GPU, zero-copy
matiaspl Sep 17, 2026
f04fcac
demos/mxl: pace the writer, survive a kill, verify on real hardware
matiaspl Sep 17, 2026
3ebd242
docs: tighten the MXL demo and patch-series notes
matiaspl Sep 17, 2026
131a9f8
MXL on develop: patch 0010, pyplumber.mixer import, README merge left…
jpietek Sep 18, 2026
75f7859
demos/mxl: measure throughput, and document the reset assert
matiaspl Sep 20, 2026
9208b54
deps/ffmpeg: keep MXL pts monotonic across a reset_on_drop reset
matiaspl Sep 20, 2026
c7af92d
demos/mxl: re-measure throughput on an idle host, drop the abort caveat
matiaspl Sep 20, 2026
b52a8f3
rescale_video: apply the flags parameter, pass matching frames through
matiaspl Sep 21, 2026
4f428b9
demos/mxl: per-node CPU accounting, and reader tails that skip the en…
matiaspl Sep 21, 2026
4896108
demos/mxl: scale and convert on the GPU, and price the PCIe round trip
matiaspl Sep 21, 2026
6ab5df9
hwaccel: pack CUDA 10-bit 4:2:2 frames straight into v210
matiaspl Sep 21, 2026
2facce6
demos/mxl: pack on the GPU, and find MXL's copy at the bottom
matiaspl Sep 21, 2026
2927271
deps/ffmpeg: regenerate the MXL patch as 0011, re-verify both bases
matiaspl Sep 21, 2026
42c215f
demos/mxl: keep the measurement scripts that produced the tables
matiaspl Sep 21, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -164,6 +164,8 @@ endif
ifeq ($(HAVE_CUDA)$(HAVE_NVCC),11)
NODES_SRC += $(SRCDIR)/nodes/hwaccel/v210_to_cuda.cpp
$(eval $(call ptx_kernel,$(SRCDIR)/nodes/hwaccel/v210_unpack.cu,avpl_v210_unpack_ptx,objs/src/nodes/hwaccel/v210_to_cuda.o))
NODES_SRC += $(SRCDIR)/nodes/hwaccel/cuda_to_v210.cpp
$(eval $(call ptx_kernel,$(SRCDIR)/nodes/hwaccel/v210_pack.cu,avpl_v210_pack_ptx,objs/src/nodes/hwaccel/cuda_to_v210.o))
override CXXFLAGS += -DHAVE_CUDA_RECT_SCALE=1
$(eval $(call ptx_kernel,$(SRCDIR)/nodes/hwaccel/cuda_rect_scale.cu,avpl_rect_scale_ptx,objs/src/nodes/hwaccel/cuda_rect_draw.o))
NODES_SRC += $(SRCDIR)/nodes/scene_cut/luma_diff.cpp
Expand Down
3 changes: 3 additions & 0 deletions demos/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -89,4 +89,7 @@ docker compose --env-file demos/dmabuf-browser/.env.example \
a bundled animated page, Electron, GPU capture, Janus, and browser preview.
- [CUDA overlay validation](cuda-overlay/README.md#run): run
`./demos/cuda-overlay/run.sh` to build, generate fixtures, and compare results.
- [MXL round-trip](mxl/README.md): publish into and read back from an MXL
shared-memory domain. Linux-only, uses the shared mixer image
(`avplumber-mixer:local`). GPU optional.

78 changes: 75 additions & 3 deletions demos/mixer/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,38 +4,97 @@ ARG DEBIAN_FRONTEND=noninteractive
ARG AVPLUMBER_REVISION=workspace
ARG FFMPEG_TAG=n8.1
ARG NV_CODEC_HEADERS_TAG=n13.0.19.0
ARG MXL_TAG=v1.1.0

# gcc-13 is required by the MXL SDK (C++20 features + newer libstdc++).
# Ubuntu 22.04 defaults to gcc-11, so pull gcc-13 from the ubuntu
# toolchain PPA and keep it alongside; FFmpeg and avplumber continue
# to use gcc-11.
RUN apt-get update \
&& apt-get install -y --no-install-recommends \
software-properties-common \
&& add-apt-repository -y ppa:ubuntu-toolchain-r/test \
&& apt-get update \
&& apt-get install -y --no-install-recommends \
autoconf \
automake \
bison \
build-essential \
ca-certificates \
cmake \
curl \
flex \
g++-13 \
gcc-13 \
git \
libboost-all-dev \
libcurl4-openssl-dev \
libgnutls28-dev \
libgstreamer1.0-dev \
libgstreamer-plugins-base1.0-dev \
libpcap-dev \
libssl-dev \
libtool \
libx11-dev \
make \
nasm \
ninja-build \
pkg-config \
python3 \
python3-dev \
python3-numpy \
python3-pil \
python3-pip \
tar \
unzip \
xxd \
zip \
zlib1g-dev \
&& rm -rf /var/lib/apt/lists/*

# Ubuntu 22.04 ships cmake 3.22 but the MXL SDK requires >= 3.24.
# Upgrade via pip so a modern cmake is on PATH before FFmpeg configure.
RUN python3 -m pip install --no-cache-dir --upgrade 'cmake>=3.28'

RUN git clone --quiet --branch "${NV_CODEC_HEADERS_TAG}" --depth 1 \
https://github.com/FFmpeg/nv-codec-headers.git /tmp/nv-codec-headers \
&& make -C /tmp/nv-codec-headers install PREFIX=/usr/local \
&& rm -rf /tmp/nv-codec-headers

# --- Rust (MXL's ada-url dep pulled through vcpkg needs a rustc) --------
ENV RUSTUP_HOME=/opt/rustup CARGO_HOME=/opt/cargo
ENV PATH=/opt/cargo/bin:$PATH
RUN curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs \
| sh -s -- -y --default-toolchain 1.88.0 --profile minimal \
&& rustc --version

# --- vcpkg (used by the MXL SDK's CMake toolchain) ----------------------
ENV VCPKG_ROOT=/opt/vcpkg
ENV VCPKG_FORCE_SYSTEM_BINARIES=1
RUN git clone --quiet https://github.com/microsoft/vcpkg.git "$VCPKG_ROOT" \
&& "$VCPKG_ROOT/bootstrap-vcpkg.sh" -disableMetrics

# --- MXL SDK ------------------------------------------------------------
# Built with gcc-13 (required by the SDK). FFmpeg + avplumber below keep
# using the distro gcc-11 that the CUDA composition suite is validated
# with. libmxl statically links spdlog, so its pkg-config file is
# scrubbed of the private Requires before FFmpeg configure looks at it.
RUN git clone --quiet --branch "${MXL_TAG}" --depth 1 \
https://github.com/dmf-mxl/mxl.git /tmp/mxl \
&& CC=/usr/bin/gcc-13 CXX=/usr/bin/g++-13 \
cmake -S /tmp/mxl -B /tmp/mxl/build -G Ninja \
-DCMAKE_BUILD_TYPE=Release \
-DCMAKE_INSTALL_PREFIX=/usr/local \
-DCMAKE_TOOLCHAIN_FILE="$VCPKG_ROOT/scripts/buildsystems/vcpkg.cmake" \
-DVCPKG_MANIFEST_MODE=ON \
-DBUILD_DOCS=OFF \
-DBUILD_TESTS=OFF \
&& cmake --build /tmp/mxl/build --parallel "$(nproc)" \
&& cmake --install /tmp/mxl/build \
&& ldconfig \
&& sed -i '/^Requires.private: spdlog$/d' /usr/local/lib/pkgconfig/libmxl.pc \
&& rm -rf /tmp/mxl

COPY deps/ffmpeg /build/deps/ffmpeg

RUN git clone --quiet --branch "${FFMPEG_TAG}" --depth 1 \
Expand All @@ -45,7 +104,8 @@ RUN git clone --quiet --branch "${FFMPEG_TAG}" --depth 1 \
&& bash /build/deps/ffmpeg/apply.sh /tmp/ffmpeg

RUN cd /tmp/ffmpeg \
&& ./configure \
&& PKG_CONFIG_PATH=/usr/local/lib/pkgconfig \
./configure \
--prefix=/usr/local \
--libdir=/usr/local/lib \
--incdir=/usr/local/include \
Expand All @@ -61,6 +121,10 @@ RUN cd /tmp/ffmpeg \
--enable-nvdec \
--enable-nvenc \
--disable-libnpp \
--enable-libmxl \
--enable-demuxer=mxl \
--enable-muxer=mxl \
--enable-protocol=mxl \
--disable-doc \
--disable-htmlpages \
--disable-manpages \
Expand All @@ -78,7 +142,11 @@ RUN cd /tmp/ffmpeg \

RUN /usr/local/bin/ffmpeg -hide_banner -filters | grep -q ' overlay_many_cuda ' \
&& /usr/local/bin/ffmpeg -hide_banner -h filter=transition_cuda \
| awk '$1 == "mode" && $3 ~ /T/ { found = 1 } END { exit !found }'
| awk '$1 == "mode" && $3 ~ /T/ { found = 1 } END { exit !found }' \
&& /usr/local/bin/ffmpeg -hide_banner -demuxers 2>/dev/null \
| awk '$1 ~ /D/ && $2 == "mxl" { found = 1 } END { exit !found }' \
&& /usr/local/bin/ffmpeg -hide_banner -muxers 2>/dev/null \
| awk '$1 ~ /E/ && $2 == "mxl" { found = 1 } END { exit !found }'

WORKDIR /build

Expand Down Expand Up @@ -117,8 +185,12 @@ RUN test -f /build/_avplumber"$(python3-config --extension-suffix)" \
python3 -c 'import pyplumber'

COPY demos/mixer /build/demos/mixer
COPY demos/mxl /build/demos/mxl

RUN python3 -m pip install --no-cache-dir -r /build/demos/mixer/requirements.txt
RUN python3 -m pip install --no-cache-dir -r /build/demos/mixer/requirements.txt \
&& if [ -s /build/demos/mxl/requirements.txt ]; then \
python3 -m pip install --no-cache-dir -r /build/demos/mxl/requirements.txt; \
fi

ENV LD_LIBRARY_PATH=/usr/local/lib:/usr/local/cuda/lib64
ENV AVPLUMBER_REVISION=${AVPLUMBER_REVISION}
Expand Down
Loading
Loading