vod_manifest_duration_policy
The `vod_manifest_duration_policy` directive configures how long video manifests are valid before they must be refreshed or revalidated.
Description
The vod_manifest_duration_policy directive in the NGINX VOD module is used to control the duration for which video manifests are considered valid. This setting is crucial when serving video-on-demand (VOD) content as it determines when the client must request a new manifest, thereby impacting content freshness and caching behavior. By specifying a time duration as an argument, the server can manage how frequently clients should check back for updates to the media manifest, which is essential in scenarios such as adaptive bitrate streaming where the quality of the stream may change based on network conditions.
When this directive is set, it influences the caching behavior of the video manifests. If a client tries to access a manifest that is older than the defined policy duration, the server will respond with a new manifest request, ensuring that any changes to the available video tracks or stream qualities are accurately represented. This helps in providing a seamless viewing experience, particularly for live-streamed content or frequently updated VOD libraries. The value provided to this directive is typically expressed in seconds but can also accept more granular time formats depending on the use case.
The directive can be applied in various contexts such as http, server, or location, allowing for flexible configurations that can be tailored to specific parts of your application stack. By strategically configuring the vod_manifest_duration_policy, content providers can optimize performance and user experience by reducing latency in manifest delivery and ensuring that clients receive the most relevant streaming options available.
Config Example
location /videos {
vod_manifest_duration_policy 60s;
}Ensure the duration value is appropriately set to prevent frequent unnecessary manifest requests.
Avoid setting the duration too high if content changes frequently, as this can lead to stale manifests being served.
Check that the manifest duration is compatible with other caching settings in your server configuration.