LostSideDead

ACMX2

GPU-Accelerated Real-Time Video Effects Engine

Version 2.4.0 | NVIDIA CUDA Powered

Overview

ACMX2 is a high-performance, GPU-accelerated video processing application that applies real-time OpenGL shader effects to webcam feeds, video files, or graphics files. Built on the libmx2 (MX2 Engine) and leveraging NVIDIA CUDA, ACMX2 delivers fluid, psychedelic visual transformations at 60+ FPS even at 4K resolution.

🎥

Multiple Input Sources

Process live webcam feeds, video files, or static graphics with real-time effects.

🎨

OpenGL Shaders

Apply custom GLSL fragment shaders with a built-in syntax-highlighted code editor.

GPU Acceleration

Harness NVIDIA CUDA for blazing-fast filter processing and real-time performance.

🔊

Audio Reactivity

Sync visual effects to audio input for dynamic, music-responsive visuals.

📹

Video Recording

Record processed output directly to video files with configurable quality settings.

🔄

Multi-Pass Rendering

Chain multiple shaders together for complex, layered visual effects.

NVIDIA GPU Required: ACMX2 requires an NVIDIA GPU with CUDA support. It will not run on AMD or Intel integrated graphics.

Getting Started

System Requirements

Installation via Podman (Build from Source)

Navigate to the Podman directory

cd podman

Build the container image

podman build -t acmx2-arch -f Containerfile.arch .

Launch ACMX2

chmod +x run-acmx2-arch.sh
./run-acmx2-arch.sh

This script enables GPU acceleration and passes through camera and audio devices automatically.

First-Time Setup

When you first launch ACMX2, you'll need to configure the shader library path:

  1. Go to File Properties
  2. Set the path to your ACMX2 executable
  3. Set the path to your Shader Library folder (must contain an index.txt file)
  4. Click OK to save your settings
Shader Packs Available: Download additional shader and model packs from https://lostsidedead.biz/packs/

Input Sources

ACMX2 supports three types of input sources. Configure your input via Session Session Properties.

🎥 Webcam Input

Use a live webcam feed as your video source for real-time effects.

ACMX2 automatically detects available webcams. If your camera isn't listed, ensure it's properly connected and recognized by your system.

📁 Video File Input

Process an existing video file with shader effects.

🖼️ Graphics File Input

Use a static image as your input source, perfect for creating animated loops from still images.

Output Resolution

Set the output resolution independently of your input source. The input will be scaled to match the output resolution.

Setting Description
Screen Resolution The output window/render resolution (e.g., 1920x1080)
Fullscreen Enable to run in fullscreen mode

CUDA Device Selection

If you have multiple NVIDIA GPUs, select which device to use for GPU-accelerated processing from the CUDA Device dropdown.

Working with Shaders

Shaders are GLSL (OpenGL Shading Language) programs that define how each pixel is transformed. ACMX2 uses fragment shaders to create its visual effects.

Shader Libraries

Shaders are organized into libraries. A library is a folder containing:

Creating a New Shader Library

  1. Go to List New Shader Library
  2. Choose a location and name for your new library folder
  3. The library will be created with an empty index.txt

Managing Shaders in the List

The main window displays your loaded shaders in a list. Use the List menu to manage them:

Menu Option Function
New Shader GLSL File Create a new empty shader file and add it to the library
Remove Shader Remove the selected shader from the library index
Shift Shader Up Move the selected shader up in the list order
Shift Shader Down Move the selected shader down in the list order
Shuffle Shaders Randomize the order of all shaders
Sort Shaders Sort shaders alphabetically
Search Shaders (Ctrl+F) Search for a shader by name
Find Next (F3) Find the next matching shader

Running Shaders

Shader Cache

ACMX2 can cache compiled shaders for faster startup times:

Shader Code Editor

ACMX2 includes a built-in code editor with GLSL syntax highlighting for editing shader files. Double-click any shader in the list to open it in the editor.

Editor Features

Syntax Highlighting

GLSL keywords, types, functions, and comments are color-coded for easy reading.

Find & Replace

Search for text and replace occurrences throughout your shader code.

Go to Line

Jump directly to a specific line number in your shader.

Adjustable Font Size

Increase, decrease, or reset the editor font size for comfortable viewing.

