vod_gop_look_behind

The `vod_gop_look_behind` directive configures the number of GOP (Group of Pictures) intervals NGINX should look behind when processing video segments for adaptive bitrate streaming.

Syntaxvod_gop_look_behind number;
Defaultnone
Contexthttp, server, location
Arguments1

Description

The vod_gop_look_behind directive is part of the NGINX-based VOD Packager module and is used to enhance the precision of video streaming by controlling how many preceding GOPs the server examines when packaging video files for adaptive bitrate streaming. This capability becomes particularly useful in scenarios where video files are segmented into multiple parts, each corresponding to different quality levels, allowing for seamless transitions between these segments based on current bandwidth conditions.

By specifying a numerical value as an argument, the directive allows administrators to set the look-behind window for GOPs in the range of how many intervals should be accounted for during streaming. This means that if the current GOP is being processed and, for instance, a look-behind value of 3 is set, the server will consider the previous 3 GOPs when generating the output segment. This can impact the performance and efficiency of the media delivery, especially under varying network conditions.

When applying this directive, consider the effect on server performance; a higher value may lead to increased processing time due to more complex calculations as the server gathers data from additional GOPs. Conversely, a very low value might produce jerky video switches during playback under dynamic bitrate conditions. Balancing this value, therefore, is essential to maintain smooth playback while optimizing resource usage.

Config Example

location /vod {
    vod_gop_look_behind 3;
}

Setting a very high value may adversely affect performance and increase latency in serving video segments.

Ensure that your video encoding and processing pipeline is optimized to take advantage of the look-behind setting; incorrect settings can lead to inefficiencies.

← Back to all directives