Building from Source

Clone the Repository

git clone https://github.com/Astute-Systems/MediaX.git
cd MediaX

Configure Build

Create a build directory and configure with CMake:

mkdir build && cd build
cmake ..

Build Options

Option Default Description
BUILD_TESTING OFF Build unit tests
EXAMPLES OFF Build example applications
GST_SUPPORTED ON Enable GStreamer encoders
BUILD_QT6 OFF Build Qt6 bindings
BUILD_CUDA OFF Enable CUDA acceleration
VAAPI OFF Enable Intel VAAPI acceleration
BUILD_RUST OFF Build Rust GStreamer plugins (AV1)

Example Configurations

Full build with all features:

cmake -DBUILD_TESTING=ON \
      -DEXAMPLES=ON \
      -DGST_SUPPORTED=ON \
      -DBUILD_QT6=ON \
      ..

Minimal build (no GStreamer):

cmake -DGST_SUPPORTED=OFF ..

With Intel hardware acceleration:

cmake -DGST_SUPPORTED=ON -DVAAPI=ON ..

Build

make -j$(nproc)

Run Tests

make test
# or
ctest --output-on-failure

Install

sudo make install

Uninstall

sudo make uninstall

Create Packages

Generate Debian packages for distribution:

cpack

This creates:

  • mediax_<version>_<arch>.deb - Runtime library
  • mediax-dev_<version>_<arch>.deb - Development headers
  • mediax-python_<version>_<arch>.deb - Python bindings

Cross-Compilation

ARM64 (Jetson/Raspberry Pi)

cmake -DCMAKE_TOOLCHAIN_FILE=../cmake/toolchain-aarch64.cmake ..

Troubleshooting

CMake cannot find GStreamer

sudo apt-get install libgstreamer1.0-dev libgstreamer-plugins-base1.0-dev

Qt6 not found

sudo apt-get install qt6-base-dev

CUDA not found

Set the CUDA toolkit path:

cmake -DCUDAToolkit_ROOT=/usr/local/cuda ..

Support

Build issues?