It is possible to control minimal published stream bitrate, and stop publuishing if bitrate drops below the threshold during specified time.
This feature is enabled by the following parameter
stream_idle_bitrate_monitoring=true
Bitrate threshold is set in bps with parameter
stream_idle_bitrate_monitoring_threshold_bps=100000
Time interval in which bitrate can be below the threshold is set in seconds with parameter
stream_idle_bitrate_monitoring_window_sec=30
If WebRTC, RTMP, RTSP or VOD stream bitrate is below the threshold during the time specified, publishing is stopped with message in server log
Incoming video rate reached idle threshold, stopping media session, rate 98794
The error message "Failed by idle bitrate" is returned to publishsing client.
Note that static picture or screen capture stream may be stopped with this setting, in this case bitrate control should be disabled, or bitrate threshold should be set to minimum possible value.