-
Notifications
You must be signed in to change notification settings - Fork 3.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
The issue of performance #17
Comments
It is possible to use media constraints like Remember, I’ve not experimented peer-2-server yet. If you’re interested, here is my idea: First phasePeer connection is opened between session initiator and media server. Handshake is completed and RTP packets are flowing from browser to server. Here, media server played the role of another peer. Server can access/read those Server can broadcast them over all other connected peers however, for broadcasting: server must use RTP (SRTP) ports. Second phasePeer connection is established between a participant and the media server. Same Server can either record them or further broadcast them over room initiator’s peer. It means that the entire complex job is done by the server. Only one peer connection is opened between each participant (including room initiator) and the server. Server can mix/transcode videos and transmit them over single peer i.e. over room initiator’s or each participant’s 2-incoming-RTP ports means the connection between a peer and server must be 2-way. In a simple one-to-one peer connection (i.e. video-session); about 4-RTP ports are opened by the browser. 2 for outgoing audio/video RTP streams and 2 for incoming. Now, question arises; “Is it possible to open peer-to-server connection”? Simple answer is: it could be possible only if target media server is smart enough to generate right SDP. ICE can be gathered by the server; it is optional however preferred. Personally I think 1-way streaming i.e. peer-to-server is easier to be implemented however 2-way streaming will be a big challenge. Mozilla planned to implement multiple-streaming per peer connection; chrome is already supporting it however none of them is planning to allow single peer to be connected with multiple peers. Defining multiple “m=” lines is easier however each line points a unique peer is a little bit complex. That’s why this feature is being ignored. (Maybe they think it is useless!!). Well, it is a reality that with every model (except peer-to-server) we need to open same number of RTP ports like we’re already doing. So, performance issues will be still there. In the below image, you can see that only-one peer connection is opened for each user. 2 RTP streams are flowing toward server and two RTP ports are used for incoming streams. Server can use those |
Thanks a lot. |
You can set bandwidth = {
bandwidth: 1000
};
video_constraints = {
mandatory: {
minFrameRate: 30
},
optional: [bandwidth]
};
constraints = {
audio: true,
video: video_constraints
};
navigator.webkitGetUserMedia(constraints, success, failure); |
Thanks. |
HI Muaz, There is already an implementation of this sort, lynckia, I have tested this & it works well. What it does is it has a smart signaling server which acts as a peer to Then it adds one stream for each participant to other participants Right now they forward media from each participant to every other But because of this bandwidth requirement of server is pretty high I am planning to read about mixing & transcoding & try implementing it on But unsure of how exactly these things work. Can you provide some leads/pointers on how to proceed on this? Also is this the viable solution going forward to support many is there other media server(may be licensed/open sourced) already doing Thanks, On Wed, Apr 24, 2013 at 8:26 PM, rsh notifications@github.com wrote:
|
wow, "lynckia" is cool ) |
Gross, needs a server, and no windows support, it is nothing like this project. |
Muaz Khan, you can add RTCMultiConnection opportunity ustanavilvat the following parameters: var video_constraints = {
mandatory: {
minWidth: 640,
maxWidth: 640,
minHeight: 480,
maxHeight: 480,
minFrameRate: 30
},
optional: []
}; Example: |
What you think about this: // getUserMedia constraints
connection.mediaConstraints.mandatory.minFrameRate = 10;
connection.mediaConstraints.mandatory = {
minWidth: 640,
maxWidth: 640,
minHeight: 480,
maxHeight: 480,
minFrameRate: 30
};
// sdp constraints
connection.sdpConstraints.optional.IceRestart = true;
connection.sdpConstraints.mandatory = {
OfferToReceiveAudio: true,
OfferToReceiveVideo: true,
VoiceActivityDetection: true,
IceRestart = true;
}; |
Very good! |
Mute only "remote" media streams: connection.streams.mute({ —— audio: true, —— video: true, —— type: 'remote' }); Mute all: connection.streams.mute(); connection.mediaConstraints.mandatory = { —— minWidth: 640, —— maxWidth: 640, —— minHeight: 480, —— maxHeight: 480, —— minFrameRate: 30 }; See #68 and #17 for further details.
Is it possible to reduce the load on the processor in the video? What affects the load? Can be a great camera resolution? If more than three parties becomes very slow.
The text was updated successfully, but these errors were encountered: