Capturing an IP camera and publishing on my site

I use IP Cam (application for android phones) for real-time streaming video. It basically functions as a basic IP camera. He gives me the url where the feed is located. This is similar to http://192.168.2.32:8080/ when I am connected to my WiFi network. The video stream is at http://192.168.2.32:8080/videofeed .

I want to capture the video stream of the camera, which is located at http://192.168.2.32:8080/videofeed , and paste it into an HTML5 player (the one I plan to use Video JS) or Flash Player if HTML5 does not work (prefer HTML5 though) . HTML5 player asks me for the source file (e.g. .mp4, webm, mov, etc.), but there is no source file in http://192.168.2.32:8080/videofeed . This is just an HTML stream.

My question is how to embed this video stream in my HTML5 player and publish it on my website.

+4
source share
3 answers

From what I could see, streaming has already been done by the application on the web page, and there is a video on this page for you. So you want to send a streaming message.

You can try registering for dynamic dns, such as www.no-ip.com, to get a URL for your network, change the router to accept an incoming connection on port 8080, and then use an iframe on your website with a dynamic dns URL -address.

I used to stream a lot of live gigs to websites, but I had a camera connected to my computer and using Adobe Flash Media Streaming (for free) connected to a Wowza streaming server.

0
source

You need to get the data that the camera captures, decodes them into some common format. RGB or YUV2 or whatever. Encode it to Vp8 / webm or thora / ogg. h264 / Mp4 will not do this, since it needs a special header in the mp4 file named mdat (if it is not fragmented by mp4).

The client client tag makes a request to your ip / phones where you process the http GET for this application, maintain this http connection and start streaming. This is like a lengthy survey.

0
source

Most IP cameras have a way to get raw video stream. Using RTSP or RTMP

I suggest you get the steeam URI for the “camera”, which will be something like rtsp://<camera-ip>:<some-port> or rtmp://<camera-ip>:<some-port> . This is a common feature of IP cameras, even those that are emulated on the phone, so this is probably mentioned in the documents or can be enabled / installed in the application configuration.

If there is no documentation, you can do some research using Chrome to access the feed on the web page and open the developer tools to see the actual code for the page, the URI can be seen on the built-in player that they provide.

Once you receive it, open this stream using VLC and look at the properties (encoding, frame rate, size, etc.), and with this you can choose a compatible built-in player for your site.

Hope this helps!

/// Pablo

0
source

Source: https://habr.com/ru/post/1412493/


All Articles