10

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 ?

faksu3442
  • 301
  • 1
  • 4
  • 11
  • 1
    This does not look like a valid question, "Questions asking for homework help must include a summary of the work you've done so far to solve the problem, and a description of the difficulty you are having solving it." Apparently you should have learnt about RTSP and WebRTC before asking. – Roman R. Jul 26 '15 at 09:22
  • I know I may be late at the party, but may I ask what did you use for your project in the end? – LoukMouk Nov 02 '18 at 13:33

2 Answers2

24

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.

Whoami
  • 13,930
  • 19
  • 84
  • 140
15

RTSP is a streaming control protocol, to control streaming server (whoami's remote control analogy in another answer is a very nice way to think of it). It defines how to package data to stream it and how both ends of the connection should behave to support the protocol.

To be clear, it does not actually transport the media data itself - the RTP (Real Time Transport) protocol takes care of this.

To further complicate things, RTCP (Real Tine Control Protocol) exists also - despite the name, its main purpose is to collect statistics for the RTP session.

SDP (session description protocol) is also useful to be aware of in this context -it contains information about the session parameters for the stream and is used by RTSP etc. Example parameters include session name, time the session is available, URI etc.

WebRTC is a project and a set of IETF drafts that provide browsers with a set of API's to support 'Rich' web communications.

In very simple terms WebRTC might provide an API to allow a web programmer (i.e. someone using Javascript to create a browser based client) use a protocol like RTP to stream data.

Note the word 'might' above - currently WebRTC does not support direct interworking with RTSP at this time, although there is some discussion around it:

Mick
  • 24,231
  • 1
  • 54
  • 120