nginx-mod-rtmp/README

117 lines
2.3 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-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 128;
max_buf 1000000;
2012-03-23 18:39:06 +01:00
# 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;
# 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;
# Async notify about an flv recorded
on_record_done http://localhost:8080/record_done;
2012-03-23 18:39:06 +01:00
}
}
}
2012-03-24 07:26:07 +01:00
Compatibility:
Two time fix options exist in server{} block:
play_time_fix on|off;
publish_time_fix on|off;
Both are on by default.
These time fixes need to be turned off
when playing with non-Adobe software
(like ffmpeg) or publishing longer
streams (>4 hours) with such software.
Streams generated/expected by Adobe software
do not satisfy the spec (written by them!).
Third-party software does.