This post arises from a question posed by someone via Quora. I’m not all that engaged with that Q&A platform, but this question seemed novel, so I offered an answer. I thought the answer worth sharing in a little more depth, so I offer it here as well.
The question was, “How can I use the RTSP stream from an IP camera as a source for a WebRTC application?”
There are two parts to solving this puzzle; (1) Connect to the RTSP stream and (2) Make it appear like a webcam to the client application.
Obvious Answer: vMix
At the outset, let me say that I would address this using vMix. vMix solves both parts of the puzzle handily. If this is all that you needed to achieve, the $60 Basic HD license would suffice.
Of course, you’d need to learn a little about the application, which is deep. To my mind it’s fun, but some might find it daunting. Further, vMix requires a considerable host platform. You’re not going to run it on trivial hardware.
Let’s just say that we’d like to solve the problem with less spending and requiring less knowledge overhead.
Less Obvious Answer: VLC & NDI Tools
VLC is the ubiquitous, open source media player. Available on all platforms it can play anything I’ve every wanted to open. Beyond files, it can open network streams. I’ve used it to listen to my local PBS radio station. I’ve also used it to watch video streams from our Grandstream surveillance cameras, as shown below.
In the middle of 2015 vMix replaced Wirecast as my preferred desktop video production software. vMix is effectively a production switcher. It allows me to combine various audio and video sources in real-time, the results being sent to a Hangout-On-Air or recorded to disk. It handles webcams, graphics, animations, video capture cards, live desktop capture and even PowerPoint files with ease. Further, it does so while being less hardware intensive than its competition.