WebRTC Conference
Version 12 (Dan Pascu, 07/07/2017 02:32 pm)
1 | 3 | Adrian Georgescu | h1. SylkServer WebRTC Managed Conference |
---|---|---|---|
2 | 2 | Adrian Georgescu | |
3 | 4 | Adrian Georgescu | |
4 | 2 | Adrian Georgescu | h2. Design |
5 | 2 | Adrian Georgescu | |
6 | 12 | Dan Pascu | Two types of conferences are being supported: ad-hoc conferences and moderated conferences. |
7 | 12 | Dan Pascu | |
8 | 12 | Dan Pascu | h3. Ad-hoc conferences |
9 | 12 | Dan Pascu | |
10 | 12 | Dan Pascu | An ad-hoc conference is a conference where all participants have the same status and no one is controlling what other are participants are doing. The participants are rendered in a matrix or up to 3x3 depending of how many participants are in the room. The layout switches automatically for everybody as participants join or leave. |
11 | 12 | Dan Pascu | |
12 | 12 | Dan Pascu | The conference room has a fixed total bitrate configured by the server, that can be specified per room or globally with the max_bitrate setting in webrtcgateway.ini (see below). This bitrate is shared by all participants in the room, meaning that the more participants are in the room, the less bitrate each participant will use for the video stream they send, keeping the total room usage constant to the value configured by max_bitrate. The bitrate adjustment per participant is done automatically by sylkserver as participants join or leave the room, by diving the available bitrate among the number of participants. The end result of this is that each participant will send a fraction of max_bitrate (which is determined by the number of participants in the room) and will always receive a total combined of max_bitrate from all the participants in the room, no matter how many participants are in the room. The formula to compute the bitrate per participant is shown below: |
13 | 12 | Dan Pascu | |
14 | 12 | Dan Pascu | <pre> |
15 | 12 | Dan Pascu | participant_send_bitrate = max_bitrate / max(number_of_participants - 1, 1) |
16 | 12 | Dan Pascu | </pre> |
17 | 12 | Dan Pascu | |
18 | 12 | Dan Pascu | Using this formula we can make sure that each participant always receives max_bitrate traffic in incoming video streams, independent of the number of participants. The traffic send/received by each party can be expressed like (considering N to be the number of participants and N>1): |
19 | 12 | Dan Pascu | |
20 | 12 | Dan Pascu | <pre> |
21 | 12 | Dan Pascu | participant_sent_traffic = max_bitrate / (N - 1) |
22 | 12 | Dan Pascu | participant_received_traffic = max_bitrate |
23 | 12 | Dan Pascu | |
24 | 12 | Dan Pascu | sylkserver_sent_traffic = max_bitrate * N (participant_received_traffic * N) |
25 | 12 | Dan Pascu | sylkserver_received_traffic = max_bitrate * N / (N - 1) (participant_sent_traffic * N) |
26 | 12 | Dan Pascu | </pre> |
27 | 12 | Dan Pascu | |
28 | 12 | Dan Pascu | |
29 | 2 | Adrian Georgescu | h2. Features |
30 | 2 | Adrian Georgescu | |
31 | 11 | Adrian Georgescu | h3. Ad-hoc conference |
32 | 1 | Adrian Georgescu | |
33 | 11 | Adrian Georgescu | All participants are rendered in a matrix where each participants has the same size. The conference room has a fixed total bandwidth set by the server, which is divided between the participants, which means the more participants are in the room, the less bandwidth each participant will use keeping the bandwidth usage per conference room constant. |
34 | 11 | Adrian Georgescu | |
35 | 11 | Adrian Georgescu | h3. Managed conference |
36 | 11 | Adrian Georgescu | |
37 | 11 | Adrian Georgescu | The first participants becomes the manager. He can add/remove mute participants and also decide which one is the active speaker(s). |
38 | 7 | Adrian Georgescu | |
39 | 2 | Adrian Georgescu | h2. Configuration |
40 | 2 | Adrian Georgescu | |
41 | 10 | Dan Pascu | Sylkserver allows the maximum bitrate and video codec to be configured, globally or per room with the following settings in webrtcgateway.ini file: |
42 | 10 | Dan Pascu | |
43 | 10 | Dan Pascu | <pre> |
44 | 10 | Dan Pascu | ; Maximum video bitrate allowed per sender in a room in bits/s. This value is |
45 | 10 | Dan Pascu | ; applied to any room that doesn't define its own. The value is any integer |
46 | 10 | Dan Pascu | ; number between 64000 and 4194304. Default value is 2016000 (~2Mb/s). |
47 | 10 | Dan Pascu | ; max_bitrate = 2016000 |
48 | 10 | Dan Pascu | |
49 | 10 | Dan Pascu | ; The video codec to be used by all participants in a room. This value is |
50 | 10 | Dan Pascu | ; applied to any room that doesn't define its own. |
51 | 10 | Dan Pascu | ; Possible values are: h264, vp8 and vp9. Default is vp9. |
52 | 10 | Dan Pascu | ; video_codec = vp9 |
53 | 10 | Dan Pascu | |
54 | 10 | Dan Pascu | </pre> |
55 | 10 | Dan Pascu | |
56 | 10 | Dan Pascu | |
57 | 1 | Adrian Georgescu | h2. Client support |
58 | 1 | Adrian Georgescu | |
59 | 1 | Adrian Georgescu | h2. Measurements |
60 | 1 | Adrian Georgescu | |
61 | 10 | Dan Pascu | This measurement was done on a Macbook Pro 15" with a 2.3GHz Intel Core I7 CPU, while having 7 participants in the room with each using 336Kb/s. The measurement shows the CPU usage in Firefox with the aforementioned conditions, for the specified video codecs and resolutions which are used by all participants: |
62 | 1 | Adrian Georgescu | |
63 | 10 | Dan Pascu | <pre> |
64 | 10 | Dan Pascu | * H264/VGA - 150% CPU |
65 | 10 | Dan Pascu | * H264/HD - 250% CPU |
66 | 10 | Dan Pascu | * VP9/VGA - 220% CPU |
67 | 10 | Dan Pascu | * VP9/HD - 350% CPU |
68 | 10 | Dan Pascu | </pre> |
69 | 6 | Adrian Georgescu | |
70 | 6 | Adrian Georgescu | |
71 | 6 | Adrian Georgescu | h2. Remaining tasks |
72 | 6 | Adrian Georgescu | |
73 | 6 | Adrian Georgescu | * sylkserver: control interface for moderator |
74 | 1 | Adrian Georgescu | * janus: patch to request full frames when a paused video is resumed |