Versions Compared

Key

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

...

Avatar pictures displaying for audio only streams

Warning

The In the builds  5.2.1710 - 5.2.1725 the feature is supported in Ubuntu 20.04 and other systems with glibc 2.31 and newer only!

Since build  5.2.1727 the feature is supported in Centos 7.6 (glibc 2.17) and above

Since build 5.2.1710 it is possible to set an avatar picture in PNG (with transparency), JPG or BMP formats to an audio only stream in mixer. A picture may be set while adding a stream to mixer by REST API query /mixer/add :

...

Code Block
languagejs
themeRDark
{
    "uri": "mixer://mixer1",
    "remoteStreamName": "user2"
}

...

Since build WCS build 5.2.741 speech indicator frame colour can be changed with the following parameter1858 it is possible to set avatar pictures automatically by stream name, not using REST API. In this case avatar picture files should be placed to the folder

Code Block
themeRDark
mixer_voice_activity_colour=#FF0000

A colour can be set as hexadecimal value with # or 0x prefix, in #RRGGBB form. Using the settings above, speech indicator frame will be red.

Frame displaying when silence is in a stream

...

avatar_dir=/usr/local/FlashphonerWebCallServer/avatar

A file name should be equal to stream name. For example, the picture file stream1.png will be applied to the stream named stream1. If the stream was added to the mixer automatically, e.g. stream1#mixer1, the mixer name will not be used to get the picture, only the stream name before # character.

Warning

Avatar picture setting with REST API query /mixer/set_stream_avatar has a higher priority then automatic picture setting

Frame colour

Since build 5.2.741 speech indicator frame colour can be changed with the following parameter

Code Block
themeRDark
mixer_voice_activity_switch_delaycolour=500

In this case, speech indicator frame will still be displayed in 500 milliseconds since silence is detected in the stream.

By default, this interval is set to 0, frame will be hidden without delay.

Mixer background management

...

#FF0000

A colour can be set as hexadecimal value with # or 0x prefix, in #RRGGBB form. Using the settings above, speech indicator frame will be red.

Frame displaying when silence is in a stream

By default, speech indicator frame may blink at normal participant speech rate, which can be incomfortable for viewing. For this reason, since build 5.2.645775 it is possible to set PNG picture file which will be used as mixer background. For example, to change the background to blue, prepare blue.png picture and set a time interval in which the frame will be displayed since silence is detected in the stream. The feature can be enabled using the following parameter

Code Block
themeRDark
mixer_voice_videoactivity_backgroundswitch_filenamedelay=blue.png

Background picture file should be placed to /usr/local/FlashphonerWebCallServer/conf if full path is not set. The file can be placed to any folder on the server, in this case full path to the file should be set to the parameter

Code Block
themeRDark
mixer_video_background_filename=/opt/media/blue.png

Background picture will be automatically scaled to mixer output stream resolution

Image Removed

Audio only streams picture aspect ratio management

...

500

In this case, speech indicator frame will still be displayed in 500 milliseconds since silence is detected in the stream.

By default, this interval is set to 0, frame will be hidden without delay.

Mixer background management

By default, mixer applies black background. Since build 5.2.645 it is possible to set PNG picture file which will be used as mixer background. For example, to change the background to blue, prepare blue.png picture and set the following parameter

Code Block
themeRDark
mixer_audiovideo_onlybackground_width=640
mixer_audio_only_height=360
mixer_video_width=1280
mixer_video_height=720

...

filename=blue.png

Background picture file should be placed to /usr/local/FlashphonerWebCallServer/conf if full path is not set. The file can be placed to any folder on the server, in this case full path to the file should be set to the parameter

Code Block
themeRDark
mixer_video_background_filename=/opt/media/blue.png

Background picture will be automatically scaled to mixer output stream resolution

Image Added

Audio only streams picture aspect ratio management

By default, audio only streams picture aspect ratio is set according to mixer one (16:9)

Code Block
themeRDark
mixer_audio_only_width=640
mixer_audio_only_height=480360
mixer_video_width=1280
mixer_video_height=960

...

720

It can be changed together with mixer if necessary, for example to 4:3

Code Block
themeRDark
mixer_audio_only_width=640
mixer_audio_only_height=480
mixer_video_width=1280
mixer_video_height=960

Note that audio only streams picture aspect ratio settings are applied only with WCS restart.

Multithreading support and hign load optimizations

...

7. When a number of participants are speaking simultaneously, some participants are less audible then others. The problem is typical for mixing WebRTC streams, and may ocuur in any solutions using WebRTC and audio mixing, in Discord for example: more data are encoded to one stream, more audio samples may be dropped due to fixed samplerate.

Symptoms: when three or more participants are speaking simultaneously, one of them is less audible then two others

Solution:  raise the audio publishing bitrate on client to send more data per one participant

Code Block
languagejs
themeRDark
constraints: {
  audio: {
     bitrate: 128000
  }
}

and raise Opus encoding bitrate on server

Code Block
themeRDark
opus.encoder.bitrate=128000

8. An incoming stream will be never encoded in realtime mixer if media traffic is stopped in the stream

Symptoms: an incoming stream freezes in the mixer when media traffic is stopped in the stream, for example: more data are encoded to one stream, more audio samples may be dropped due to fixed samplerate.

Symptoms: when three or more participants are speaking simultaneously, one of them is less audible then two others

Solution:  raise the audio publishing bitrate on client to send more data per one participant

Code Block
languagejs
themeRDark
constraints: {
  audio: {
     bitrate: 128000
  }
}

and raise Opus encoding bitrate on server

...

themeRDark

...

, an application window captured by screen sharing is minimized to task bar

Solution: decrease a minimal FPS threshold for mixer incoming streams

Code Block
themeRDark
mixer_video_stable_fps_threshold=0

9. Mixer output stream bitrate may be unstable when incoming stream bitrate or fps drops

Symptoms: mixer output stream bitrate becomes unstable when incoming stream bitrate or fps drops

Solution: update WCS to build 5.2.1843 or newer and set the parameter

Code Block
themeRDark
h264_encoder_filler_data_padding=true

10. There may be a stuttering in mixer audio for a stream published with a packets loss

Symptoms: micro freezes and stuttering for a certain stream in mixer

Solution: increase the mixer incoming streams buffer

Code Block
themeRDark
mixer_in_buffering_ms=1000