nginx-mod-rtmp/README

107 lines
2.2 KiB
Plaintext
Raw Normal View History

2012-03-24 07:26:07 +01:00
== nginx-rtmp-module ==
NGINX-based RTMP server
* Live streaming of video/audio
2012-03-23 18:41:31 +01:00
* Recording published streams in FLV file
2012-03-23 18:39:06 +01:00
2012-03-29 12:22:47 +02:00
* HTTP callbacks on publish/play/record
2012-03-29 12:21:38 +02:00
* 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)
2012-03-20 05:15:09 +01:00
Build:
cd to NGINX source directory & run this:
2012-03-20 05:16:04 +01:00
./configure --add-module=<path-to-nginx-rtmp-module>
2012-03-20 05:15:09 +01:00
make
make install
2012-04-11 07:23:58 +02:00
Note the module does not share data between workers
and only works in one-worker mode.
2012-03-24 07:26:07 +01:00
RTMP URL format:
2012-03-23 18:39:06 +01:00
rtmp://rtmp.example.com/<app>[/<name>]
2012-03-23 18:39:06 +01:00
<app> - should match one of application {}
blocks in config
2012-03-23 18:40:42 +01:00
<name> - interpreted by each application
2012-03-23 18:39:06 +01:00
can be empty
Example nginx.conf:
rtmp {
server {
listen 1935;
chunk_size 4000;
max_buf 1M;
2012-03-23 18:39:06 +01:00
# TV mode: one publisher, many subscribers
application mytv {
# enable live streaming
live on;
# record first 1K of stream
record all;
record_path /tmp/av;
record_max_size 1K;
2012-03-23 18:39:06 +01:00
# 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;
2012-03-29 12:21:38 +02:00
# The following notifications receive all
# the session variables as well as
# particular call arguments in HTTP POST
# request
# Make HTTP request & use HTTP retcode
# to decide whether to allow publishing
# from this connection or not
on_publish http://localhost:8080/publish;
# Same with playing
on_play http://localhost:8080/play;
# record 10 video keyframes (no audio) every 2 minutes
record keyframes;
record_path /tmp/vc;
record_max_frames 10;
record_interval 2m;
2012-03-29 12:21:38 +02:00
# Async notify about an flv recorded
on_record_done http://localhost:8080/record_done;
2012-03-23 18:39:06 +01:00
}
}
}