WebRTC - scalable live stream broadcasting / multicasting

前端 未结 12 711
别跟我提以往
别跟我提以往 2020-11-30 16:47

PROBLEM:

WebRTC gives us peer-to-peer video/audio connections. It is perfect for p2p calls, hangouts. But what about broadcasting (one-to-many, for

12条回答
  •  一整个雨季
    2020-11-30 17:30

    There is the solution of peer-assisted delivery, meaning the approach is hybrid. Both server and peers help distribute the resource. That's the approach peer5.com and peercdn.com have taken.

    If we're talking specifically about live broadcast it'll look something like this:

    1. Broadcaster sends the live video to a server.
    2. The server saves the video (usually also transcodes it to all the relevant formats).
    3. A metadata about this live stream is being created, compatible with HLS or HDS or MPEG_DASH
    4. Consumers browse to the relevant live stream there the player gets the metadata and knows which chunks of the video to get next.
    5. At the same time the consumer is being connected to other consumers (via WebRTC)
    6. Then the player downloads the relevant chunk either directly from the server or from peers.

    Following such a model can save up to ~90% of the server's bandwidth depending on bitrate of the live stream and the collaborative uplink of the viewers.

    disclaimer: the author is working at Peer5

提交回复
热议问题