Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Embed IP camera in web browser [closed]

I'm currently working on a smart home project, which conects sensors and that stuff. The main server runs on a Raspberry Pi, and was designed using Node JS. On the local network, you can access the system web page and see logs, users and manage the sensors.

I would also like to add a camera streaming. I have an IP camera, and I would like to connect it to the same network, and be able to see it live on a web page. I don't mind having some delay or latency, and I don't need to access the service outside of my home network.

I searched a little, but I could not find any easy solution. I read about RTSP and RTMP protocols, and that they may be helpful in these cases. I alo read that there are some plugins available, like VLC and Quick Time, but I would prefer a solution that does not require them. Apparently, HTML5 supports that, but I wasnt able to move forward on that. Browser support should not be an issue, as I pretend to use only Google Chrome, and the last version of it. So if there are any plugins that are easy to integrate and compatible with Chrome, that should be fine!

I also found some services like these:

  1. https://www.ipcamlive.com/
  2. http://rtsp.live/#login

They appear to offer some free services, but I'm not sure if this is the best solution.

So, could anyone help with this situation? How can I easily stream video from an IP camera to a Web Browser in my local network (even with latency or lag)?

Thanks, Igor!

like image 232
user3735796 Avatar asked Dec 03 '22 21:12

user3735796


1 Answers

I solved the issue. If anyone has a problem similar to this, I hope this might help!

To achieve this like I was trying, depends a lot on the camera you are using. I was using a rg-ip01 camera. Some cameras will use different protocols and technologies. So I installed the camera and accessed its IP address. I inspected the web page (on Chrome) and started looking for some clues. Some views recquired ActiveX or Internet Explorer, but the mobile view did not, and its HTML was like that:

<img name="main" id="main" border="0" width="640" height="480" src="http://192.168.1.109:8080/videostream.cgi?loginuse=admin&amp;loginpas=">

I inserted it in my HTML and it worked fine on Chrome! Change the IP to your camera's IP and check if there isn't any password defined (if so, add it too the field in the link, and also, check the user!).

I believe this may vary from camera to camera, but apprerently a lot of them use the same software, so maybe it works!

Thanks, Igor!

like image 149
user3735796 Avatar answered Dec 11 '22 15:12

user3735796