Search code examples
videostreamingvideo-streamingwebrtcrtsp

What is RTSP and WebRTC for streaming?


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 ?


Solution

  • 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: