How to get an IP camera stream into C#?

后端 未结 5 699
心在旅途
心在旅途 2021-01-31 23:07

I\'ve used AForge library to make this little program, that shows live feed from a webcam into a PictureBox.

private FilterInfoCollection VideoCaptureDevices;
pr         


        
5条回答
  •  小鲜肉
    小鲜肉 (楼主)
    2021-01-31 23:29

    IP cameras do not have specific media interfaces/APIs in Windows, they are just devices on LAN. Also there are hundreds and thousands of models and they don't share common access interfaces (even close).

    So first of all, you have to be specific about the model of your interest.

    Also some vendors provide additional "drivers" that expose IP cameras as multimedia devices, such as "DirectShow driver for IP camera". In most cases these are vendor specific and won't work with other cameras.

    Next chance is that camera implements a well known streaming protocol, in which case some generic driver might work out fine as well.

    Or, as long as you are C# guy, you can check HTTP/CGI API of the IP camera and implement streaming yourself in code, sending and receiving data over HTTP/TCP/UDP connection with the device.

提交回复
热议问题