mirror of
https://github.com/zotanmew/nginx-rtmp-module.git
synced 2024-06-13 18:49:32 +02:00
84 lines
1.4 KiB
Plaintext
84 lines
1.4 KiB
Plaintext
==nginx-rtmp-module==
|
|
|
|
NGINX-based RTMP server
|
|
|
|
* Live streaming of video/audio
|
|
|
|
* Recording published streams to FLV
|
|
|
|
* Advanced buffering techniques
|
|
to keep memory allocations at a minimum
|
|
level for faster streaming and low
|
|
memory footprint
|
|
|
|
* Works with Flash RTMP clients as well as
|
|
ffmpeg/rtmpdump/flvstreamer etc
|
|
(see examples in test/ subdir)
|
|
|
|
|
|
Build:
|
|
|
|
cd to NGINX source directory & run this:
|
|
|
|
./configure --add-module=<path-to-nginx-rtmp-module>
|
|
make
|
|
make install
|
|
|
|
|
|
RMTP URL format:
|
|
|
|
rtmp://rtmp.example.com/<app>[/<name>]
|
|
|
|
<app> - should match one of application {}
|
|
blocks in config
|
|
<name> - interpreted by each application
|
|
can be empty
|
|
|
|
|
|
Example nginx.conf:
|
|
|
|
rtmp {
|
|
|
|
server {
|
|
|
|
listen 1935;
|
|
|
|
chunk_size 128;
|
|
|
|
max_buf 1000000;
|
|
|
|
#timestamp_fix off;
|
|
|
|
# TV mode: one publisher, many subscribers
|
|
application mytv {
|
|
|
|
# enable live streaming
|
|
live on;
|
|
|
|
# record flvs to this dir
|
|
record /tmp/av;
|
|
|
|
# max flv size
|
|
record_size 3000000;
|
|
|
|
#wait_key_frame on;
|
|
|
|
# publish only from localhost
|
|
allow publish 127.0.0.1;
|
|
deny publish all;
|
|
|
|
#allow play all;
|
|
}
|
|
|
|
# Many publishers, many subscribers
|
|
# no checks, no recording
|
|
application videochat {
|
|
|
|
live on;
|
|
|
|
}
|
|
|
|
}
|
|
}
|
|
|