Editor Controls

Action Menu Path / Shortcut
Save Shader File → Save
Save As File → Save As
Find Text Edit → Find
Find Next Edit → Find Next
Replace Text Edit → Replace
Go to Line Edit → Go to Line
Increase Font View → Increase Font Size
Decrease Font View → Decrease Font Size
Reset Font View → Reset Font Size

Writing GLSL Shaders

ACMX2 shaders receive several uniforms you can use in your effects:

uniform sampler2D samp;          // The input video texture
uniform vec2 iResolution;        // Output resolution
uniform float time_f;            // Time value for animations
uniform float amp;               // amplitude value (audio reactive)
uniform float uamp;              // amplitude value (audio reactive)
uniform vec3 iMouse;             // Mouse position
uniform int iFrame;              // Current frame number
Quick Tip: Use the time_f uniform to create animated effects. Toggle time animation with T during playback.

GPU Filters

In addition to OpenGL shaders, ACMX2 provides a library of GPU-accelerated filters powered by NVIDIA CUDA. These filters process frames directly on the GPU for maximum performance.

Accessing GPU Filter Settings

Go to Session GPU Filter Settings

Configuring GPU Filters

Enable GPU Filtering

Check the "Enable GPU Filtering" checkbox to activate GPU filter processing.

Set Frame Buffer Size

Configure the buffer size (4-32 frames). Larger buffers allow more complex temporal effects but use more GPU memory.

Select Filters

Use the search box to find filters, then click "Add →" to add them to your processing chain.

Arrange Filter Order

Use the ↑ Up and ↓ Down buttons to reorder filters. Filters are applied in the order shown.

GPU Filter Controls

Button Function
Add → Add the selected filter to the processing chain
← Remove Remove the highlighted filter from the chain
↑ Up Move the selected filter up in processing order
↓ Down Move the selected filter down in processing order
Clear All Remove all filters from the chain
Processing Order: GPU filters are applied before OpenGL shaders. The output of GPU filters becomes the input for shader processing.

Multi-Pass Shader Rendering

Multi-pass rendering allows you to chain multiple shaders together, with each shader processing the output of the previous one. This enables complex, layered effects.

Accessing Multi-Pass Settings

Go to Playback Multi-Pass Shader Settings...

Setting Up Multi-Pass Rendering

  1. Check "Enable Multi-Pass Shader Processing"
  2. Search for shaders using the search box
  3. Add shaders to the pass chain using "Add →"
  4. Arrange the order using ↑ Up and ↓ Down
  5. Click OK to apply

How It Works

In multi-pass mode:

Creative Tip: Combine color grading shaders, distortion effects, and post-processing shaders for complex visual styles!

Audio Reactivity

ACMX2 can analyze audio input and feed that data into your shaders, creating visuals that respond to sound in real-time.

Accessing Audio Settings

Go to Session Audio Settings

Audio Options

Setting Description
Enable Audio Reactivity Activate audio analysis and pass data to shaders via the amp/uamp uniform
Enable Audio Pass Through Play the captured audio through your output device
Number of Channels Audio capture channels (1-32, default: 2 for stereo)
Sensitivity How responsive the visuals are to audio levels (0.1 - 20.0)
Input Device Select the audio input device (microphone)
Output Device Select the audio output device for pass-through

Using Audio in Shaders

When audio reactivity is enabled, the amp/uamp uniforms receive a value based on the audio level. Use it in your shaders like this:

// Example: Scale effect based on audio
vec2 uv = fragCoord / iResolution.xy;
float audioScale = 1.0 + (amp * uamp) * 0.5;  // Scale based on audio
uv = (uv - 0.5) * audioScale + 0.5;
vec4 color = texture(samp, uv);
fragColor = color;

Reactive Time Mode

Press Q during playback to toggle Reactive Time mode. In this mode, the time_f uniform advances based on audio intensity rather than wall-clock time.

Recording Output

ACMX2 can record your processed video output to a file using FFmpeg encoding.

Setting Up Recording

  1. In Session Session Properties
  2. Check "Save Output to Video File"
  3. Click Browse to choose the output filename and location
  4. Set the CRF (Constant Rate Factor) for quality (0-51, lower = higher quality)

Quality Settings

