2012-04-01 11:11:08 +04:00
2012-03-30 20:17:53 +04:00
2012-03-30 20:23:18 +04:00
2012-03-30 20:18:20 +04:00
2012-03-18 17:09:19 +04:00
2012-03-29 16:10:11 +04:00
2012-03-29 16:10:11 +04:00
2012-03-29 14:22:47 +04:00

== nginx-rtmp-module ==

NGINX-based RTMP server

* Live streaming of video/audio

* Recording published streams in FLV file

* HTTP callbacks on publish/play/record

* 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


RTMP 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;

        # 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;

            # 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;

        }

    }
}


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.

Description
NGINX-based Media Streaming Server
Readme BSD-2-Clause 4.4 MiB
Languages
C 98.3%
XSLT 1.4%
HTML 0.3%