Last updated: 2026年1月
Video Capture SDK .NET vs Datastead TVideoGrabber
全面的 .NET 视频采集组件比较
为 .NET 应用程序选择合适的视频采集组件决定了项目的功能和长期成本。本指南详细比较了 VisioForge Video Capture SDK .NET(一个支持五个操作系统的现代双引擎采集平台)和 Datastead TVideoGrabber(一个成熟的基于 DirectShow 的 Windows 采集组件)。我们从架构、功能、多输出支持、流媒体、定价和实际代码等方面进行分析,帮助您做出明智的决定。
执行摘要
| 方面 | Video Capture SDK .NET | TVideoGrabber |
|---|---|---|
| 架构 | 双引擎:原生 DirectShow/Media Foundation + 内嵌 FFmpeg 管道 | 单引擎:基于属性的 DirectShow 组件 |
| 平台支持 | Windows、macOS、Linux、Android、iOS(5个平台) | 仅 Windows |
| 定价 | EUR 489 – EUR 6,999/年(包含所有功能) | EUR 695 基础 + EUR 950 NDI + EUR 950 编码器附加组件 = EUR 2,595+ 才能获得可比功能 |
| 最适合 | 具有流媒体、多输出和实时效果的跨平台采集应用 | 具有 OCR 需求的仅 Windows 单输出采集 |
| API 风格 | 异步优先的 .NET API,支持事件和 await 模式 | 基于属性的组件模型,使用同步调用 |
架构深入分析
Video Capture SDK .NET 架构
Video Capture SDK 采用双引擎设计。主引擎封装了 Windows 上的 DirectShow 和 Media Foundation,提供对操作系统公开的每个采集设备的原生访问。辅助内嵌 FFmpeg 管道处理高级编解码器操作、IP 摄像头接入和跨平台录制。两个引擎共享统一的 .NET API 接口,因此在它们之间切换不需要更改代码。
- ▶通过 DirectShow 和 Media Foundation 滤镜图实现原生 Windows 采集
- ▶内嵌 FFmpeg 提供编解码器灵活性,无需外部 CLI 依赖
- ▶通过 Direct3D / OpenGL 渲染器实现 GPU 加速预览
- ▶支持 .NET async/await 的事件驱动架构
- ▶单进程模型——无需子进程管理
- ▶跨平台支持:Windows、macOS、Linux、Android、iOS
TVideoGrabber 架构
TVideoGrabber 是 Datastead 开发的单引擎 DirectShow 组件。它通过基于属性的 API 公开采集设备属性和录制设置。配置通过在开始采集前设置组件属性来完成,遵循为 .NET 改编的传统 Delphi/VCL 组件模式。
- ▶DirectShow 滤镜图用于 Windows 上的设备访问和录制
- ▶基于属性的配置模型(设置属性后启动)
- ▶内置 ONVIF PTZ 摄像头控制支持
- ▶采集期间的 OCR 文字识别(独特功能)
- ▶NDI 和高级编码的可选附加模块
- ▶仅 Windows——不支持 macOS、Linux 或移动设备
关键架构差异
| 方面 | Video Capture SDK | TVideoGrabber |
|---|---|---|
| 引擎设计 | 双引擎(DirectShow/MF + FFmpeg) | 单引擎(仅 DirectShow) |
| 平台范围 | 5个操作系统,7个 UI 框架 | 仅 Windows,WinForms/WPF |
| API 模式 | Async/await、事件、托管对象 | 基于属性、同步调用 |
| 多输出 | 同时录制 + 推流 + 截图 | 一次只能一个输出 |
| 流媒体 | RTMP、RTSP、SRT、HLS、NDI 内置 | 不包含流媒体协议 |
| 附加组件模式 | 许可证包含所有功能 | 基础 + 付费附加组件(NDI EUR 950,编码器 EUR 950) |
逐项功能比较
采集源
| 功能 | Video Capture SDK | TVideoGrabber |
|---|---|---|
| USB 摄像头 | ✅ | ✅ |
| 笔记本内置摄像头 | ✅ | ✅ |
| 屏幕/桌面采集 | ✅ | ✅ |
| IP 摄像头(RTSP/ONVIF) | ✅ | ✅ |
| ONVIF PTZ 控制 | ✅ | ✅ |
| 采集卡(Blackmagic、Magewell) | ✅ | ⚠️(仅通过 DirectShow) |
| 电视调谐器(BDA/DVB) | ✅ | ⚠️(有限支持) |
| NDI 源 | ✅ | ⚠️(需要 EUR 950 附加组件) |
| 虚拟摄像头(OBS Virtual Cam) | ✅ | ✅ |
| DECKLINK 输入 | ✅ | ❌ |
录制
| 功能 | Video Capture SDK | TVideoGrabber |
|---|---|---|
| MP4(H.264 / H.265) | ✅ | ✅ |
| MKV 容器 | ✅ | ❌ |
| WebM(VP8 / VP9 / AV1) | ✅ | ❌ |
| AVI | ✅ | ✅ |
| WMV / ASF | ✅ | ✅ |
| MOV(ProRes) | ✅ | ❌ |
| MPEG-TS | ✅ | ⚠️(有限的容器支持) |
| 动画 GIF | ✅ | ❌ |
| 纯音频(MP3、AAC、WAV) | ✅ | ⚠️ |
| 按时间/大小分割文件 | ✅ | ❌ |
| 预事件录制(循环缓冲区) | ✅ | ❌ |
多输出
| 功能 | Video Capture SDK | TVideoGrabber |
|---|---|---|
| 同时录制 + 推流 | ✅ | ❌ |
| 多路录制输出 | ✅ | ❌ |
| 同时录制 + 截图 | ✅ | ⚠️(基本截图支持) |
| 每路输出不同分辨率 | ✅ | ❌ |
| 虚拟摄像头输出 | ✅ | ❌ |
| 时移/延迟播放 | ✅ | ❌ |
流媒体协议
| 功能 | Video Capture SDK | TVideoGrabber |
|---|---|---|
| RTMP 推流(YouTube、Twitch) | ✅ | ❌ |
| RTSP 服务器模式 | ✅ | ❌ |
| SRT(Caller / Listener) | ✅ | ❌ |
| HLS 分段生成 | ✅ | ❌ |
| NDI 输出 | ✅ | ❌ |
| UDP / TCP 单播/多播 | ✅ | ❌ |
视频处理
| 功能 | Video Capture SDK | TVideoGrabber |
|---|---|---|
| 实时缩放/裁剪 | ✅ | ✅ |
| 去隔行 | ✅ | ✅ |
| 颜色调整(亮度、对比度) | ✅ | ✅ |
| 文字叠加(时间戳、水印) | ✅ | ✅ |
| 图片叠加/Logo | ✅ | ✅ |
| GPU 加速视频特效 | ✅ | ❌ |
| 色度键(绿幕) | ✅ | ❌ |
| 画中画 | ✅ | ❌ |
音频
| 功能 | Video Capture SDK | TVideoGrabber |
|---|---|---|
| 音频设备采集 | ✅ | ✅ |
| 系统音频(回环)采集 | ✅ | ❌ |
| 音频混合(多输入) | ✅ | ❌ |
| 实时音量/增益控制 | ✅ | ⚠️ |
| 音频特效(回声、混响) | ✅ | ❌ |
| VU 表/电平监控 | ✅ | ⚠️ |
检测与分析
| 功能 | Video Capture SDK | TVideoGrabber |
|---|---|---|
| 运动检测 | ✅ | ✅ |
| 人脸检测 | ✅ | ❌ |
| 条形码/二维码读取 | ✅ | ❌ |
| OCR 文字识别 | ❌ | ✅ |
| 目标跟踪 | ✅ | ❌ |
| 音频电平检测 | ✅ | ⚠️ |
平台支持
操作系统兼容性
| 平台 | Video Capture SDK | TVideoGrabber |
|---|---|---|
| Windows x64 | ✅ | ✅ |
| Windows ARM64 | ✅ | ❌ |
| macOS(Apple Silicon + Intel) | ✅ | ❌ |
| Linux x64(Ubuntu、Debian、Fedora) | ✅ | ❌ |
| Linux ARM64(Raspberry Pi) | ✅ | ❌ |
| Android(通过 .NET MAUI) | ✅ | ❌ |
| iOS(通过 .NET MAUI) | ✅ | ❌ |
UI 框架兼容性
| 框架 | Video Capture SDK | TVideoGrabber |
|---|---|---|
| WinForms | ✅ | ✅ |
| WPF | ✅ | ✅ |
| .NET MAUI | ✅ | ❌ |
| Avalonia UI | ✅ | ❌ |
| Console / Service | ✅ | ❌ |
| ASP.NET Core(后台服务) | ✅ | ❌ |
| Blazor(服务器端处理) | ✅ | ❌ |
价格比较
Video Capture SDK .NET 定价
1名开发者,非商业用途
1名开发者,商业用途,包含所有功能
最多3名开发者,商业用途,1年更新
最多8名开发者,商业用途,1年更新
All licenses include:
- ✓ 免版税分发
- ✓ 包含所有功能(流媒体、NDI、GPU 特效、多输出)
- ✓ 所有源代码示例
- ✓ 优先工单支持
- ✓ 包含所有5个平台目标
TVideoGrabber 定价
单输出采集,基本功能,仅 Windows
添加 NDI 源/输出支持
添加高级硬件编码支持
所有附加组件——仍然仅 Windows,无流媒体,单输出
总拥有成本
比较等效功能集时,价格情况发生了显著变化。包含所有附加组件的 TVideoGrabber 许可证为 EUR 2,595,仅提供 Windows 单输出采集。EUR 1,000 的 Video Capture SDK Professional 包含跨平台支持、流媒体、多输出、GPU 特效等——价格不到一半。
- ⚠SDK Professional(EUR 1,000)包含一切 vs TVideoGrabber 完整套装(EUR 2,595)存在功能缺口
- ⚠SDK 包含流媒体协议(RTMP、SRT、HLS)——TVideoGrabber 任何价位都没有
- ⚠SDK 包含多输出录制——TVideoGrabber 任何价位都没有
- ⚠SDK 覆盖5个平台——TVideoGrabber 仅覆盖 Windows
- ⚠SDK 包含 GPU 加速特效——TVideoGrabber 仅有基本处理
代码示例
示例 1:摄像头录制为 MP4
Video Capture SDK .NET
C#using VisioForge.Core.VideoCapture;
using VisioForge.Core.Types.Output;
// Create the capture engine
var capture = new VideoCaptureCore();
// Set video source (first available webcam)
var devices = await capture.Video_CaptureDevice_ListAsync();
capture.Video_CaptureDevice = devices[0];
// Set audio source
var audioDevices = await capture.Audio_CaptureDevice_ListAsync();
capture.Audio_CaptureDevice = audioDevices[0];
// Configure MP4 output with H.264
capture.Output_Format = new MP4Output
{
Video = new H264EncoderSettings
{
Bitrate = 4000,
Profile = H264Profile.Main
},
Audio = new AACEncoderSettings
{
Bitrate = 192
}
};
capture.Output_Filename = "recording.mp4";
// Enable preview
capture.Video_Preview_Enabled = true;
// Start recording with preview
await capture.StartAsync();TVideoGrabber
C#// TVideoGrabber — property-based approach
var grabber = new TVideoGrabber();
// Select video device by index
grabber.VideoDevice = 0;
// Select audio device by index
grabber.AudioDevice = 0;
// Set recording mode
grabber.RecordingMethod = TRecordingMethod.rmMP4;
// Set output filename
grabber.RecordingFileName = "recording.mp4";
// Set video bitrate
grabber.VideoBitrate = 4000000;
// Set audio bitrate
grabber.AudioBitrate = 192000;
// Start capture and recording
grabber.StartPreview();
grabber.StartRecording();
// Note: Properties set before starting
// No async/await — synchronous calls
// Single output only示例 2:带 ONVIF PTZ 控制的 IP 摄像头
Video Capture SDK .NET
C#using VisioForge.Core.VideoCapture;
using VisioForge.Core.Types;
var capture = new VideoCaptureCore();
// Connect to ONVIF IP camera
capture.IP_Camera_Source = new IPCameraSourceSettings
{
URL = "rtsp://192.168.1.100:554/stream",
Login = "admin",
Password = "password",
Type = IPCameraType.RTSP
};
// ONVIF PTZ control
var ptz = new ONVIFPTZController(
"192.168.1.100", "admin", "password");
await ptz.MoveAsync(PanDirection.Left, TiltDirection.Up, 0.5);
await ptz.ZoomAsync(ZoomDirection.In, 0.3);
await ptz.GoToPresetAsync("entrance");
// Record while controlling PTZ
capture.Output_Format = new MP4Output();
capture.Output_Filename = "camera_feed.mp4";
// Simultaneously stream to RTMP
capture.Network_Streaming_Enabled = true;
capture.Network_Streaming_Format = new RTMPOutput
{
URL = "rtmp://stream.example.com/live",
StreamKey = "KEY"
};
await capture.StartAsync();TVideoGrabber
C#// TVideoGrabber — ONVIF PTZ support
var grabber = new TVideoGrabber();
// Set IP camera URL
grabber.IPCameraURL = "rtsp://192.168.1.100:554/stream";
grabber.IPCameraLogin = "admin";
grabber.IPCameraPassword = "password";
// ONVIF PTZ — built-in support
grabber.ONVIF_PTZ_Move(
ePTZ_Direction.Left, 50);
grabber.ONVIF_PTZ_Zoom(
ePTZ_ZoomDirection.In, 30);
grabber.ONVIF_PTZ_GotoPreset("entrance");
// Record to file
grabber.RecordingMethod = TRecordingMethod.rmMP4;
grabber.RecordingFileName = "camera_feed.mp4";
grabber.StartPreview();
grabber.StartRecording();
// Note: No streaming capability
// Cannot simultaneously record + stream
// PTZ control is a strong point
// Windows only示例 3:多输出录制 + 流媒体
Video Capture SDK .NET
C#using VisioForge.Core.VideoCapture;
var capture = new VideoCaptureCore();
// Set webcam source
var devices = await capture.Video_CaptureDevice_ListAsync();
capture.Video_CaptureDevice = devices[0];
// Output 1: High-quality local recording
capture.Output_Format = new MP4Output
{
Video = new H264EncoderSettings
{
Bitrate = 8000,
Profile = H264Profile.High
}
};
capture.Output_Filename = "archive.mp4";
// Output 2: Stream to YouTube via RTMP
capture.Network_Streaming_Enabled = true;
capture.Network_Streaming_Format = new RTMPOutput
{
URL = "rtmp://a.rtmp.youtube.com/live2",
StreamKey = "YOUR_KEY",
Video = new H264EncoderSettings { Bitrate = 4500 }
};
// Output 3: Low-res recording for thumbnails
capture.AdditionalOutputs.Add(new OutputConfig
{
Filename = "preview.mp4",
Format = new MP4Output
{
Video = new H264EncoderSettings
{
Bitrate = 1000,
Width = 640, Height = 360
}
}
});
// All three outputs run simultaneously
await capture.StartAsync();TVideoGrabber
C#// TVideoGrabber — single output only
var grabber = new TVideoGrabber();
// Select video device
grabber.VideoDevice = 0;
// Can only record to ONE file at a time
grabber.RecordingMethod = TRecordingMethod.rmMP4;
grabber.RecordingFileName = "archive.mp4";
grabber.VideoBitrate = 8000000;
grabber.StartPreview();
grabber.StartRecording();
// LIMITATIONS:
// - Cannot stream while recording
// - Cannot record multiple files simultaneously
// - No RTMP/SRT/HLS streaming support
// - No additional outputs at different resolutions
// - To stream, you would need a separate tool
// alongside TVideoGrabber
//
// Multi-output and streaming are simply
// not available in TVideoGrabber at any
// price point.示例 4:带录制的运动检测
Video Capture SDK .NET
C#using VisioForge.Core.VideoCapture;
var capture = new VideoCaptureCore();
// Set video source
var devices = await capture.Video_CaptureDevice_ListAsync();
capture.Video_CaptureDevice = devices[0];
// Enable motion detection
capture.Motion_Detection.Enabled = true;
capture.Motion_Detection.Sensitivity = 70;
capture.Motion_Detection.HighlightMotion = true;
capture.Motion_Detection.HighlightColor = Color.Red;
// Motion event handler
capture.OnMotionDetected += (s, e) =>
{
Console.WriteLine(
$"Motion at {DateTime.Now}: " +
$"Level={e.Level:P0}");
// Start recording on motion
if (!capture.IsRecording)
{
capture.Output_Filename =
$"motion_{DateTime.Now:yyyyMMdd_HHmmss}.mp4";
capture.StartRecording();
}
};
// Configure output
capture.Output_Format = new MP4Output
{
Video = new H264EncoderSettings
{
Bitrate = 4000,
UseHardwareEncoder = true
}
};
// Start preview with detection
await capture.StartAsync();TVideoGrabber
C#// TVideoGrabber — motion detection
var grabber = new TVideoGrabber();
// Select video device
grabber.VideoDevice = 0;
// Enable motion detection
grabber.MotionDetection_Enabled = true;
grabber.MotionDetection_Sensitivity = 70;
// Motion event
grabber.OnMotionDetected += (s, e) =>
{
Console.WriteLine(
$"Motion detected at {DateTime.Now}");
};
// Set recording format
grabber.RecordingMethod = TRecordingMethod.rmMP4;
grabber.RecordingFileName = "motion.mp4";
grabber.StartPreview();
// Note: TVideoGrabber does support
// basic motion detection — this is
// a shared capability.
// However, no motion highlight overlay,
// no hardware encoding toggle,
// no dynamic filename switching,
// no simultaneous stream on motion.决策矩阵
| 需求 | Video Capture SDK | TVideoGrabber | 胜出 |
|---|---|---|---|
| 跨平台(Windows、Mac、Linux、移动端) | Video Capture SDK | ||
| 多输出(同时录制 + 推流) | Video Capture SDK | ||
| 实时音频特效 | Video Capture SDK | ||
| GPU 加速视频特效 | Video Capture SDK | ||
| RTMP / HLS / SRT 流媒体 | Video Capture SDK | ||
| 虚拟摄像头输出 | Video Capture SDK | ||
| 文件分割/时移 | Video Capture SDK | ||
| 硬件编码(NVENC、QSV) | Video Capture SDK | ||
| 无额外费用的 NDI | Video Capture SDK | ||
| 采集期间的 OCR | TVideoGrabber |
结论
Video Capture SDK .NET
Video Capture SDK 提供全面的现代采集平台,覆盖五个操作系统、七个 UI 框架,并将所有功能——流媒体、多输出、GPU 特效、NDI 和硬件编码——包含在 EUR 1,000 起的单一许可证中。对于构建跨平台采集应用的团队或任何需要流媒体和多输出录制的项目,SDK 以低得多的总成本提供了比带附加组件的 TVideoGrabber 显著更多的价值。
TVideoGrabber
TVideoGrabber 是一个成熟的仅 Windows 采集组件,具有可靠的 DirectShow 集成和独特的 OCR 功能。对于需要从视频流中进行文字识别的简单 Windows 采集项目,它是一个合理的选择。然而,缺乏流媒体、多输出支持、跨平台兼容性以及高昂的附加组件成本(总计 EUR 2,595)限制了它对现代应用开发的吸引力。
The Reality
对于具有 OCR 需求且不需要流媒体或多输出的仅 Windows 项目,TVideoGrabber 是一个可行的选择。对于几乎所有其他视频采集场景——跨平台、流媒体、多输出、GPU 特效或注重成本的开发——Video Capture SDK 以更低的总价格提供更强大的选择。
