What is RTSP and WebRTC for streaming?

faksu3442 picture faksu3442 · Jul 26, 2015 · Viewed 11.3k times · Source

I'm very newbie for streaming. But I must do a user-based streaming system with IP camera. It will be like security cameras. One user will has one stream. My team think working with RTSP. And they want know how will we do it and what is rtsp , webrtc , rtp. I'm researching and i want to ask to you. So what is exactly RTSP? Some IP cameras say supporting WebRTC and what is this? Is this compatitable with RTSP? Which is the best protocol for user based streaming ?

Answer

Whoami picture Whoami · Mar 27, 2017

Let me explain to my Best. Correct me if i m wrong anywhere you feel.

Streaming media data :

You are transferring media data ( audio/ video ) from one end to another end.

RTSP/RTP/UDP, RTCP

RTSP It is a Streaming protocol, and it works like a remote control. Think what you could do with remote control. Play, pause.. etc, that's what RTSP Implements and takes care of. Well, then who is transferring data ?. Here RTP comes into picture. RTP is a transport protocol used by RTSP. RTP uses UDP. Ahh..I know what is UDP/TCP, where all the RTP comes from? There is one core difference between UDP and TCP that we care about. In UDP you can not track if there is a packet loss, and hence RTP. RTP works on UDP, but provides facilities to track the missed packet, so that the receiver can act accordingly. For Example, if there is a packet loss at receiver end for h.264 packet transfer, he could request sender to give full 'I' frame. You can assume RTCP is just a control protocol that works with RTP for QoS Metric.

Ok, so far so good. Now, several question appears in our mind. Everything is now in browser. Yes, can we stream the media to the browser?. Yes, that's where WebRTC comes into picture. WebRTC again uses RTP protocol. so, webRTC is a standard, that helps to media stream from/to browsers. also, it has additional features mentioned below.

1) It is browser based.

2) One Big difference is that is facilitates Peer to Peer network connection with the help of TURN/STURN server.

3) In build codec support.

4) It supports Arbitrary data transfer too. ;)

Hope it gives some basic idea.