U
U
Username2016-08-10 15:01:18
Java
Username, 2016-08-10 15:01:18

How to implement video broadcast?

Good afternoon. How to implement a video broadcast site where one person broadcasts to many? Technologies used: we write a server in Java, we use spring.
It is not clear how to store information on the server. And in order to implement all this, you need to use a hybrid peer-to-peer network? In which direction do you need to dig to figure it out?

Answer the question

In order to leave comments, you need to log in

3 answer(s)
I
Ivan, 2016-08-10
@LiguidCool

And does it make sense to draw from scratch when there is a Big Blue Button (BigBlueButton)?
As far as I remember, it is open-source - see the implementation.
P2P in broadcasting is still very damp. Even the giants ala youtube, youporn and twitch broadcast "the old fashioned way". And who needs to save traffic so they.
In general, there is AceStream with torrent TV and it even works ... But it's damp. In principle, on the torrent TV platform, you can even broadcast yourself.

I
index0h, 2016-08-10
@index0h

How to implement a video broadcast site where one person broadcasts to many?

Google on the topic: wowza, red5, ffserver.
This issue is resolved by the video streaming server.
Not necessary. It all depends on what kind of load you will experience. For live broadcasts, for example, horizontal scaling is the main thing, here mechanisms for automated deployment of new nodes at the time of broadcast and shutdown of these nodes at the end may be required. For a bunch of webinars, the peak load will be orders of magnitude less, but it will be constant.
To get started, look at the 3 servers that I wrote above. They implement different approaches to the "relationship" between the streamer and the viewer. Choose the one that is closest to your business model.

A
Alexander Kosarev, 2016-08-11
@jaxtr

At one time I wrote something similar based on Netty, used the RTSP protocol and associated with it (RTP, RTCP). In general, the task is not difficult if you press the media stream on the author's side: received a frame, gave it to all subscribers; but if you want to reap the media stream on the server side or store the video in some kind of "non-live" format, then you also need to write stream processing on the server, which is already more difficult.
The principle is quite simple, you need to implement two connections:
1. Author -> server, where the author sends data to the server via a protocol. The received data can be stored in a raw format, which would then glue the stream data into a file of a regular format.
2. Server -> subscribers. Here the problem is complicated by the choice of protocol. If you use clients like VLC, then you can use the same RTSP, if the video is embedded in a flash player, then RTMP is more convenient, and if you want to use the player built into the browser, then this is already HLS or MPEG-DASH. The most problem - to write transition between protocols.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question