...
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 |
---|
...
|
...
| |
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 | ||
---|---|---|
| ||
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 | ||
---|---|---|
| ||
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.00 | Incoming stream audio silence level in Db |
mixer_debug_mode | false | Adds some debug info to stream picture caption |
mixer_in_buffering_ms | 200 | Incoming stream video buffer in milliseconds |
mixer_incoming_time_rate_lower_threshold | 0.95 | Relative incoming stream time to mixer time rate lower threshold |
mixer_incoming_time_rate_upper_threshold | 1.05 | Relative incoming stream time to mixer time rate upper threshold |
mixer_video_stable_fps_threshold | 15 | Incoming 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 | ||
---|---|---|
| ||
mixer_text_bulk_write=false
mixer_text_bulk_write_with_buffer=false |