Module ngx_http_hls_module

The ngx_http_hls_module module provides HTTP Live Streaming (HLS) server-side support for MP4 and MOV media files. Such files typically have the .mp4, .m4v, .m4a, .mov, or .qt filename extensions. The module supports H.264 video codec, AAC and MP3 audio codecs.

For each media file, two URIs are supported:

  • A playlist URI with the “.m3u8” filename extension. The URI can accept optional arguments:
    • start” and “end” define playlist boundaries in seconds (1.9.0).
    • offset” shifts an initial playback position to the time offset in seconds (1.9.0). A positive value sets a time offset from the beginning of the playlist. A negative value sets a time offset from the end of the last fragment in the playlist.
    • len” defines the fragment length in seconds.
  • A fragment URI with the “.ts” filename extension. The URI can accept optional arguments:
    • start” and “end” define fragment boundaries in seconds.
This module is available as part of our commercial subscription.
hls_fragment
  • References/Server/Nginx/Modules reference/ngx_http_hls_module

Syntax: hls_fragment time; Default: hls_fragment 5s;

2025-01-10 15:47:30
hls_mp4_max_buffer_size
  • References/Server/Nginx/Modules reference/ngx_http_hls_module

Syntax: hls_mp4_max_buffer_size size; Default: hls_mp4_max_buffer_size

2025-01-10 15:47:30
hls_mp4_buffer_size
  • References/Server/Nginx/Modules reference/ngx_http_hls_module

Syntax: hls_mp4_buffer_size size; Default: hls_mp4_buffer_size 512k;

2025-01-10 15:47:30
hls_buffers
  • References/Server/Nginx/Modules reference/ngx_http_hls_module

Syntax: hls_buffers number size; Default: hls_buffers

2025-01-10 15:47:30
hls
  • References/Server/Nginx/Modules reference/ngx_http_hls_module

Syntax: hls; Default: — Context: location

2025-01-10 15:47:30
hls_forward_args
  • References/Server/Nginx/Modules reference/ngx_http_hls_module

Syntax: hls_forward_args on | off; Default: hls_forward_args

2025-01-10 15:47:30