开发者

how to stream a camera to users with permission

开发者 https://www.devze.com 2023-03-10 04:39 出处:网络
I have a LAN at home.One machine runs a webserver.Another machine has a webcam.I would like to make a webpage on the hosting machine that provides a stream from the webcam on the other computer.The se

I have a LAN at home. One machine runs a webserver. Another machine has a webcam. I would like to make a webpage on the hosting machine that provides a stream from the webcam on the other computer. The serving machine has it's own domain name/ip, but the computer with the webcam sits behind the router, using NAT. I am no networking guru, but I am a programmer with enough knowledge of the stuff. Basically I want the page offering the video stream to only be visible to registered users.

Is this even possible? Currently I am using VLC to stream on the LAN. The only way I can think to do this is to forward the port to my webcam ma开发者_开发知识库chine, and let the webserver serve a page containing a tag with the src being a direct url to my router and the forwarded port.

Is there an alternative where port forwarding to the webcam machine would not be necessary ?


You can setup a reverse proxy on the web server to access the webcam server. It might be sufficient to only enable mod_proxy and add this to your configuration:

ProxyRequests off
ProxyPass /webcam http://webcam-server/stream-url

When a client connects to the web server requesting /webcam, the web server will in turn connect to the internal webcam server and pass the contents back to the browser.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号