-
-
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
Context: location
Enable playing live flv stream in this location.
location /live {
flv_live on;
}
Syntax: chunked on|off
Context: location
Add Transfer-Encoding: chunked
HTTP header when sending response to the player and enable chunked transmission, otherwise Expires: -1
HTTP header is send. Note that not all players support HTTP chunked transmission.
location /live {
flv_live on;
chunked on;
}
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;
}
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;
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;
Syntax: proxy_pass rtmp://host[:port/appInstance]
Context: application
Set the reverse proxy, the functionality of reverse proxy
is similar as in the http
block. However, it is very experimental now and it is not very practical in the real world. Suppose that reverse proxying 3000 streams with 2MB band width every stream, that will occupy about 6GB band width. Without redirection (so many players don't support the feature), the reverse proxy server will suffer both input and output load.
proxy_pass rtmp://localhost:1975/mytest;
or combined with upstream
:
proxy_pass rtmp://backend;
Syntax: upstream {...}
Context: rtmp
Set upstream strategy for reverse proxy, now only round robin is supported.
upstream backend {
server localhost:1975;
server localhost:1985;
}