1
votes

I'm currently investigating streaming protocols and I'm a bit confused about which protocols can actually be used to publish audio and video. At this point I believe the following to be true, but I'm not sure this is all correct, so please correct me if I'm wrong:

RTMP Suitable for both publishing and playing streams.

RTSP Suitable for both publishing and playing streams.

HLS Suitable for playing streams, not suitable for publishing (http://blog.infrared5.com/2016/01/what-you-need-to-know-about-hls-pros-and-cons/)

HLS is a subscriber-only protocol. Unlike WebRTC, which has a spec for publishing from a browser, HTTP Live Streaming only supports playing streams. If you want to publish a live video stream for a device, you simply have to look for other technology to do this.

WebRTC Suitable for both publishing and playing streams.

MPEG-DASH Not sure about this one?

If a protocol is not capable of broadcasting (HLS for example), what is typically done to realise broadcasting?

1
Define "publishing". That means "uploading [to somewhere] from a client's camera/microphone using the browser"?deceze♦
Perhaps I should have made the scope of my situation a bit more clear. What I am interested in, is to record something with the camera of my Android device that users will then be able to watch live. I've been able to realise this with RTMP, but I am also interested in the possibilities with other streaming protocols.user1796440

1 Answers

3
votes

RTSP is sort of a "meta protocol" which is used to exchange controlling messages (play, pause etc.), but it does not itself stream data. Other protocols like RTMP are used to realise that.

HLS and MPEG-DASH are used solely to stream video from a server; the server needs to prepare video data in a specific way and the client can follow the HLS/MPEG-DASH protocols to receive video data from the server using variable bitrates using the standard HTTP protocol. It has nothing to do with uploading video from a client to a server.

The options for doing the latter are WebRTC and RTMP. RTMP is the old school (partially) proprietary solution requiring some server-side component, either an Adobe Flash Media Server (or whatever the marketing name du jour is), or an open source alternative implementation. It requires Flash or another capable browser plugin on the client side.

WebRTC/ORTC is the standardised open protocol native to recent browsers which works without plugins and can stream video P2P; that means you can stream either directly between two users, or stream to a server which can record/transcode/rebroadcast the stream.

If you're willing to install any sort of browser plugin, I wouldn't worry about the protocol too much and rather look at products which enable streaming video; if you want a native open source solution, WebRTC it is.