-
-
Notifications
You must be signed in to change notification settings - Fork 576
Directives
This table is only for the new added directives in this module, for details of other directives, please refer to nginx-rtmp-module directives.
Syntax: flv_live on|off
Default: flv_live off
Context: location
Enable playing a live flv stream in this location.
location /live {
flv_live on;
}
Syntax: chunked on|off
Default: chunked 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.
Since the latest codes have become more and more compatible with HTTP modules Nginx supplies, the standard directive Nginx supports chunked_transfer_encoding
replaces the feature chunked
provides.
location /live {
flv_live on;
chunked on;
}
Syntax: gop_cache on|off
Default: gop_cache 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;
}
Syntax: pure_audio_threshold value
Default: pure_audio_threshold 160
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;
Syntax: server_name *.domain.suffix|prefix.domain.*|prefix.domain.suffix|regexp
Default: --
Context: server
The functionality of server_name
directive is as same as in the http
block.
server_name prefix.domain.suffix;
Syntax: add_header
name value [always];
Default: --
Context: http, server, location, if in location
Adds the specified field to a response header provided that the response code equals 200, 201 (1.3.10), 204, 206, 301, 302, 303, 304, 307 (1.1.16, 1.0.13), or 308 (1.13.0). The value can contain variables.
There could be several add_header directives. These directives are inherited from the previous level if and only if there are no add_header directives defined on the current level.
If the always parameter is specified (1.7.5), the header field will be added regardless of the response code. add_header 'Access-Control-Allow-Origin' '*'; add_header 'Access-Control-Allow-Credentials' 'true';