如何在.net C#中使用网络摄像头实现CCTV功能 [英] How to implement CCTV functionality in .net C# with web cams

查看:149
本文介绍了如何在.net C#中使用网络摄像头实现CCTV功能的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好。



我正在使用安装在公交车上的设备上运行的预订系统。新要求是将此视频文件保存为1小时文件。在旅程结束时,这些文件将通过车库的WIFI进行同步。目前我们正在寻找至少2个摄像头馈送,摄像头是普通的网络摄像头(Microsoft lifecam 3000)。总线设备运行Windows嵌入式8,具有1.8 Ghz Atom D525,2个演出的RAM和120 GB SSD。我已经研究过使用EMGU CV和Directshow取得了不同程度的成功。我遇到的一些问题和问题:



1)记录的最佳编解码器。我已经尝试了几种编解码器,最值得注意的是x264vfw - H.264 / MPEG-4 AVC编解码器和Xvid MPEG-4编解码器,它给了我一个小文件,但它需要大量的处理能力。(98%的CPU利用率) )。什么编解码器最好使用,在文件大小/质量和CPU利用率之间取得良好的平衡?



2)视频长度和摄像机之间的视频同步。视频文件时间至关重要。 1小时录制应产生1小时的视频文件,摄像机之间的视频文件长度应相同。 (我正在努力使用Emgu的视频编写器做到这一点)和直接显示当CPU利用率平坦化为100%



3)这实际上是否可行使用网络摄像头还是我们需要配备IP摄像头?





对不起,我忘了提及。所需的帧率可以是15 fps,分辨率大约是640x480



任何帮助将不胜感激。

谢谢

Hi all.

I'm working on a reservation system that runs on a device that is installed in a bus. A new requirement is to save video files on this device that is split into 1 hour files. At the end of the journey this files will be synched back via WIFI at the depot. Currently we are looking at a minimum of 2 camera feeds and the cameras are normal web cams (Microsoft lifecam 3000).The Bus device is running Windows embedded 8, has a 1.8 Ghz Atom D525, 2 Gigs of ram and 120 GB SSD. I have looked into using EMGU CV and Directshow with various levels of success. Some of the problems and questions I have:

1)The best codec to record with. I have tried several codecs, most notable "x264vfw - H.264/MPEG-4 AVC codec" and "Xvid MPEG-4 Codec" which gave me a small file,but it takes a lot of proccessing power.(98% cpu utilisation). What codec is the best to use, giving a good balance between file size/quality and cpu utilisation?

2)Video length and synhronization of videos between cameras. The video file time is critical. 1 hour recording should produce a 1 hour video file and the length of the video files between cameras should be the same. (I'm struggling to get this right with Emgu's Video Writer) and with Direct show when the CPU utilisation is flatlined at a 100%

3)Is this actually possible with Webcams or do we need to go with IP cameras?


Sorry, i forgot to mention. The required framerate can be 15 fps and the resolution will be around 640x480

Any assistance will be greatly appreciated.
Thanks

推荐答案

您没有提到需要记录的参数,特别是图像分辨率和帧速率。你继续使用这些设置越高,如果你坚持在PC上进行压缩,你就会对那个糟糕的Atom处理器征税。

我已经在一个产品上工作多年,其中视频压缩是在PC上完成,每次系统的CPU规格都有所提高时,我感觉非常轻松,因为我们获得了更好的性能。



我实际上不会回答你的前两个问题,因为我认为你需要一个具有更好性能的CPU来实现你的目标,我怀疑Atom处理器是由低功耗要求或你无法控制的其他原因决定的。



坦率地说,如果你只限于Atom处理器,你最好使用带有板载压缩功能的相机。你提到IP摄像机,这绝对是一个选择,但它会使整个设置更复杂。

我的建议是尝试使用板载H.264压缩的网络摄像机。就个人而言,我使用的是罗技C920 - 它是我用H.264压缩找到的最便宜的一款。它确实比你的Microsoft LifeCam 3000花费更多,但图像看起来很棒,而且我能够以合理的价格找到它。

我相信现在还有其他类似功能的网络摄像头,所以开始谷歌搜索类似的东西。然而,有一些网络摄像头被宣传为具有H.264压缩功能,但经过仔细检查后,结果将由安装在PC上的软件完成,因此请仔细阅读规格!



Soren Madsen
You don't mention the parameters you need to record at, specifically image resolution and frame rate. The higher you go on those settings, the more you will be taxing that poor Atom processor if you insist on doing the compression on the PC.
I have worked on a product for many years where video compression is done on the PC and every time the CPU specs for the systems improve, I have felt a great relief as we achieve better performance.

I am actually not going to answer your first two questions because I believe you need a CPU with better performance to achieve your goal and I suspect the Atom processor is dictated by low-power requirements or other reasons you cannot control.

Frankly, if you will be limited to an Atom processor, you are better off using a camera with on-board compression. You mention IP cameras and that is definitely an option, but it will make the whole setup more complex.
My advice is to try out a web camera with on-board H.264 compression. Personally, I have used the Logitech C920 - it was the cheapest one I could find with H.264 compression. It does cost more than your Microsoft LifeCam 3000, but the image looks great and I was able to find it at a good price.
I am sure by now there are other web cams out there with similar capabilities, so start Googling for something like that. However, there are web cams that are advertised as having H.264 compression, but on closer inspection that turns out to be done by software that will be installed on the PC, so read the specs carefully!

Soren Madsen




[ ^ ]





[ ^ ]





[ ^ ]







参考这些文章

[^]


[^]


[^]



refer these articles


这篇关于如何在.net C#中使用网络摄像头实现CCTV功能的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