hls_type

The 'hls_type' directive specifies the segment type for HLS (HTTP Live Streaming) in the NGINX RTMP module, determining how media segments are packaged.

Syntaxhls_type type;
Defaultnone
Context
Arguments1

Description

The 'hls_type' directive in the NGINX RTMP module plays a crucial role in configuring how HLS media segments are created and served. This directive accepts a single argument that can specify different types of segment packaging, typically either 'vod' for video on demand or 'live' for live streams. When set to 'vod', the stream is treated as a pre-recorded media file, allowing for full segments to be created in advance. In contrast, when set to 'live', segments are generated in real-time, reflecting the current state of the live broadcast.

Config Example

hls_type live;

Ensure to match the 'hls_type' with the nature of your stream; using 'vod' for a live stream can lead to unexpected behavior.

When switching between 'vod' and 'live', make sure to reload the configuration to avoid misconfiguration errors.

← Back to all directives