kmp_rtmp_out_chunk_size

The 'kmp_rtmp_out_chunk_size' directive sets the size of RTMP output chunks in the Kaltura Media Framework.

Syntaxkmp_rtmp_out_chunk_size size;
Defaultnone
Contextstream, stream server
Arguments1

Description

The 'kmp_rtmp_out_chunk_size' directive is specifically utilized within the contexts of 'stream' and 'stream server' in NGINX, designed for managing the behavior of live video streaming via RTMP. This directive defines the size of the output data chunks that the server sends when streaming video content. By adjusting the chunk size, administrators can optimize for latency or throughput depending on their specific streaming requirements.

When setting this directive, you specify a single argument that represents the size in bytes. Smaller chunk sizes can result in lower latency, making them preferable for live streams where real-time interactions are crucial. However, sending smaller chunks can introduce overhead, leading to potentially decreased throughput, especially over high-latency connections. Conversely, larger chunk sizes can improve throughput but may introduce delays, which may not be acceptable in scenarios demanding real-time capabilities.

It is important to find a balance depending on the use case—such as the network conditions, the type of content being streamed, and the overall architecture of the media pipeline. Adjusting this setting can have a profound impact on the performance of your RTMP streams and should be tested for optimal results.

Config Example

stream {
    server {
        kmp_rtmp_out_chunk_size 4096;
        # additional configuration
    }
}

Setting the chunk size too small may lead to higher CPU usage due to increased packet handling overhead.

If the chunk size is set too large, it could lead to increased latency, negatively affecting live streaming experiences.

This directive must be supported by your NGINX build with the Kaltura Media Framework module enabled.

← Back to all directives