Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

If WebRTC translations quality is a must, WCS allows to use TCP on transport level according to RFC 4571 and 6544.

Supported platforms and browsers

...

WebRTC stream publishing over TCP, call flow differs from from steam publishing via UDP :

1. Client sends SDP offer to server via Websocket.

2. Client receives SDP with TCP ICE candidates from server:

...

WebRTC over TCP usage is enabled with the following parameter in flashphoner.properties file

Code Block
themeRDark
ice_tcp_transport=true

...

By default, buffers sizes are set to 1 M.

Adjusting TCP queues

TCP queues high and low watermarks are set with the following parameters

Code Block
themeRDark
ice_tcp_channel_high_water_mark=52428800
ice_tcp_channel_low_water_mark=5242880

By default, TCP queues size is between 5242880 and 52428800 bytes.

Ports used

TCP ports from WebRTC media ports data range are used for WebRTC connection over TCP

Code Block
themeRDark
media_port_from        =31001
media_port_to          =32000

WebRTC transport management on client side

Server side settings enable WebRTC over TCP for all the clients by default. If necessary, TCP or UDP transoprt usage can be chosen on client side with WebSDK. To do this, transport to be used should be set in stream options when stream is created for publishing (via UDP for example)

Code Block
languagejs
themeRDark
    session.createStream({
        name: streamName,
        display: localVideo,
        cacheLocalResources: true,
        receiveVideo: false,
        receiveAudio: false,
        transport: "UDP"
    }).on(STREAM_STATUS.PUBLISHING, function (stream) {
    ...
    }).publish();

or playing (via TCP for example)

Code Block
languagejs
themeRDark
    session.createStream({
        name: streamName,
        display: remoteVideo,
        transport: "TCP"
    }).on(STREAM_STATUS.PENDING, function (stream) {
    ...
    }).play();

Quick manual for testing

1. For test we use:

...

3. To make sure stream goes to server open chrome://webrtc-internals

4. In Player windows enter stream name test and press Play. Stream playback will start.

...

Known issues

1. Some browsers (MS Edge on Windows, Chrome on Ubuntu) do not establish WebRTC connection if additional network interfaces are enabled (VPN)

...

Solution: disable any additional network interfaces except this one used to access WSC server.

2. WebRTC video cannot be played for all subscribers if one of the subscribers has a channel problems

Symptoms: video cannot be played for all subscribers if one of the subscribers has a channel problems

Solution: enable non-blocking IO with the following parameter

Code Block
themeRDark
ice_tcp_nio=true

3. WebRTC over TCP requires more RAM comparing with UDP when non-blocking IO is used

Symptoms: with increasing traffic on the server, the RAM iconsumption ncreases sharply, up to the server shutdown

Solution: add more RAM to the server according to the following recommendations

  • 64 Gb RAM for 500 Мbps of traffic
  • 128 Gb RAM for 1 Gbps of traffic