vod_segment_max_frame_count

The `vod_segment_max_frame_count` directive sets the maximum number of video frames per segment during video on demand segmentation in NGINX.

Syntaxvod_segment_max_frame_count number;
Defaultnone
Contexthttp, server, location
Arguments1

Description

The vod_segment_max_frame_count directive in the NGINX-based VOD Packager module specifies the upper limit on the number of video frames that can be included within a single segment when media files are repackaged for streaming. This parameter is crucial for controlling the size of segments, as smaller segments can lead to quicker adaptive bitrate switching and a more responsive playback experience for viewers. This is particularly important in scenarios where network conditions change, necessitating adjustments to the video quality in real-time based on the available bandwidth.

By adjusting the value of this directive, users can achieve a balance between the segment size and the latency of the adaptive bitrate stream. Settings that are too high may result in larger segments, potentially introducing delays in quality adaptation, while overly restrictive settings could lead to a proliferation of smaller segments that increases the overhead associated with many HTTP requests.

The directive is applicable in http, server, and location contexts, allowing for a flexible configuration depending on the specific streaming needs. This enhances the versatility of the VOD setup, permitting fine-tuning either globally or for specific locations or servers based on the traffic or content served.

Config Example

server {
   listen 80;
   location /video {
       vod_segment_max_frame_count 60;
   }
}

Setting the value too high may lead to reduced adaptability in video quality.

Inadequate testing may lead users to miss the impact on playback experience under varying network conditions.

← Back to all directives