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.
Getting Started
System Requirements
- Operating System: Linux (x86_64)
- Graphics: NVIDIA GPU with CUDA 12.x support
- Drivers: NVIDIA proprietary drivers installed
- Display: X11 or XWayland
- Optional: Webcam for camera input, microphone for audio reactivity
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:
- Go to
- Set the path to your ACMX2 executable
- Set the path to your Shader Library folder (must contain an
index.txtfile) - Click OK to save your settings
Input Sources
ACMX2 supports three types of input sources. Configure your input via .
🎥 Webcam Input
Use a live webcam feed as your video source for real-time effects.
- Select "Use Camera" radio button
- Camera Index: Choose from detected webcam devices
- Camera Resolution: Select your preferred capture resolution (e.g., 1280x720, 1920x1080)
- FPS: Set the capture frame rate (1-120 FPS)
📁 Video File Input
Process an existing video file with shader effects.
- Select "Use Video File as Input" radio button
- Click Browse to select your video file
- Supported formats include MP4, AVI, MKV, and other FFmpeg-compatible formats
- Texture Cache: Enable to cache frames for smoother playback (optional)
🖼️ Graphics File Input
Use a static image as your input source, perfect for creating animated loops from still images.
- Select "Use Graphics File as Input" radio button
- Click Browse to select your image file (PNG, JPG, etc.)
- The image will be animated using the selected shader effects
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:
index.txt- A text file listing all shader filenames (one per line)- Individual
.glslshader files
Creating a New Shader Library
- Go to
- Choose a location and name for your new library folder
- 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
- Run Selected (F5): Run the currently selected shader from the list
- Run All (Ctrl+E): Run the entire shader library, allowing you to cycle through them
Shader Cache
ACMX2 can cache compiled shaders for faster startup times:
- Rebuild Shader Cache: Recompile all shaders and update the cache
- Run from Cache: Toggle to use cached shaders (faster) or recompile each time
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
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
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 |
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
Setting Up Multi-Pass Rendering
- Check "Enable Multi-Pass Shader Processing"
- Search for shaders using the search box
- Add shaders to the pass chain using "Add →"
- Arrange the order using ↑ Up and ↓ Down
- Click OK to apply
How It Works
In multi-pass mode:
- Pass 1: First shader receives the original video frame
- Pass 2: Second shader receives the output of Pass 1
- Pass 3+: Each subsequent shader receives the previous pass's output
- Final Output: The last shader's output is displayed/recorded
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
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
- In
- Check "Save Output to Video File"
- Click Browse to choose the output filename and location
- 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 to loop video files continuously.
Stop Playback
Use 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 . Uncheck to use your system's default Qt theme.
Log Output
The bottom panel displays log messages including:
- Shader loading status
- Process output and errors
- System messages
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.
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 .
podman system dfpodman 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 Generation | Architecture 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
/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.