Versions Compared

Key

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

...

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

Real-time mixer tuning

...

Multithreading support and hign load optimizations

Since build 5.2.793 multithreading support is added to optimize a mixer for a big participants amount. This feature can be enabled by the following parameters

...

Code Block

...

theme

...

RDark
mixer_

...

mixer_in_buffering_ms

...

200

...

type=MULTI_THREADED_NATIVE
mixer_mcu_multithreaded_mix=true

CPU threads count to mix audio amd video can be adjusted by the following parameters

Code Block
themeRDark
mixer_audio_threads=10
mixer_video_threads=4

Usually, MCU mixer encodes one video stream and a many ausio streams: two per every participant plus one common audio track. Therefore, it is recommended to set more CPU threads for audio encoding than for video (as shown above). Additionally, if freezes occur in MCU mixer output stream, it is recommended to enable multithreaded delivery of mixing result to the main WCS engine, to send it to subscribers.

Code Block
themeRDark
mixer_mcu_multithreaded_delivery=true

If participants count is lower than mixing threads count (for example, 3 participants), only one CPU thread will be used for mixing.

Real-time mixer tuning

Real-time mixer can be tuned using the following parameters

Parameter

Default value

Description

mixer_audio_silence_threshold-50.00Incoming stream audio silence level in Db
mixer_debug_modefalseAdds some debug info to stream picture caption

mixer_in_buffering_ms

200

Incoming stream video buffer in milliseconds

mixer_incoming_time_rate_lower_threshold0.95Relative incoming stream time to mixer time rate lower threshold
mixer_incoming_time_rate_upper_threshold1.05Relative incoming stream time to mixer time rate upper threshold
mixer_video_stable_fps_threshold15Incoming stream FPS threshold, video buffer will be disabled for streams with low fps

...

Symptoms: CPU load increasing and system memory (not Java heap) consumption growing while publishing 60 FPS stream to a mixerSolution: publish 30 FPS streams to mixer or use more powerful serverJava heap) consumption growing while publishing 60 FPS stream to a mixer

Solution: publish 30 FPS streams to mixer or use more powerful server

6. Captions may twitch for many participants in MCU mixer

Symptoms: for many (over 10) participants in MCU mixer captions may periodically twitch

Solution: apply the following settings

Code Block
themeRDark
mixer_text_bulk_write=false
mixer_text_bulk_write_with_buffer=false