3

Can anybody explain what is the basic concept in mixing in Kurento media server? As it is mentioned in what kurento provides, there is a term mixing. So, I would like to know what kurento Media server mixes. As,

  1. Do it mix multi stream generated by a user into one stream and broadcast that stream to other receiving user? If it does this how to use this concept

  2. Do kurento able to receive multi-streams through one PeerConnection object with user, i.e., at one WebRtcEndPoint Kurento can receive or send multi stream by mixing those streams into one stream?enter image description here


Edit Regarding Answer Update

So, I can use mixing concept by using Hubport.

Now, do this HubPort supports different MediaTypes. As, if one user is streaming its screen sharing and at the same time he is streaming its audio also. So, do this composite element mix both the streams to one and stream one single stream to all other users?

Akshay Rathore
  • 819
  • 1
  • 9
  • 23

1 Answers1

4

The concept of mixing refers to combining several media streams into one. This can be better understood with a conference room. In other setups, every user would have one stream going out, and another coming in for each other participant (except himself). That leaves you with 1 + (n -1) = n streams per participant. This results in n * n streams total, where n is the number of participants.

Mixing all streams in the media server allows you to save bandwidth, ideal in scenarios like mobile devices connected through 3G, for instance. What the mixer does, it combines all the streams into one, so each user is sending one stream, and receiving one stream that has all the combined participant's media (except his own). So just two streams per user saves a lot of bandwidth.

This, however, has a toll on CPU consumption, as it's necessary to adapt the videos to the new resolution, combine them... there is some processing involved.

On the other hand, the concept you are referring to is multicast, which is the ability to send several streams through one WebRTC connection. This doesn't save bandwidth, nor combines all the streams into one, but helps you reduce the number of endpoints present in your deployment. this is in our roadmap, but can't tell you when that'll be.


EDIT

Mixing can be achieved in the media server through the Composite media element. You can check this other SO answer for more info on how to use that media element.

igracia
  • 3,543
  • 1
  • 18
  • 23
  • This is what I'm searching for, but I would like to know how exactly I could use this functionality. Right now I'm creating one WebRtcEndPoint for each sender and then to receive the sender's stream every receiver has to create new WebRtcEndPoint and then they should connect to sender's EndPoint to receive sender's stream. So, if I have 5 users and all have to stream its media then each should create 5 different EndPoints to send and receive streams and there is total of 25 EndPoints in that group. Could you suggest me the actual structure to use is such scenario. – Akshay Rathore Apr 27 '16 at 11:53
  • @AkshayRathore I've expanded the answer on how to use the composite. – igracia Apr 27 '16 at 12:14
  • I wan't know some thing more about HubPort. So I had updated my question. Could you please suggest me some sample code regarding implementation of composite element. – Akshay Rathore Apr 28 '16 at 05:49
  • @AkshayRathore The implementation is in the link I've added. If you provide different types of media, you'll have all of them combined in one stream. – igracia Apr 28 '16 at 15:33
  • @IvanGracia Could you please tell me some live example to use Composite Element (as there is many live example enlisted in Kurento.org documentation page). So that it would be more easy to use it. And the code lines that is available on that link of SO question that you had provided to me is not clearing me the whole concept. – Akshay Rathore May 02 '16 at 12:44
  • @AkshayRathore there's no official tutorial for that, although there are implementations around. Have a go at github or the official mailing list. – igracia Aug 30 '16 at 14:34