Skip to content

Directives

winshining edited this page Jan 8, 2018 · 31 revisions

Table of Contents

This table is only for the new added directives in this module, for details of other directives, please refer to nginx-rtmp-module directives.

HTTP Live FLV

flv_live

Syntax: flv_live on|off
Context: location
Enable playing a live flv stream in this location.

location /live {
    flv_live on;
}

chunked

Syntax: chunked on|off
Context: location
Add a Transfer-Encoding: chunked HTTP header when sending response to the player and enable HTTP chunked transmission, otherwise Expires: -1 HTTP header is sent. Note that not all players support HTTP chunked transmission.

location /live {
    flv_live on;
    chunked on;
}

Gop Cache

gop_cache

Syntax: gop_cache on|off
Context: application
Cache GOP(s) (Group Of Pictures) when a stream is being published, once a play is coming, send the cached GOP(s) at first. This decreases the time waiting for the first picture of a video to be displayed.

application myapp {
    ...
    gop_cache on;
}

pure_audio_threshold

Syntax: pure_audio_threshold value
Context: rtmp, server, application
If none video packet has been received after value audio packet(s) is/are received, the published stream is thought to be a pure audio stream.

pure_audio_threshold 200;

Virtual Hosts

server_name

Syntax: server_name *.domain.suffix|prefix.domain.*|prefix.domain.suffix|regexp
Context: server
The functionality of server_name directive is as same as in the http block.

server_name prefix.domain.suffix;
Clone this wiki locally