Streaming video to web app

dexter0380

n3wb
Joined
Nov 29, 2020
Messages
9
Reaction score
4
Location
Twin Cities, Minnesota
I'm looking at building a custom web app to stream multiple cameras to. I don't want to simply 'display' the camera video in the webpage via iFrame or something similar, I actually want to display the actual stream through my app. Along with the video feed, I will also need to have a connection for 2-way voice communication with the app and the camera.

In my initial research, it seems that I'll need to utilize the RTSP stream of the camera and connect to it via the WebRTC protocol.

Has anyone done anything similar and have any details/advice that you're willing to share?

Thanks!
 

bp2008

Staff member
Joined
Mar 10, 2014
Messages
12,689
Reaction score
14,057
Location
USA
That is an enormous technical challenge. Web browsers don't expose low-level TCP sockets, so they can't use the RTSP protocol. Web sockets and WebRTC are the only two-way data streaming protocols available in a web browser, and cameras can't use either of those protocols, at least not in a standardized way.

So it is necessary to run software on a different computer to translate between the web browser and the camera. There exist numerous open source projects which tunnel RTSP through a web socket to play the video in a browser. They work best with H.264 video of course, because H.265 is not supported in most browsers. These projects require a server program to be running (typically on linux) which pulls the RTSP stream and serves the video via websocket. These are not user-friendly programs.

I'm not aware of any project to achieve 2-way audio to a camera through a web browser. I'm not sure there even is a standard for 2-way audio implementations in cameras.
 

dexter0380

n3wb
Joined
Nov 29, 2020
Messages
9
Reaction score
4
Location
Twin Cities, Minnesota
Thank you @bp2008 !

It seems that the camera I'm testing with (Amcrest IP2M-841B-V3) allows for 2 way audio communication to also go through the RTSP API. In theory, I'm thinking I could also use a middle-man software running on a Pi or some other type of linux device to convert the audio side of things as well and deliver it to my webapp via WebRTC or Web socket. If you have any information around if this seems plausible or not, that would be awesome!
 
Joined
Jan 14, 2022
Messages
1
Reaction score
1
Location
CT
I am streaming the RTSP video from my cameras to the browser using WebRTC but I'm not doing anything with two way audio. User bp2008 is correct that you need a server to sit between the cameras and the web page. I am using Wowza Streaming Engine on Centos linux. I believe you can download and run a dev version of the Wowza software for free however there are some limitations to the number of concurrent connections you can have with the dev/free version.
 
Top