Go to file
Roman Arutyunyan e060e717f3 updated tests
2012-04-17 15:12:45 +04:00
doc implement ext timestamp fix to make flash client recognize 32-bit timestamps 2012-03-22 01:00:52 +04:00
test updated tests 2012-04-17 15:12:45 +04:00
AUTHORS improved frame timing & added meta files 2012-03-20 03:52:39 +04:00
config added more flags & extended types to AMF 2012-03-30 19:07:14 +04:00
LICENSE improved frame timing & added meta files 2012-03-20 03:52:39 +04:00
ngx_rtmp.c implemented amf_create & fixed memory keak 2012-04-05 14:58:10 +04:00
ngx_rtmp.h added more features to recorder 2012-04-11 17:07:06 +04:00
ngx_rtmp_access_module.c reimplemented amf0 callbacks from arrays to chains to enable async processing 2012-03-27 20:26:43 +04:00
ngx_rtmp_amf.c object & mixed_array are now compatible 2012-04-14 00:34:43 +04:00
ngx_rtmp_amf.h added more flags & extended types to AMF 2012-03-30 19:07:14 +04:00
ngx_rtmp_cmd_module.c added transaction support to RTMP connect command 2012-04-15 22:47:50 +04:00
ngx_rtmp_cmd_module.h added transaction support to RTMP connect command 2012-04-15 22:47:50 +04:00
ngx_rtmp_core_module.c implemented chunk size change 2012-04-05 21:28:41 +04:00
ngx_rtmp_handler.c implemented deferred session close 2012-04-08 01:44:57 +04:00
ngx_rtmp_live_module.c added more features to recorder 2012-04-11 17:07:06 +04:00
ngx_rtmp_netcall_module.c created netcall log to escape crash at the end of detached netcakk 2012-04-15 22:42:32 +04:00
ngx_rtmp_netcall_module.h added forcing detached netcalls when handler is NULL 2012-04-12 21:18:15 +04:00
ngx_rtmp_notify_module.c added forcing detached netcalls when handler is NULL 2012-04-12 21:18:15 +04:00
ngx_rtmp_receive.c implemented chunk size change 2012-04-05 21:28:41 +04:00
ngx_rtmp_record_module.c minor fixes 2012-04-12 08:12:15 +04:00
ngx_rtmp_send.c fixed memleak in AMF sender 2012-04-07 22:59:25 +04:00
ngx_rtmp_shared.c implemented frame dropping 2012-03-18 17:09:19 +04:00
README updated README with new record directives 2012-04-12 07:58:02 +04:00
TODO updated README & TODO 2012-04-09 15:59:12 +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


Note the module does not share data between workers
and only works in one-worker mode. 


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

        max_buf 1M;

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

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

            # record 10 video keyframes (no audio) every 2 minutes
            record keyframes;
            record_path /tmp/vc;
            record_max_frames 10;
            record_interval 2m;

            # Async notify about an flv recorded
            on_record_done http://localhost:8080/record_done;

        }

    }
}