kmp_rtmp_in_buffer_bin_count

This directive specifies the binary buffer count for incoming streams in Kaltura Media Framework.

Syntaxkmp_rtmp_in_buffer_bin_count number;
Defaultnone
Contextstream, stream server
Arguments1

Description

The kmp_rtmp_in_buffer_bin_count directive in the Kaltura Media Framework's NGINX module dictates how many binary buffers are allocated for incoming RTMP streams. Each buffer serves to temporarily store data from the stream before further processing or forwarding it. This is crucial for maintaining smooth streaming performance, particularly under varying network conditions and during high-load scenarios. By adjusting the count of these buffers, administrators can optimize memory usage and responsiveness of the media streaming pipeline.

When a stream is initiated, NGINX utilizes the specified number of buffers to handle the data flow from the source to the destination. If too few buffers are configured, it may lead to increased dropped packets and interruptions in stream delivery, especially when the incoming data rate exceeds the processing capability of the server. Conversely, too many buffers may unnecessarily consume resources, leading to potential server inefficiencies. Therefore, selecting an appropriate buffer count is a balancing act between resource management and stream reliability.

To use this directive, it must be defined at the stream or stream server context level in the NGINX configuration file, allowing for greater flexibility in resource allocation across different streams. The directive accepts a single integer argument, indicating the desired count of binary buffers. Careful tuning based on the specific use case and observed performance metrics is recommended to achieve optimal results.

Config Example

stream {
    server {
        listen 1935;
        kmp_rtmp_in_buffer_bin_count 5;
    }
}

Setting the count to zero is invalid and will cause NGINX to fail to start.

Excessively high values may lead to high memory consumption, affecting overall server performance.

Changes to this directive require a reload of the NGINX service to take effect.

← Back to all directives