CRF Value Quality File Size
0-17 Visually lossless Very large
18-23 High quality (default: 23) Medium
24-28 Good quality Smaller
29-51 Lower quality Smallest

Copy Audio Track

When using a video file as input, enable "Copy Audio Track" to include the original audio in your output file.

Taking Snapshots

During playback, press Z to save a PNG snapshot of the current frame. Snapshots are saved to the prefix path configured in the properties.

Keyboard Controls

During playback, use these keyboard shortcuts to control ACMX2:

Key Action
Up Arrow Switch to the previous shader in the library
Down Arrow Switch to the next shader in the library
W A S D Look around in 3D mode (when enabled)
Z Save a snapshot (PNG) of the current frame
T Toggle time-based animation on/off
I Step forward in time (when animation is paused)
O Step backward in time (when animation is paused)
F Toggle fullscreen mode
Q Toggle Reactive Time (audio-driven time, if audio enabled)
Esc Quit the application / Exit fullscreen

Interface Shortcuts

Shortcut Action
F5 Run the selected shader
Ctrl+E Run all shaders (library mode)
Ctrl+F Search for a shader
F3 Find next matching shader

Playback Controls

Repeat Mode

Enable Playback Repeat to loop video files continuously.

Stop Playback

Use Playback Stop or press Esc in the output window to stop the current session.

3D Mode

ACMX2 supports 3D model rendering. Enable 3D mode in Session Properties and select an .mxmod.z model file to render 3D content with your shaders.

Interface Customization

Custom Style Theme

Toggle the red/black theme via Session Use Custom Style. Uncheck to use your system's default Qt theme.

Log Output

The bottom panel displays log messages including:

Troubleshooting

NVIDIA Driver Not Detected

+

Verify your NVIDIA driver installation by running:

nvidia-smi

If this command fails, install or reinstall the NVIDIA proprietary drivers for your system.

No Cameras Found

+

Ensure your webcam is connected and recognized by the system. Check if /dev/video0 exists:

ls -la /dev/video*

If using Podman, ensure camera devices are passed through in the run script.

Shader Compilation Errors

+

Check the log output panel for compilation error messages. Common issues include:

  • Missing semicolons at end of statements
  • Undefined variables or functions
  • Incorrect uniform types

Use the built-in editor to fix syntax errors in your shader code.

Poor Performance / Low FPS

+
  • Reduce the output resolution
  • Reduce the GPU filter buffer size
  • Disable multi-pass rendering or use fewer passes
  • Ensure no other GPU-intensive applications are running

Building & Running the Podman Container (Arch Linux)

The repository includes podman/Containerfile.arch — an Arch Linux-based container that installs opencv-cuda from pacman so you don't have to compile OpenCV from source. A matching launch script podman/run-acmx2-arch.sh handles all the runtime configuration.

Prerequisites: Podman with NVIDIA Container Toolkit (CDI), ~20 GB free disk, 8+ GB RAM.

Step 1: Enter the podman directory

cd /path/to/acidcam-gpu/podman

Step 2: Build the image

Packages are split into separate cached layers so the build is resumable if interrupted:

podman build -t acmx2-arch -f Containerfile.arch .
Build time: 30–90 minutes depending on hardware and internet speed. CUDA and OpenCV packages are large. Compilation is capped at 4 parallel jobs to avoid OOM lockups. Clean up disk from failed attempts with:

podman system df
podman image prune --force

Step 3: CUDA architecture (optional)

The default is CMAKE_CUDA_ARCHITECTURES="75" (RTX 20xx / GTX 16xx). Edit Containerfile.arch before building if needed:

GPU GenerationArchitecture Value
GTX 16xx / RTX 20xx (Turing)75
RTX 30xx (Ampere)86
RTX 40xx (Ada Lovelace)89

Step 4: Verify the image built successfully

podman images | grep acmx2-arch

Step 5: Run with the launch script

Use run-acmx2-arch.sh from the podman/ directory:

chmod +x run-acmx2-arch.sh
./run-acmx2-arch.sh
The script automatically detects all /dev/video* webcam devices, mounts PulseAudio for audio, passes --device nvidia.com/gpu=all for GPU access, and mounts ~/container_share at /root/share inside the container for easy file exchange.