Could the HTML 5 Video tag source come from streaming IP cam?

天涯浪子 提交于 2019-12-12 05:39:09

问题


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 Images.

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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!