ViCast is a high-performance C++ broadcast gateway for real-time video routing between NDI® network video, GPU desktop capture, and SDI broadcast hardware.
Designed for 24/7 production environments, ViCast delivers ultra-low latency video processing using SIMD-accelerated pipelines, lock-free frame pools, and multithreaded architecture.
It automatically manages signal routing, failover, synchronization, and broadcast output, making it ideal for studio automation, live production, and IP video infrastructure.
- 🧠 Architecture Overview
- ⚡ Core Features
- 🔄 Input Failover Logic
- 🔄 Video Routing Pipeline
- 📊 Output Capability Matrix
- ⚙️ Supported Pixel Formats
- ⏱ Timing & Synchronization
- 🚀 Performance Design
- 🧩 Internal Processing Pipeline
- 📡 Broadcast Integration
- 💻 System Requirements
- ⚙️ Configuration
- Key Parameters
- 📺 Supported DeckLink Video Modes
- 🛠️ Building the Project
- 📄 License
- 🙏 Acknowledgements
- 🎬 Master Signal & Failover Diagram
- GPU Desktop Capture (DXGI duplication)
- NDI Primary / Backup
- libyuv scaling
- Fill / Key generation
- Frame pool (zero allocation)
- NDI Fill
- NDI Key
- NDI Embedded
- DeckLink SDI (V210 10-bit)
- DeckLink Genlock (if present)
- Software frame pacing fallback
-
Intelligent Input Routing
Prioritizes local GPU Desktop Duplication. If unavailable, switches to NDI sources automatically. -
Automatic NDI Failover
Monitors Primary NDI source. If signal drops beyond a configurable threshold, switches to Backup seamlessly. -
Zero-Overhead Desktop Capture
Uses DXGI API for 60fps capture with minimal CPU overhead and direct GPU memory access. -
Multi-Channel NDI Output
Simultaneously broadcasts Fill, Key (Alpha), and Embedded RGBA streams. -
DeckLink SDI Integration
Professional 10-bit V210 output with optional hardware Genlock / Reference lock. -
Thread-Safe Telemetry
Real-time console dashboard for routing, FPS, dropped frames, clock drift, and system health.
Priority Order:
- GPU Desktop Capture
- NDI Primary
- NDI Backup
The engine dynamically switches between Desktop Capture, NDI Primary, and NDI Backup sources.
Failover engages automatically when frames are dropped beyond flapThreshold.
Priority Table:
| Priority | Source |
|---|---|
| 1 | GPU Desktop Capture |
| 2 | NDI Primary |
| 3 | NDI Backup |
| Feature | NDI Fill | NDI Key | NDI Embedded | SDI (DeckLink) |
|---|---|---|---|---|
| Color | ✓ | ✗ | ✓ | ✓ |
| Alpha | ✗ | ✓ | ✓ | Optional |
| 10-bit | ✓ | ✓ | ✓ | ✓ |
| Hardware Sync | Network | Network | Network | ✓ |
| Broadcast Switcher Compatible | ✓ | ✓ | ✓ | ✓ |
| Format | Bit Depth | Usage |
|---|---|---|
| RGBA | 8-bit | GPU capture |
| UYVY | 8-bit | NDI pipeline |
| V210 | 10-bit | SDI output |
| YUV 4:2:2 | 10-bit | DeckLink hardware |
- Locks output to external reference if present (Blackburst, Tri-Level, or House Ref).
- Ensures frame-accurate sync across devices.
- High-precision software timer if no Genlock detected.
- Maintains stable frame pacing for NDI and single-device SDI pipelines.
- SIMD acceleration via libyuv
- Lock-free frame pools
- Zero dynamic allocation in hot paths
- Multithreaded pipeline
- GPU-assisted capture
Typical Latency:
| Pipeline | Latency |
|---|---|
| Desktop → NDI | ~1 frame |
| NDI → SDI | ~1–2 frames |
| Desktop → SDI | ~1 frame |
INPUT
- GPU Desktop Capture (DXGI)
- NDI Primary / Backup
PROCESS
- Frame pool (zero allocation)
- libyuv scaling & color conversion
- Fill / Key generation
OUTPUT
- NDI Fill
- NDI Key
- NDI Embedded
- DeckLink SDI (V210)
| System | Compatibility |
|---|---|
| NDI Production workflows | ✓ |
| SDI Switchers | ✓ |
| Graphics Engines | ✓ |
| IP Video Infrastructure | ✓ |
| Studio Automation | ✓ |
Operating System
- Windows 10 / 11 (64-bit)
Hardware (Optional)
- Blackmagic DeckLink card for SDI output
Dependencies
| Dependency | Purpose |
|---|---|
| NDI® SDK | Network video transport |
| Blackmagic Desktop Video | DeckLink drivers |
| Visual Studio 2022 (MSVC v143) | Build toolchain |
| libyuv | SIMD video processing |
- Controlled via
config.jsoninAppData/Local/ViCastor executable folder. - Blank = Disabled design, e.g.,
"ndiOutputEmbedded": ""disables the sender.
Example config.json
{
"enableDesktopCapture": true,
"enableNdiInput": true,
"ndiInputPrimary": "STUDIO-PC (Mix 1)",
"ndiInputBackup": "STUDIO-PC (Mix 2)",
"flapThreshold": 5,
"ndiOutputFill": "ViCast Fill",
"ndiOutputKey": "ViCast Key",
"ndiOutputEmbedded": "ViCast NDI",
"outputWidth": 1920,
"outputHeight": 1080,
"outputFpsN": 25,
"outputFpsD": 1,
"forceProgressive": true,
"forceInterlaced": false,
"ndiHighestQuality": true,
"clockVideo": true,
"clockAudio": true,
"pixelFormat": "v210",
"enableDeckLink": false,
"decklinkDevices": [
{
"name": "DeckLink 8K Pro",
"outputMode": "1080p25",
"keyOutput": true
}
],
"verboseLogging": true
}- outputFpsN / outputFpsD: frame rate fraction (e.g., 60000/1000 = 60fps)
- enableDesktopCapture: overrides NDI inputs if true
- flapThreshold: consecutive dropped frames before failover
- enableDeckLink: enables SDI output (V210 10-bit)
git clone https://github.com/vivek-kr-git/ViCastInstall the following:
- NDI SDK
- DeckLink SDK
- libyuv
Add them to Visual Studio:
- Project Properties → Include Directories
- Project Properties → Linker Dependencies
- Configuration: Release
- Platform: x64
ViCast is optimized for real-time broadcast workloads.
Key techniques include:
- Lock-free frame pools
- SIMD processing
- Zero dynamic allocation in hot paths
- Multithreaded pipeline
- Hardware synchronization
Typical latency: ~1–2 frames (depending on hardware and pipeline configuration)
ViCast is licensed under the Apache License 2.0. See LICENSE for details.
- NDI® by Vizrt
- DeckLink SDK by Blackmagic Design
- libyuv by Google
See THIRDPARTY.md for full copyright and licensing information.
If you like ViCast-NIP and want to support development, you can buy me a coffee:
Example of ViCast in action – desktop capture routed to NDI and SDI output.
| Resolution | Frame Rate | Scan Type | DeckLink Mode |
|---|---|---|---|
| 720×486 | 29.97 | Interlaced | bmdModeNTSC |
| 720×486 | 23.98 | Progressive | bmdModeNTSC2398 |
| 720×486 | 29.97 | Progressive | bmdModeNTSCp |
| 720×576 | 25 | Interlaced | bmdModePAL |
| 720×576 | 25 | Progressive | bmdModePALp |
| Resolution | Frame Rate | Scan Type | DeckLink Mode |
|---|---|---|---|
| 1280×720 | 50 | Progressive | bmdModeHD720p50 |
| 1280×720 | 59.94 | Progressive | bmdModeHD720p5994 |
| 1280×720 | 60 | Progressive | bmdModeHD720p60 |
| Resolution | Frame Rate | Scan Type | DeckLink Mode |
|---|---|---|---|
| 1920×1080 | 25 | Interlaced | bmdModeHD1080i50 |
| 1920×1080 | 59.94 | Interlaced | bmdModeHD1080i5994 |
| 1920×1080 | 60 | Interlaced | bmdModeHD1080i6000 |
| Resolution | Frame Rate | Scan Type | DeckLink Mode |
|---|---|---|---|
| 1920×1080 | 23.98 | Progressive | bmdModeHD1080p2398 |
| 1920×1080 | 24 | Progressive | bmdModeHD1080p24 |
| 1920×1080 | 25 | Progressive | bmdModeHD1080p25 |
| 1920×1080 | 29.97 | Progressive | bmdModeHD1080p2997 |
| 1920×1080 | 30 | Progressive | bmdModeHD1080p30 |
| 1920×1080 | 50 | Progressive | bmdModeHD1080p50 |
| 1920×1080 | 59.94 | Progressive | bmdModeHD1080p5994 |
| 1920×1080 | 60 | Progressive | bmdModeHD1080p6000 |
| Resolution | Frame Rate | Scan Type | DeckLink Mode |
|---|---|---|---|
| 2048×1556 | 23.98 | Progressive | bmdMode2k2398 |
| 2048×1556 | 24 | Progressive | bmdMode2k24 |
| 2048×1556 | 25 | Progressive | bmdMode2k25 |
| Resolution | Frame Rate | Scan Type | DeckLink Mode |
|---|---|---|---|
| 2048×1080 | 23.98 | Progressive | bmdMode2kDCI2398 |
| 2048×1080 | 24 | Progressive | bmdMode2kDCI24 |
| 2048×1080 | 25 | Progressive | bmdMode2kDCI25 |
| 2048×1080 | 29.97 | Progressive | bmdMode2kDCI2997 |
| 2048×1080 | 30 | Progressive | bmdMode2kDCI30 |
| 2048×1080 | 50 | Progressive | bmdMode2kDCI50 |
| 2048×1080 | 59.94 | Progressive | bmdMode2kDCI5994 |
| 2048×1080 | 60 | Progressive | bmdMode2kDCI60 |
| Resolution | Frame Rate | Scan Type | DeckLink Mode |
|---|---|---|---|
| 3840×2160 | 23.98 | Progressive | bmdMode4K2160p2398 |
| 3840×2160 | 24 | Progressive | bmdMode4K2160p24 |
| 3840×2160 | 25 | Progressive | bmdMode4K2160p25 |
| 3840×2160 | 29.97 | Progressive | bmdMode4K2160p2997 |
| 3840×2160 | 30 | Progressive | bmdMode4K2160p30 |
| 3840×2160 | 50 | Progressive | bmdMode4K2160p50 |
| 3840×2160 | 59.94 | Progressive | bmdMode4K2160p5994 |
| 3840×2160 | 60 | Progressive | bmdMode4K2160p60 |
| Resolution | Frame Rate | Scan Type | DeckLink Mode |
|---|---|---|---|
| 4096×2160 | 23.98 | Progressive | bmdMode4kDCI2398 |
| 4096×2160 | 24 | Progressive | bmdMode4kDCI24 |
| 4096×2160 | 25 | Progressive | bmdMode4kDCI25 |
| 4096×2160 | 29.97 | Progressive | bmdMode4kDCI2997 |
| 4096×2160 | 30 | Progressive | bmdMode4kDCI30 |
| 4096×2160 | 50 | Progressive | bmdMode4kDCI50 |
| 4096×2160 | 59.94 | Progressive | bmdMode4kDCI5994 |
| 4096×2160 | 60 | Progressive | bmdMode4kDCI60 |
| Resolution | Frame Rate | Scan Type | DeckLink Mode |
|---|---|---|---|
| 7680×4320 | 23.98 | Progressive | bmdMode8K4320p2398 |
| 7680×4320 | 24 | Progressive | bmdMode8K4320p24 |
| 7680×4320 | 25 | Progressive | bmdMode8K4320p25 |
| 7680×4320 | 29.97 | Progressive | bmdMode8K4320p2997 |
| 7680×4320 | 30 | Progressive | bmdMode8K4320p30 |
| 7680×4320 | 50 | Progressive | bmdMode8K4320p50 |
| 7680×4320 | 59.94 | Progressive | bmdMode8K4320p5994 |
| 7680×4320 | 60 | Progressive | bmdMode8K4320p60 |
| Resolution | Frame Rate | Scan Type | DeckLink Mode |
|---|---|---|---|
| 8192×4320 | 23.98 | Progressive | bmdMode8kDCI2398 |
| 8192×4320 | 24 | Progressive | bmdMode8kDCI24 |
| 8192×4320 | 25 | Progressive | bmdMode8kDCI25 |
| 8192×4320 | 29.97 | Progressive | bmdMode8kDCI2997 |
| 8192×4320 | 30 | Progressive | bmdMode8kDCI30 |
| 8192×4320 | 50 | Progressive | bmdMode8kDCI50 |
| 8192×4320 | 59.94 | Progressive | bmdMode8kDCI5994 |
| 8192×4320 | 60 | Progressive | bmdMode8kDCI60 |