pckg_empty_segments

The `pckg_empty_segments` directive controls the inclusion of empty segments in Kaltura media delivery.

Syntaxpckg_empty_segments on | off;
Defaultoff
Contexthttp, server, location
Arguments1

Description

The pckg_empty_segments directive is part of the Kaltura Media Framework Common NGINX Module and is crucial for managing how segments are handled during media delivery. When enabled, this directive instructs NGINX to package and serve empty segments alongside regular segments. This is particularly useful in scenarios where maintaining consistent playback behavior is necessary, especially for clients expecting a defined time structure in media streaming, such as live video broadcasts or adaptive bitrate streaming deployments.

The directive accepts a single argument, which is typically a boolean value indicating whether to enable or disable the packaging of empty segments. When set to true, it ensures that segments which contain no media data (i.e., empty segments) are still included in the final output. This can help prevent playback interruptions or confusing behavior on the client side, as empty segments can maintain the expected timing without actual content.

This capability is particularly useful for media streams where silence or gaps may occur, allowing for smoother transitions between content and maintaining the stream's duration accurately. However, this should be used judiciously as excessive empty segments may lead to unnecessary bandwidth consumption and might affect playback performance on some media players.

Config Example

http {
    server {
        location /media {
            pckg_empty_segments on;
        }
    }
}

Enabling empty segments can increase bandwidth usage due to the additional data being sent.

Using this directive without considering player compatibility may lead to unexpected behavior in some clients.

← Back to all directives