问题
I saw this article http://www.html5rocks.com/en/tutorials/getusermedia/intro/, it explain about capturing audio and video from user device such as webcam and microphone.
My question is can we used this method to capture video stream from IP cam? So basically it's can access to multimedia streams (video, audio, or both) from IP camera its network stream not local device. Can anyone pointed me to the right direction? Is it possible?
Thanks.
回答1:
HTML capturing is intended for interacting with a local device etc, your problem is completely different than that. Probably, your problem is even easier to solve, as HTML has better support for playing out network video streams than for capturing from local device. You might then be able to capture frames off of the displayed stream, as JavaScript Image
s.
You first need to figure out your IP camera does the streaming. Some cameras are using streaming protocols (RTP and such), which could be supported by your browser's element. Other cameras use a method called progressive download, in which they're producing an endless file being downloaded by the client. If that's the case with your camera, you might be able to simply retrieve that file using XHR.
来源:https://stackoverflow.com/questions/13287933/could-the-html-5-video-tag-source-come-from-streaming-ip-cam