...
or more frames to eliminate twitching without viewable latency.
Incoming RTMP stream buffering
RTMP stream published with high resolution and bitrate may be played non smoothly via WebRTC with freezes or low FPS if publishers channel is unstable. Incoming stream should be buffered to prevent playback issues
Code Block |
---|
|
rtmp_in_buffer_enabled=true |
Adaptive RTMP incoming buffer has the following parameters to tune:
Parameter | Description | Default value |
---|
rtmp_in_buffer_start_size | Minimum buffer volume to start, ms | 300 |
rtmp_in_buffer_initial_size | Maxumum buffer volume, ms | 2000 |
rtmp_in_buffer_max_bufferings_allowed | Maximum bufferings amout allowed | -1 (unlimited) |
rtmp_in_buffer_polling_time | Buffer polling period, ms | 100 |
rtmp_in_buffer_overflow_allowed_deviation | Maximum difference between minimum and maximum buffer volumes used, ms | 1000 |
rtmp_in_buffer_overflow_deviation_window | Window size to collect the difference, ms | 30000 |
rtmp_in_buffer_overflow_rate | Maximum buffer overflow rate | 0.15 |
rtmp_in_buffer_clear_threshold | Clear all the data exceeding maxumum buffer size when buffer reaches the threshold, ms | 30000 |
Stop stream buffering if stream delay grows
RTMP stream timestamps may significally differ from server time, and stream may give a delay if there is not enough systrem perfomance for software stream encoder, or if channel bandwidth decreases. Buffering of such stream will give a periodic freezes while playing it. Since build 5.2.1311 the following parameter was added to disable buffering and pass incoming traffic directly to server engine
Code Block |
---|
|
rtmp_in_buffer_input_delay_threshold=0 |
By default, RTMP traffic will always be buffered if buffering is enabled. Buffering can be disabled when stream delay reaches a value defined in milliseconds
Code Block |
---|
|
rtmp_in_buffer_input_delay_threshold=3000 |
In this case, buffer is cleared and goes to the PASSTHROUGH
state. Even if stream delay becomes lower, buffer will remain in the state, and stream will not be buffered until publishing is stopped.
Recommended RTMP stream buffering settings for high quality publishing
The following buffering settings are recommended when publishing a high quality RTMP streams (high bitrate, HD, FullHD resolutions)
Code Block |
---|
|
rtmp_in_buffer_enabled=true
rtmp_in_buffer_start_size=1000
rtmp_in_buffer_initial_size=3000
rtmp_in_buffer_polling_time=30
rtmp_in_buffer_max_bufferings_allowed=-1 |
In this case an RTMP stream published should play smoothly for viewers (if channel quality is good enough) and in mixer.
Detect stream parameters by metadata or media traffic
By default, a possible RTMP publishing parameters are set according to SDP settings file. Since build 5.2.1862 the following option is added to enable automatic stream publishing parameters detection by stream metadata or media traffic data
Code Block |
---|
|
flash_detect_metadata_by_traffic=true |
The option is enabled by default. In this case, WCS changes SDP according to a stream metadata received or according to media information from the stream media packets received.
Since build 5.2.1935 it is possible to setup a maximum time to detect stream metadata by media packets received
Code Block |
---|
|
flash_detect_metadata_by_traffic_timeout=1000 |
The default timeout is 1000 ms.
Known issues
Excerpt Include |
---|
| From another server via RTMP |
---|
| From another server via RTMP |
---|
nopanel | true |
---|
|
...