HAP Codec - GPU-Accelerated Playback
Convert videos to HAP format for smooth, GPU-accelerated multi-monitor playback.
What is HAP?
HAP is a video codec designed specifically for real-time playback. Unlike H.264 or H.265 which require CPU decoding, HAP uses GPU-native compression that your graphics card can decompress directly.
Key Characteristics
- DXT/BC texture compression - Same format used in video games
- Direct GPU upload - No CPU decoding step required
- Developed for live visuals - Created for VJ software and video walls
- Open source - Freely available, widely supported
HAP Format Variants
MultiMon supports all major HAP variants:
| Format | Compression | Quality | File Size | Best For |
|---|---|---|---|---|
| HAP | DXT1 (BC1) | Good | Smallest | RGB video without transparency |
| HAP Alpha | DXT5 (BC3) | Good | Medium | Videos with alpha channel |
| HAP Q | BC7 + YCoCg | Excellent | Largest | Highest quality requirements |
Choosing a Format
- HAP - Use for most content, best balance of quality and size
- HAP Alpha - Required when your video has transparency
- HAP Q - Use when quality is critical and storage is available
Benefits of HAP
Minimal CPU Usage
Traditional codecs like H.264 require significant CPU power to decode. With HAP:
- GPU handles all decompression
- CPU free for other tasks
- Consistent performance regardless of CPU speed
Smooth Multi-Monitor Playback
HAP excels at multi-monitor setups:
- Single decode even for video walls
- Parallel chunk decoding for large frames
- Frame-accurate timing
Lower Latency
- Compressed texture uploads directly to GPU
- No decode buffer delays
- Ideal for interactive applications
Consistent Timing
- Frame boundaries are explicit
- No variable decode times
- Most reliable format for synchronization
Converting to HAP
Requirements
MultiMon’s built-in converter requires FFmpeg installed on your system.
FFmpeg Installation
The converter automatically searches for FFmpeg in these locations:
- Bundled location -
{MultiMon folder}/ffmpeg/ffmpeg.exe - System PATH - Any folder in your PATH environment variable
- Common locations:
C:\ffmpeg\bin\C:\Program Files\ffmpeg\bin\%LOCALAPPDATA%\ffmpeg\bin\
Download FFmpeg from ffmpeg.org and place it in one of these locations.
Using the Converter
- Open MultiMon’s Convert to HAP dialog
- Select your source video file
- Choose HAP variant (HAP, HAP Alpha, or HAP Q)
- Select output location
- Click Convert
Manual FFmpeg Command
If you prefer command line, use:
# Standard HAP (best balance)
ffmpeg -i input.mp4 -c:v hap -format hap -chunks 4 output.mov
# HAP Alpha (with transparency)
ffmpeg -i input.mov -c:v hap -format hap_alpha -chunks 4 output.mov
# HAP Q (highest quality)
ffmpeg -i input.mp4 -c:v hap -format hap_q -chunks 4 output.mov
Conversion Options
| Option | Description | Recommended |
|---|---|---|
-format | HAP variant | hap_q for quality, hap for size |
-chunks | Parallel decode chunks | 4 (default) |
-threads | CPU threads for encoding | 0 (auto) |
-c:a copy | Keep original audio | Yes |
Using HAP Files
Loading HAP Videos
HAP files work like any other video:
- Drag and drop onto a monitor panel
- MultiMon automatically detects HAP format
- Uses the dedicated GPU-accelerated renderer
Automatic Detection
MultiMon identifies HAP files by:
- Checking file extension (.mov, .avi)
- Scanning file header for HAP codec signatures
- Routing to appropriate playback engine
Recommended Containers
| Container | Extension | Notes |
|---|---|---|
| QuickTime | .mov | Recommended, best compatibility |
| AVI | .avi | Alternative option |
File Size Considerations
HAP files are significantly larger than H.264/H.265. Plan your storage accordingly.
Approximate File Sizes (1080p @ 30fps)
| Format | Size per Second | 1 Minute | 1 Hour |
|---|---|---|---|
| H.264 | ~1-2 MB | 60-120 MB | 3.6-7.2 GB |
| HAP | ~6-8 MB | 360-480 MB | 21-28 GB |
| HAP Alpha | ~12-16 MB | 720-960 MB | 43-57 GB |
| HAP Q | ~12-16 MB | 720-960 MB | 43-57 GB |
Storage Recommendations
- SSD strongly recommended - HAP’s high bitrate benefits from fast storage
- NVMe preferred - For 4K or multi-video playback
- RAID for long content - Consider RAID 0 for extended video walls
When to Use HAP
Ideal Use Cases
- Video walls - Single decode, GPU-efficient
- 4K and higher resolution - CPU savings significant
- Looping content - Consistent frame timing
- Multi-monitor setups - Reliable synchronization
- Live events - Predictable performance
When H.264 May Suffice
- Single monitor playback
- Storage-constrained situations
- One-time presentations
- Preview/editing workflows
Performance Comparison
CPU Usage (4K playback)
| Codec | Typical CPU | Notes |
|---|---|---|
| H.264 | 30-60% | Varies by content |
| H.265 | 40-70% | More efficient but heavier decode |
| HAP | 5-15% | Mostly I/O, minimal decode |
| HAP Q | 5-15% | Same as HAP |
GPU Memory (per 1080p frame)
| Format | VRAM per Frame |
|---|---|
| HAP (DXT1) | ~0.5 MB |
| HAP Alpha (DXT5) | ~1 MB |
| HAP Q (BC7) | ~1 MB |
Troubleshooting
Video Won’t Play
- Verify FFmpeg detected HAP correctly during conversion
- Check file isn’t corrupted (try playing in VLC)
- Ensure GPU drivers are up to date
Stuttering Playback
- Move files to SSD
- Check disk isn’t at capacity
- Close other disk-intensive applications
Conversion Fails
- Verify FFmpeg is properly installed
- Check source video plays correctly
- Ensure sufficient disk space for output
Next Steps
- Set up a Video Wall using HAP files
- Configure Audio Routing for multi-channel setups
- Review Settings for hardware acceleration modes and performance options