简体   繁体   English

Directshow Capture(h264编码)和预览

[英]Directshow Capture (h264 encode) and Preview

I'm trying to develop a C# application for record and preview real time videos from a directshow device source (USB3HDCAP) with max resolution: 1920x1080. 我正在尝试开发一个C#应用程序,用于以最大分辨率:1920x1080记录和预览来自Directshow设备源(USB3HDCAP)的实时视频。

Video must be encoded to H264. 视频必须编码为H264。

I already tried to use C# computer vision frameworks like Aforge and Accord.FFMPEG. 我已经尝试使用Aforge和Accord.FFMPEG之类的C#计算机视觉框架。 However it doesn't work because encoding is too slow, and then preview gets really delayed. 但是,它不起作用,因为编码太慢,然后预览真正延迟了。

Than, I tried to make a simple directshow graph with graph edit, using FFMPEG tryout encoder or vfw264, and I get the same result: Preview really slow, and image quality not so good. 然后,我尝试使用FFMPEG试用编码器或vfw264通过图形编辑制作一个简单的DirectShow图形,并且得到了相同的结果:预览速度非常慢,并且图像质量不太好。

For the last I tried Leadtools Filter . 对于最后我尝试了Leadtools Filter The result was perfect, no delay, and record quality pretty good. 结果是完美的,没有延迟,并且记录质量还不错。 However Leadtools isn't free. 但是Leadtools不是免费的。

Do you know a better solution? 您知道更好的解决方案吗?

Using Intel Media SDK you can made H264 encoder DirectShow filter, in C++. 使用Intel Media SDK,您可以使用C ++制作H264编码器DirectShow过滤器。

Also you can check openH264 project. 您也可以检查openH264项目。

x264 is free and produce good quality, but GPL or commercial license. x264是免费的,并且产生良好的质量,但是具有GPL或商业许可。

I am using LAVFilters for a long time and have no problem with it 我使用LAVFilters很长时间了,没有问题

https://github.com/Nevcairiel/LAVFilters/releases https://github.com/Nevcairiel/LAVFilters/releases

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM