out_queue

The `out_queue` directive in the NGINX RTMP module controls the maximum number of frames that can be queued for output streaming.

Syntaxout_queue number;
Defaultnone
Context
Arguments1

Description

The out_queue directive functions by specifying how many frames can be held in the output queue before they are sent to clients. This is crucial in managing flow control and ensuring that the streaming experience is smooth for end users. The directive is especially important in environments with varying network conditions, helping to prevent buffer overflow and enabling more efficient use of network resources.

By configuring the out_queue, stream operators can optimize playback latency and stabilize bandwidth usage. This is particularly relevant for live streaming applications, where delivery time is critical. Setting an appropriate queue size can mitigate the risk of excessive delays or packet drops which could undermine stream quality. Thus, the proper tuning of this directive can lead to improved viewer experiences and less interruption during live broadcasts.

If set too low, it may lead to dropped frames during bursts of activity, while a very high setting can increase latency as streams may wait longer in the queue. Operators should assess their specific use case and network environment to determine the ideal queue size.

Config Example

application live {
    live on;
    out_queue 100;
}

Ensure the out_queue size is appropriate for your stream type and network conditions to avoid drops or excessive buffering.

Setting the queue too high may increase latency unnecessarily, affecting the viewer's streaming experience.

← Back to all directives