vod_mode

The 'vod_mode' directive configures the operation mode for the NGINX-based VOD packager, enabling local serving, remote file handling, or JSON-mapped content.

Syntaxvod_mode local | remote | mapped;
Defaultnone
Contexthttp, server, location
Arguments1

Description

The 'vod_mode' directive is utilized within the NGINX-based VOD module to specify the operational context in which the video on demand (VOD) service will operate. This directive can take one argument that sets the mode: 'local', 'remote', or 'mapped'. In local mode, the packager serves files from a local directory or NFS mount; in remote mode, it serves files accessible via HTTP with support for range requests to allow efficient streaming. Mapped mode provides more complex behavior, allowing the packager to read video specifications from a given JSON file, which can be fetched from a remote server or stored locally. This flexibility enables adaptive bitrate streaming and playlist support, which is essential for modern streaming applications.

The behavior of 'vod_mode' depends on the argument provided, allowing the administrator to configure the VOD service based on their application needs. The config can be specified in the main 'http' context, or within 'server' or 'location' blocks to fine-tune the VOD implementation. Proper use of this directive is crucial in ensuring that the VOD service operates optimally, handling content from the desired source and in the expected manner, especially when combining with other features such as adaptive bitrate support and multiple audio/video tracks.

Config Example

http {
    vod_mode local;
    server {
        location /videos/ {
            # Serve local video files
        }
    }
}

Make sure the specified mode is supported by your setup; using 'mapped' requires correct JSON configuration.

Incorrect mode might lead to 404 errors if files are not found in the specified source for that mode.

When using remote mode, ensure that the server being accessed supports range requests.

← Back to all directives