part_duration
The `part_duration` directive configures the duration of media segments in the Kaltura Media Framework.
Description
The part_duration directive within the Kaltura Media Framework Common NGINX Module specifies the length of each media segment in the streaming process. This duration is crucial for adaptive bitrate streaming, allowing content to be divided into easily manageable pieces, optimizing both playback and bandwidth usage. By setting this directive, users can control the granularity of the media segments that are delivered to clients, influencing playback behavior and responsiveness.
The directive expects a single argument, which should be a positive integer representing the duration in seconds. This parameter defines how long each segment should be before a new segment is created. For example, setting part_duration 10; creates segments that are 10 seconds long, making it suitable for scenarios where quick switching between different quality streams is essential—especially in live streaming scenarios where delays need to be minimized.
It's important to note that setting this value too low may result in overhead due to the increased frequency of segment requests, while a very high value can lead to larger delays for switching quality. Therefore, balancing this setting based on the expected user experience and network conditions is critical for optimal performance.
Config Example
part_duration 10;
Ensure that the value provided is a positive integer; otherwise, NGINX will throw a configuration error.
Consider network conditions when setting segment duration; very small durations may lead to excessive bandwidth usage due to rapid segment loading.