Giter VIP home page Giter VIP logo

nginx-rtmp-module's People

Contributors

aminvakil avatar arut avatar asticode avatar benmcmeen avatar bryan-stripe avatar carbon198 avatar chriswiggins avatar cryol avatar diegostamigni avatar eutychus avatar heftig avatar itpp16 avatar itsgg avatar jbochi avatar jeffreywescott avatar mainyaa avatar mattpepin avatar nl0 avatar petergeneric avatar premultiply avatar renevolution avatar rocfang avatar sergey-dryabzhinsky avatar southernsun avatar ssamjh avatar steelywing avatar stvad avatar trurlmcbyte avatar z411 avatar zotanmew avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

nginx-rtmp-module's Issues

Fallback sources for pull ... static

Hi,
First I would say that I am appreciate the effort to keep this project going. Thank you.

pull rtmp://remoteserver1 name=streamname live=1 static;
Can I somehow make it try another server if remoteserver1 goes down?

A syntax like this could be cool:
pull rtmp://remoteserver1|rtmp://remoteserver2 name=streamname live=1 static;

If not how can I make nginx exit when remoteserver1 is down so I can patch the nginx configuration to use remoteserver2?

Cheers

rtmp stream doesn't show after some time after broadcast start

Стрим воспроизводится если подключиться в самом начале трансляции, либо до ее начала. В этом случае все нормально работает на всем протяжении трансляции.

Если запустить воспроизведение позже, то нет ни картинки, ни звука.

настройки rtmp.conf:

application live {
    live on;
}

Для трансляции используется OBS, воспроизведение - Chrome/Firefox и videojs

Пробовал https://github.com/ossrs/go-oryx - таких проблем не наблюдается, потому вряд ли проблема в OBS или браузерах/videojs

Can't compile on RedHat 6.6 (ngx_rtmp_notify_module)

I've tried with the new latest version (1.1.7.8) but here's another one like #28 :

> make
make -f objs/Makefile
make[1]: Entering directory `/home/admin/nginx'
cc -c -pipe  -O -W -Wall -Wpointer-arith -Wno-unused-parameter -Werror -g  -Inginx-rtmp-module-1.1.7.8  -I src/core -I src/event -I src/event/modules -I src/os/unix -I objs -I src/http -I src/http/modules -I src/mail \
                -o objs/addon/nginx-rtmp-module-1.1.7.8/ngx_rtmp_notify_module.o \
                nginx-rtmp-module-1.1.7.8/ngx_rtmp_notify_module.c
nginx-rtmp-module-1.1.7.8/ngx_rtmp_notify_module.c: In function ‘ngx_rtmp_notify_publish_handle’:
nginx-rtmp-module-1.1.7.8/ngx_rtmp_notify_module.c:1189: error: too few arguments to function ‘ngx_rtmp_send_close_method’
make[1]: *** [objs/addon/nginx-rtmp-module-1.1.7.8/ngx_rtmp_notify_module.o] Error 1
make[1]: Leaving directory `/home/admin/nginx'
make: *** [build] Error 2

Thanks!

Fix HLS/DASH old playlists cleanup

Currently it's uses strange logic for cleanup: hls/dash files and playlists removed if file mtime + playlist_length/500 less than current time.

WTF?

It must be mtime + playlist_lenth - fragment_lenth + 1.

Nope. It's ok, almost. There is a time in msec.

Worker crashes while using pull when stats page is opened

I have my nginx 1.9.10 compiled with the following arguments:

--prefix=/usr/local/nginx --sbin-path=/usr/sbin/nginx --conf-path=/etc/nginx/nginx.conf --pid-path=/var/run/nginx.pid --lock-path=/var/lock/nginx.lock --error-log-path=/var/log/nginx/error.log --http-log-path=/var/log/nginx/access.log --user=www-data --group=www-data --http-client-body-temp-path=/var/tmp/nginx/client/ --http-proxy-temp-path=/var/tmp/nginx/proxy/ --http-fastcgi-temp-path=/var/tmp/nginx/fcgi/ --with-ipv6 --without-http_uwsgi_module --without-http_scgi_module --with-http_flv_module --with-http_mp4_module --with-http_gzip_static_module --with-http_ssl_module --with-http_v2_module --with-http_stub_status_module --with-http_xslt_module --with-http_realip_module --add-module=modules/headers-more-nginx-module --add-module=modules/nginx-rtmp-module

And the following config:

worker_processes 1;
worker_rlimit_nofile 16384;

pid        /var/run/nginx.pid;
error_log  /var/log/nginx/error.log debug;

events {
    worker_connections 8192;
    use                epoll;
}

http {
    include       mime.types;
    default_type  application/octet-stream;

    variables_hash_max_size       1024;
    map_hash_max_size             2048;
    server_names_hash_bucket_size 128;
    types_hash_max_size           1024;

    access_log /var/log/nginx/access.log;
    charset UTF-8;

    sendfile               on;
    tcp_nopush             on;
    tcp_nodelay            off;
    server_tokens          off;
    underscores_in_headers on;

    sendfile_max_chunk          1m;
    keepalive_timeout           30;
    client_max_body_size        32m;
    client_body_buffer_size     1m;
    client_body_timeout         10;
    client_header_timeout       10;
    large_client_header_buffers 4 16k;
    send_timeout                10;
    reset_timedout_connection   on;

    open_file_cache          max=2048 inactive=10s;
    open_file_cache_valid    30s;
    open_file_cache_min_uses 4;
    open_file_cache_errors   on;

    gzip              on;
    gzip_vary         on;
    gzip_disable      "MSIE [1-6]\.(?!.*SV1)";
    gzip_proxied      expired no-cache no-store private auth;
    gzip_http_version 1.1;
    gzip_comp_level   3;
    gzip_min_length   256;
    gzip_buffers      16 8k;
    gzip_types        text/plain text/css text/xml
                      application/javascript application/json
                      application/xhtml+xml application/xml+rss;

    fastcgi_buffering off;

    ssl_session_cache         shared:SSL:20m;
    ssl_session_timeout       10m;
    ssl_protocols             TLSv1 TLSv1.1 TLSv1.2;
    ssl_prefer_server_ciphers on;
    ssl_ciphers               ECDH+AESGCM:DH+AESGCM:ECDH+AES256:DH+AES256:ECDH+AES128:DH+AES:ECDH+3DES:DH+3DES:RSA+AESGCM:RSA+AES:RSA+3DES:!aNULL:!MD5:!DSS;
    ssl_buffer_size           8k;
    ssl_dhparam               /etc/nginx/dhparam.pem;

    add_header "X-Served-By" "faraday";

    server {
        listen 80 default_server;
        listen [::]:80 default_server;
        listen 443 ssl default_server;
        listen [::]:443 ssl default_server;

        ssl_certificate     /usr/local/nginx/cert/default.crt;
        ssl_certificate_key /usr/local/nginx/cert/default.key;

        error_page 404 /404.html;

        #location / {
        #    access_log off;
        #    return 404;
        #}

        location = /404.html {
            root /usr/local/nginx/html/;
            log_not_found off;
            access_log off;
        }
    }

    server {
        listen 80;
        listen 443 ssl;

        ssl_certificate     /etc/letsencrypt/live/faraday.domain.com/fullchain.pem;
        ssl_certificate_key /etc/letsencrypt/live/faraday.domain.com/privkey.pem;

        server_name faraday.domain.com;
    }

    server {
        listen 80;
        listen 443 ssl;

        ssl_certificate     /etc/letsencrypt/live/faraday.domain.com/fullchain.pem;
        ssl_certificate_key /etc/letsencrypt/live/faraday.domain.com/privkey.pem;

        server_name rtmp.domain.com live.domain.com;

        location /dash {
            root /tmp;

            more_set_headers "Cache-Control: no-cache";
            more_set_headers "Access-Control-Allow-Origin: *";

            types {
                video/mp4    m4v;
                audio/mp4    m4a;
            }
        }
    }

    server {
        listen 8080;

        location /nginx_status {
            stub_status on;
            access_log  off;
        }

        location /rtmp_status {
            rtmp_stat all;
            rtmp_stat_stylesheet rtmp_status.xsl;
        }

        location /rtmp_status.xml {
            rtmp_stat all;
        }

        location /rtmp_status.json {
            proxy_pass http://127.0.0.1:8080/rtmp_status.xml;
            xslt_types "*";
            xslt_stylesheet /usr/local/nginx/html/rtmp_status_json.xsl;
            more_set_headers 'Content-Type: application/json';
        }

        location /rtmp_status.xsl {
            root /usr/local/nginx/html;
        }
    }
}

rtmp {
    server {
        listen 1935;
        chunk_size 4096;

        application stream {
            live on;
            record off;

            pull rtmp://stream.domain.com:1935/stream;

            dash on;
            dash_path /tmp/dash;
            dash_fragment 2s;
            dash_playlist_length 10s;


            allow play all;
            allow publish all;
        }
    }
}

Streaming to the other server and having it pulled dynamically on this server works fine, until a request to /rtmp_status is made on the pulling server, then the following happens:

2016/01/28 23:29:13 [notice] 2665#0: using the "epoll" event method
2016/01/28 23:29:13 [notice] 2665#0: nginx/1.9.10
2016/01/28 23:29:13 [notice] 2665#0: built by gcc 4.9.2 (Debian 4.9.2-10)
2016/01/28 23:29:13 [notice] 2665#0: OS: Linux 3.16.0-4-amd64
2016/01/28 23:29:13 [notice] 2665#0: getrlimit(RLIMIT_NOFILE): 1024:4096
2016/01/28 23:29:13 [notice] 2666#0: start worker processes
2016/01/28 23:29:13 [notice] 2666#0: start worker process 2667
2016/01/28 23:29:13 [notice] 2666#0: start cache manager process 2668
2016/01/28 23:29:31 [info] 2667#0: *2 client connected 'xxx.xxx.xxx.xxx'
2016/01/28 23:29:31 [info] 2667#0: *2 connect: app='stream' args='' flashver='WIN 20,0,0,286' swf_url='https://stream.domain.com/jwplayer-7.2.4/jwplayer.flash.swf' tc_url='rtmp://live.domain.com/stream/' page_url='https://stream.domain.com/teststream' acodecs=3575 vcodecs=252 object_encoding=0, client: xxx.xxx.xxx.xxx, server: 0.0.0.0:1935
2016/01/28 23:29:32 [info] 2667#0: *2 createStream, client: xxx.xxx.xxx.xxx, server: 0.0.0.0:1935
2016/01/28 23:29:32 [info] 2667#0: *2 play: name='teststream' args='' start=0 duration=0 reset=0 silent=0, client: xxx.xxx.xxx.xxx, server: 0.0.0.0:1935
2016/01/28 23:29:32 [debug] 2667#0: *2 log: ngx_rtmp_log_play
2016/01/28 23:29:32 [debug] 2667#0: *2 log: ngx_rtmp_log_play: next
2016/01/28 23:29:32 [debug] 2667#0: *2 notify: ngx_rtmp_notify_play
2016/01/28 23:29:32 [debug] 2667#0: *2 notify: ngx_rtmp_notify_play: next
2016/01/28 23:29:32 [debug] 2667#0: *2 exec: ngx_rtmp_exec_play
2016/01/28 23:29:32 [debug] 2667#0: *2 exec: ngx_rtmp_exec_play: next
2016/01/28 23:29:32 [debug] 2667#0: *2 relay: ngx_rtmp_relay_play
2016/01/28 23:29:32 [info] 2667#0: *2 relay: create pull name='teststream' app='' playpath='' url='stream.domain.com:1935/stream', client: xxx.xxx.xxx.xxx, server: 0.0.0.0:1935
2016/01/28 23:29:32 [debug] 2667#0: *2 relay: ngx_rtmp_relay_play: next
2016/01/28 23:29:32 [debug] 2667#0: *2 play: ngx_rtmp_play_play
2016/01/28 23:29:32 [debug] 2667#0: *2 play: ngx_rtmp_play_play: next
2016/01/28 23:29:32 [debug] 2667#0: *2 live: ngx_rtmp_live_play
2016/01/28 23:29:32 [debug] 2667#0: *2 live: ngx_rtmp_live_play: next
2016/01/28 23:29:32 [debug] 2667#0: *2 access: ngx_rtmp_access_play
2016/01/28 23:29:32 [debug] 2667#0: *2 access: ngx_rtmp_access_play: next
2016/01/28 23:29:32 [debug] 2667#0: *2 cmd: ngx_rtmp_cmd_play
2016/01/28 23:29:42 [notice] 2666#0: signal 17 (SIGCHLD) received
2016/01/28 23:29:42 [alert] 2666#0: worker process 2667 exited on signal 11
2016/01/28 23:29:42 [notice] 2666#0: start worker process 2673
2016/01/28 23:29:42 [notice] 2666#0: signal 29 (SIGIO) received
2016/01/28 23:29:50 [info] 2673#0: *5 client connected 'xxx.xxx.xxx.xxx'
2016/01/28 23:29:50 [info] 2673#0: *5 connect: app='stream' args='' flashver='WIN 20,0,0,286' swf_url='https://stream.domain.com/jwplayer-7.2.4/jwplayer.flash.swf' tc_url='rtmp://live.domain.com/stream/' page_url='https://stream.domain.com/teststream' acodecs=3575 vcodecs=252 object_encoding=0, client: xxx.xxx.xxx.xxx, server: 0.0.0.0:1935
2016/01/28 23:29:50 [info] 2673#0: *5 createStream, client: xxx.xxx.xxx.xxx, server: 0.0.0.0:1935
2016/01/28 23:29:50 [info] 2673#0: *5 play: name='teststream' args='' start=0 duration=0 reset=0 silent=0, client: xxx.xxx.xxx.xxx, server: 0.0.0.0:1935
2016/01/28 23:29:50 [debug] 2673#0: *5 log: ngx_rtmp_log_play
2016/01/28 23:29:50 [debug] 2673#0: *5 log: ngx_rtmp_log_play: next
2016/01/28 23:29:50 [debug] 2673#0: *5 notify: ngx_rtmp_notify_play
2016/01/28 23:29:50 [debug] 2673#0: *5 notify: ngx_rtmp_notify_play: next
2016/01/28 23:29:50 [debug] 2673#0: *5 exec: ngx_rtmp_exec_play
2016/01/28 23:29:50 [debug] 2673#0: *5 exec: ngx_rtmp_exec_play: next
2016/01/28 23:29:50 [debug] 2673#0: *5 relay: ngx_rtmp_relay_play
2016/01/28 23:29:50 [info] 2673#0: *5 relay: create pull name='teststream' app='' playpath='' url='stream.domain.com:1935/stream', client: xxx.xxx.xxx.xxx, server: 0.0.0.0:1935
2016/01/28 23:29:50 [debug] 2673#0: *5 relay: ngx_rtmp_relay_play: next
2016/01/28 23:29:50 [debug] 2673#0: *5 play: ngx_rtmp_play_play
2016/01/28 23:29:50 [debug] 2673#0: *5 play: ngx_rtmp_play_play: next
2016/01/28 23:29:50 [debug] 2673#0: *5 live: ngx_rtmp_live_play
2016/01/28 23:29:50 [debug] 2673#0: *5 live: ngx_rtmp_live_play: next
2016/01/28 23:29:50 [debug] 2673#0: *5 access: ngx_rtmp_access_play
2016/01/28 23:29:50 [debug] 2673#0: *5 access: ngx_rtmp_access_play: next
2016/01/28 23:29:50 [debug] 2673#0: *5 cmd: ngx_rtmp_cmd_play
2016/01/28 23:31:13 [notice] 2666#0: signal 17 (SIGCHLD) received
2016/01/28 23:31:13 [alert] 2666#0: worker process 2673 exited on signal 11
2016/01/28 23:31:13 [notice] 2666#0: start worker process 2688
2016/01/28 23:31:13 [notice] 2666#0: signal 29 (SIGIO) received

Notify module: pass more client data in notifications

Need to pass more client data on events:

  • on_connect - need to pass some token or other param to auth.
  • on_disconnect - disconnected client addr needed. If possible.
  • on_play - need token to auth
  • on_publish - need token to auth

This 'token' must be passed through RTMP params. May be like this:

  • connect with token param, token saved in client session
  • play & publish - use saved token
  • update - use saved token. And must disconnect / redirect on 4xx/3xx.

Sould split this in several pull requests.

DASH: low dash_playlist_length makes cleanup delete init and manifest files

Trying to stream DASH I found out that the [streamname]-init file gets deleted when having a low dash_playlist_length set

it does not happen with the default of 30s.

my config on nginx 1.9.9

        application live2 {
            live on;
            dash on;
            dash_path /mnt/ramdisk/dash;
            dash_fragment 2s;
            dash_playlist_length 4s;
        }

the manifest and init file vanish on every other cleanup. I couldn't really tell when, it's not happening all the time.
on the next chunk the manifest file gets recreated, but the init file stays deleted.
no one can connect to the stream afterwards anymore because of it.

rtmp connection args is not passed to hls

ngx_rtmp_hls_publish(ngx_rtmp_session_t *s, ngx_rtmp_publish_t *v)
in this function v.args always are empty, even they are passed when connected to server.
trying access s.args makes crash.

How can get args, swf_url,flashver inside this function?
Thanks

missing metadata breaks flash players

I've experienced some flash players (jwplayer and videojs in this case) acting up because of missing metadata. The players no longer know the size of the video and display it incorrectly.

Checking with ffplay seems like metadata no longer is being sent from the server.

I tested it with 63c87e8 where it worked and metadata got sent.

With f344f4a I did not get any metadata and players started acting up.

This might be a bug in the players though, I'm not sure.

Here is the ffplay output of the old build

Metadata:  :  0.000 fd=   0 aq=    0KB vq=    0KB sq=    0B f=0/0
  Server                NGINX RTMP (github.com/arut/nginx-rtmp-module)
  width                 1280.00
  height                720.00
  displayWidth          1280.00
  displayHeight         720.00
  duration              0.00
  framerate             24.00
  fps                   24.00
  videodatarate         1100.00
  videocodecid          0.00
  audiodatarate         160.00
  audiocodecid          0.00
Input #0, live_flv, from 'rtmp://192.168.3.200/live/test':f=0/0
  Metadata:
    Server          : NGINX RTMP (github.com/arut/nginx-rtmp-module)
    displayWidth    : 1280
    displayHeight   : 720
    fps             : 24
    profile         :
    level           :
  Duration: 00:00:00.00, start: 2.530000, bitrate: N/A
    Stream #0:0: Video: h264 (High), yuv420p, 1280x720, 1126 kb/s, 24.42 fps, 24 tbr, 1k tbn, 48 tbc
    Stream #0:1: Audio: aac (LC), 44100 Hz, stereo, fltp, 163 kb/s
[h264 @ 00000176ae232020] mmco: unref short failure
  14.58 A-V: -0.008 fd=   0 aq=    4KB vq=  148KB sq=    0B f=0/0

and from the new build without metadata appearing

[flv @ 000001f419a71d20] video stream discovered after head already parsed
[h264 @ 000001f419aabcc0] co located POCs unavailable
[h264 @ 000001f419aabcc0] mmco: unref short failure
Input #0, flv, from 'rtmp://192.168.3.200/live/test':  0B f=0/0
  Duration: N/A, start: 84.380000, bitrate: N/A
    Stream #0:0: Audio: aac (LC), 44100 Hz, stereo, fltp
    Stream #0:1: Video: h264 (High), yuv420p, 1280x720, 24.42 fps, 24 tbr, 1k tbn, 48 tbc
[h264 @ 000001f41aa3d020] co located POCs unavailable
[h264 @ 000001f41aa3d4c0] mmco: unref short failureq=    0B f=0/0
[h264 @ 000001f41af17780] co located POCs unavailable
  87.73 A-V:    nan fd=   0 aq=    7KB vq=    0KB sq=    0B f=0/0

hotlink protection for hls

Would be great to have some sort of hotlink protection for hls links, so a m3u8 link is only valid for a certain period of time, similar to what wowza or nimble streamer have.

$name manipulation

So in my directive, I publish a stream with the following syntax,

rtmp://localhost/broadcast/sudovoodoo--1

In my application, I need to chop off the "-1" from the name so that subscribers dont see that increment (which is used for recording). Is there a way to change the $name variable once its been set, or is there away to dynamically alter it?

Limits per HLS/DASH location

Is there a known way to limit the connections and/or the bandwidth > per < HLS/DASH location?
Would be an great function to provide different configs on one nginx.

Example:

        location /hls-1 {
            .....

            limit_current_connnections 1000;
            limit_current_bandwidth 10g;

        }
        location /hls-2 {
            .....

            limit_current_connnections 10;
            limit_current_bandwidth 100m;

        }

Intermittent HLS playback of live streams

First off, thank you for your continued contribution to the nginx-rtmp-module repo! You should consider putting together an official nginx-rtmp-module-redux or something!

I am in the process of building out an implementation of your fork of the module to flow like so:

Consume RTMP via broadcasting clients ->
Handle stream coming into RTMP live app and direct it to ffmpeg ->
Output to hls app with three HLS variants, produced by ffmpeg ->
ngx_pagespeed module using memcached handles Amazon CloudFront CDN integration ->
.ts files are caching for 5 seconds, while m3u8 files are set to no-cache (3s segment length, 9s playlist length) ->
User/client consumes the HLS "live" stream via the AWS CloudFront CDN endpoint.

The problem I am encountering is that whether or not I am hitting the nginx server origin directly OR the CloudFront CDN, the hls stream has intermittent playback. The stream will either stop and start attempting to buffer and ultimately fail (the segment files and playlist files still seem to be generated appropriately on the local nginx server) or they will jitter after a pause in playback.

Does anyone have any suggestions for resolving this?

Nginx version: 1.7.11
Nginx RTMP module version: This fork's master, currently at: 1.1.7.10

ffmpeg version info:
ffmpeg version N-78299-gf021030 Copyright (c) 2000-2016 the FFmpeg developers built with gcc 4.8 (Ubuntu 4.8.4-2ubuntu1~14.04) configuration: --prefix=/home/ubuntu/ffmpeg_build --pkg-config-flags=--static --extra-cflags=-I/home/ubuntu/ffmpeg_build/include --extra-ldflags=-L/home/ubuntu/ffmpeg_build/lib --bindir=/home/ubuntu/bin --enable-gpl --enable-libass --enable-libfdk-aac --enable-libfreetype --enable-libmp3lame --enable-libopus --enable-libtheora --enable-libvorbis --enable-libvpx --enable-libx264 --enable-libx265 --enable-nonfree --enable-opengl --enable-openssl --enable-libxvid --enable-librtmp --enable-version3 libavutil 55. 17.100 / 55. 17.100 libavcodec 57. 24.101 / 57. 24.101 libavformat 57. 24.100 / 57. 24.100 libavdevice 57. 0.101 / 57. 0.101 libavfilter 6. 28.100 / 6. 28.100 libswscale 4. 0.100 / 4. 0.100 libswresample 2. 0.101 / 2. 0.101 libpostproc 54. 0.100 / 54. 0.100

Here is a refined copy of my nginx.conf:

worker_processes  1;

events {
    worker_connections  1024;
}

# RTMP configuration
rtmp {
    server {
        listen 1935;
        chunk_size 4096;

        # LIVE / Records all streamers to FLV and MP4 / Notify Method:  GET
        application live {
            live on;
            record all;
            record_path /tmp/vod/;
            # Added this to output mp4 vod
            exec_record_done /home/ubuntu/bin/ffmpeg -y -i $path -c copy -copyts /tmp/vod/$basename.mp4;
            allow publish all;
            allow play all;
            meta copy;
            sync 100ms;
            interleave on;
            wait_key on;
            wait_video on;
            drop_idle_publisher 15s;
            notify_method get;
            publish_notify on;
            idle_streams on;

            # FFMPEG execution call for splitting RTMP single stream to three HLS output streams
            # enclosed in a single HLS playlist with three bitrates.
            # Scale:                                      480,  720,  960
            # Video Codec:  libx264    - Video Bitrates:  256k, 768k, 1024k
            # Audio Codec:  libfdk_aac - Audio Bitrates:  32k,  96k,  128k
            # Outputs .ts and .m3u8 files actively.
            # Outputs .png video stream snapshot first second and every 60 seconds following
            exec /home/ubuntu/bin/ffmpeg -i rtmp://localhost:1935/live/$name
              -c:v libx264 -c:a libfdk_aac -b:v 256k -b:a 32k -vf "scale=480:trunc(ow/a/2)*2" -tune zerolatency -preset ultrafast -crf 23 -g 60 -maxrate 3000k -bufsize 4000k -keyint_min 60 -sc_threshold 0 -f flv rtmp://localhost/show/$name_low
              -c:v libx264 -c:a libfdk_aac -b:v 768k -b:a 96k -vf "scale=720:trunc(ow/a/2)*2" -tune zerolatency -preset ultrafast -crf 23 -g 60 -maxrate 3000k -bufsize 4000k -keyint_min 60 -sc_threshold 0 -f flv rtmp://localhost/show/$name_mid
              -c:v libx264 -c:a libfdk_aac -b:v 1024k -b:a 128k -vf "scale=960:trunc(ow/a/2)*2" -tune zerolatency -preset ultrafast -crf 23 -g 60 -maxrate 3000k -bufsize 4000k -keyint_min 60 -sc_threshold 0 -f flv rtmp://localhost/show/$name_hi
              -vf fps=1/30 -vcodec png /tmp/thumbnails/$name.png;
        }

        # SHOW / Outputs all HLS streams originating from LIVE
        application show {
            # Turn LIVE on for this app
            live on;

            # Turn HLS on for this app
            hls on;

            # Allow everyone to publish (if they pass our stream validation)
            allow publish all;

            # Allow everyone to playback (really only for the server, specification to come)
            allow play all;

            # HLS segment and playlist generation location on local server
            hls_path /tmp/hls;

            # HLS fragment slicing method
            hls_fragment_slicing aligned;

            # HLS .ts fragment length
            hls_fragment 3s;

            # HLS .m3u8 playlist length
            hls_playlist_length 9s;

            # HLS sync
            hls_sync 100ms;

            # Will HLS use nested directories:  on | off
            hls_nested off;

            # Stream META method: copy | on | off
            meta copy;

            # HLS pickup of stream where it left off
            # hls_continuous on;

            # HLS stream type:  live | event
            hls_type live;

            # HLS base url used to reference all .ts and .m3u8 files in the playlists
            hls_base_url https://<CLOUDFRONT_CDN>/show/hls/;

            # HLS Variants, dictating master m3u8 playlist file
            hls_variant _low BANDWIDTH=160000;
            hls_variant _mid BANDWIDTH=320000;
            hls_variant _hi  BANDWIDTH=640000;
        }
    }
}

http {
    include       mime.types;
    default_type  application/octet-stream;

    access_log off;
    sendfile on;
    sendfile_max_chunk 512k;

    aio threads;

    # Turn Google's ngx_pagespeed on
    pagespeed on;

    # Use the Native NGINX fetcher
    pagespeed UseNativeFetcher on;

    # Use Google DNS resolver
    resolver 8.8.8.8;

    # PageSpeed's file cache path on the local server
    pagespeed FileCachePath /var/cache/pagespeed/;

    # PageSpeed will report a message in the error log at level "error" for every URL fetch in
    # flight when the HTTP stack encounters a system error
    pagespeed ListOutstandingUrlsOnError on;

    # Enable ForceCaching
    pagespeed ForceCaching on;

    # Set pagespeed's global admin and stat endpoints
    pagespeed GlobalAdminPath /pagespeed_global_admin;
    pagespeed GlobalStatisticsPath /ngx_pagespeed_global_statistics;

    # Setup acme.com SSL certificate
    ssl_certificate /usr/local/nginx/ssl/acme.com.crt;
    ssl_certificate_key /usr/local/nginx/ssl/acme.com.key;

    # SSL session cache
    ssl_session_cache    shared:SSL:10m;

    # SSL session timeout
    ssl_session_timeout  10m;

    # SSL usable protocols and versions
    ssl_protocols  SSLv3 TLSv1 TLSv1.1 TLSv1.2;

    # SSL usable ciphers
    ssl_ciphers ECDH+AESGCM:ECDH+AES256:ECDH+AES128:DH+3DES:RSA+3DES:AES128-SHA:!ADH:!AECDH:!MD5;

    # Prefer server ciphers for SSL
    ssl_prefer_server_ciphers   on;

    # Redirect any request on port 80 to 443
    server {
        listen 80 default_server;
        server_name acme.com streams-dev.acme.com;

        rewrite ^ https://$host$request_uri permanent;
        add_header Strict-Transport-Security max-age=604800;
    }

    # HTTP server required to serve the player and HLS fragments
    server {
        listen 443 default_server ssl;
        server_name acme.com streams-dev.acme.com;

        # PageSpeed
        pagespeed Domain "http://acme.com";
        pagespeed Domain "https://acme.com";
        pagespeed Domain "http://streams-dev.acme.com";
        pagespeed Domain "https://streams-dev.acme.com";
        pagespeed Domain "http://<CLOUDFRONT_CDN>";
        pagespeed Domain "https://<CLOUDFRONT_CDN>";
        pagespeed MapOriginDomain "https://streams-dev.acme.com" "https://<CLOUDFRONT_CDN>";
        pagespeed MapRewriteDomain  "https://<CLOUDFRONT_CDN>" "https://streams-dev.acme.com";
        pagespeed CacheFragment "hls-dev_";
        pagespeed RewriteLevel CoreFilters;
        pagespeed EnableFilters rewrite_domains,remove_comments,collapse_whitespace;

        # Speed up PageSpeed by storing it in memcached
        pagespeed MemcachedThreads 1;
        pagespeed MemcachedServers "localhost:11211";

        pagespeed SslCertDirectory /usr/local/nginx/ssl/;

        pagespeed EnableCachePurge on;

        location /ngx_pagespeed_statistics { allow 127.0.0.1; deny all; }
        location /ngx_pagespeed_global_statistics { allow 127.0.0.1; deny all; }
        location /ngx_pagespeed_message { allow 127.0.0.1; deny all; }
        location /pagespeed_console { allow 127.0.0.1; deny all; }
        location ~ ^/pagespeed_admin { allow 127.0.0.1; deny all; }
        location ~ ^/pagespeed_global_admin { allow 127.0.0.1; deny all; }

        pagespeed StatisticsPath /ngx_pagespeed_statistics;
        pagespeed MessagesPath /ngx_pagespeed_message;
        pagespeed ConsolePath /pagespeed_console;
        pagespeed AdminPath /pagespeed_admin;

        # Ensure requests for pagespeed optimized resources go to the pagespeed handler
        # and no extraneous headers get set.
        location ~ "\.pagespeed\.([a-z]\.)?[a-z]{2}\.[^.]{10}\.[^.]+" {
            add_header "" "";
        }
        location ~ "^/pagespeed_static/" { }
        location ~ "^/ngx_pagespeed_beacon$" { }

        # Lower-casing HTML element
        pagespeed LowercaseHtmlNames on;

        # Optimize RewriteLevel for bandwidth
        # pagespeed RewriteLevel OptimizeForBandwidth;

        # Preserve URL Relativity - PageSpeed will keep URLs the way they were found
        pagespeed PreserveUrlRelativity on;

        more_set_headers "Access-Control-Allow-Origin: *";
        more_set_headers "Access-Control-Allow-Credentials: true";
        more_set_headers -t application/vnd.apple.mpegurl 'Cache-Control: public, no-cache';
        more_set_headers -t application/x-mpegURL 'Cache-Control: public, no-cache';
        more_set_headers -t video/mp2t 'Cache-Control: public, min-age:0, max-age=5';
        more_set_headers -t text/html 'Cache-Control: public, min-age:0, max-age=300';
        more_set_headers -t image/jpeg 'Cache-Control: public, min-age:10 max-age=300';
        more_set_headers -t image/png 'Cache-Control: public, min-age:55 max-age=65';
        more_set_headers -t text/css 'Cache-Control: public, min-age:10, max-age=3600';
        more_set_headers -t application/x-shockwave-flash 'Cache-Control: public, min-age:10, max-age=3600';

        location / {
            root html;
            add_header X-Cache-Status $upstream_cache_status;
        }

        location /show {
            types {
                application/vnd.apple.mpegurl m3u8;
                video/mp2t ts;
                text/x-cross-domain-policy xml;
                image/png png;
                video/mp4 mp4;
            }

            alias /tmp;
            add_header X-Cache-Status $upstream_cache_status;
        }

        location /stat {
            rtmp_stat all;
            rtmp_stat_stylesheet stat.xsl;
        }

        location /stat.xsl {
            root html;
        }

        location /rtmp/control {
            rtmp_control all;
        }

        location = /favicon.ico {
            access_log off;
            error_log off;
            add_header Cache-Control public;
            add_header expires max;
        }
    }
}

Also, I should note that I just recently added threading in an attempt to speed things up:

access_log off;
sendfile on;
sendfile_max_chunk 512k;
aio threads;

NGINX Compile config:

./configure --with-http_ssl_module \
            --with-http_sub_module \
            --with-http_dav_module \
            --with-http_flv_module \
            --with-http_mp4_module \
            --with-http_gunzip_module \
            --with-http_gzip_static_module \
            --with-http_secure_link_module \
            --with-http_auth_request_module \
            --with-file-aio \
            --with-http_spdy_module \
            --with-pcre-jit \
            --with-http_stub_status_module \
            --with-ipv6 \
            --with-threads \
            --add-module=../sergey-rtmp-nginx \
            --add-module=../headers-more-nginx-module-0.28 \
            --add-module=../ngx_pagespeed

Does anyone have any recommendations on this?

Thank you for your time!

gop cache

Hello! Do you have plans to implement gop cache in this fork ?

new notify events

it will be great if two new events will be added: on_play_update and on_publish_update

errors on installation with wheezy

/home/build/nginx-rtmp-module-master/ngx_rtmp_live_module.c: In function ‘ngx_rtmp_live_data’:
/home/build/nginx-rtmp-module-master/ngx_rtmp_live_module.c:1059:37: error: variable ‘msg_type’ set but not used [-Werror=unused-but-set-variable]
cc1: all warnings being treated as errors
make[1]: *** [objs/addon/nginx-rtmp-module-master/ngx_rtmp_live_module.o] Fehler 1
make[1]: Leaving directory /home/build/nginx-1.9.5' make: *** [build] Fehler 2 root@ns374814:/home/build/nginx-1.9.5# make install make -f objs/Makefile install make[1]: Entering directory/home/build/nginx-1.9.5'
cc -c -pipe -O -W -Wall -Wpointer-arith -Wno-unused-parameter -Werror -g -I/home/build/nginx-rtmp-module-master -I src/core -I src/event -I src/event/modules -I src/os/unix -I objs -I src/http -I src/http/modules -I src/http/v2 -I src/mail -I src/stream
-o objs/addon/nginx-rtmp-module-master/ngx_rtmp_live_module.o
/home/build/nginx-rtmp-module-master/ngx_rtmp_live_module.c
/home/build/nginx-rtmp-module-master/ngx_rtmp_live_module.c: In function ‘ngx_rtmp_live_data’:
/home/build/nginx-rtmp-module-master/ngx_rtmp_live_module.c:1059:37: error: variable ‘msg_type’ set but not used [-Werror=unused-but-set-variable]
cc1: all warnings being treated as errors
make[1]: *** [objs/addon/nginx-rtmp-module-master/ngx_rtmp_live_module.o] Fehler 1
make[1]: Leaving directory `/home/build/nginx-1.9.5'
make: *** [install] Fehler 2

nginx 1.9.5
module from master

Instability: clients receiving gibberish after some time

Hello there,

Thank you for trying to continue Roman's efforts for this great RTMP server.
I tried using your fork especially for MP3 support.

What I can say so far:

  • MP3 looks good and stable, running 24/24 streams without issues. Didn't test though on many devices but seems to work properly. Thank you very much for this!
  • EXT-X-PROGRAM-DATE-TIME is not really implemented according to recommendations of https://tools.ietf.org/html/draft-pantos-http-live-streaming-16: "EXT-X-PROGRAM-DATE-TIME tags SHOULD provide millisecond accuracy"
  • EXT-X-PROGRAM-DATE-TIME doesn't work with "hls_continuous on" as it only writes the tag during first session; when continuing, there is nothing implemented and the information is lost.

And the main problem that makes the subject of this topic is that somewhere in your modifications there is a regression at least from stability point of view. Let me explain:
I am using for a long time Roman's main version to stream even 24/24. The setup could be something like: Publisher (FMLE) => NGINX-RTMP => FFMPEG => NGINX-RTMP => HLS (HTTP). It works great with Roman's codebase.
Using your branch though the FFMPEG process crashes randomly with random output like:

frame=42824 fps= 25 q=0.0 q=0.0 q=-1.0 size=   76907kB time=03:08:08.03 bitrate=  55.8kbits/s    
Past duration 0.924995 too large
    Last message repeated 1 times
[NULL @ 0x4260e40] luma_log2_weight_denom 12 is out of range
[flv @ 0x425eae0] Stream discovered after head already parsed
[flv @ 0x425eae0] New video stream 0:3 at pos:333058035 and DTS:11290.2s
[flv @ 0x425eae0] Stream discovered after head already parsed
[flv @ 0x425eae0] New video stream 0:4 at pos:333062118 and DTS:11290.2s
[h264 @ 0x4f8fa80] luma_log2_weight_denom 12 is out of range
[h264 @ 0x4f8fa80] deblocking_filter_idc 3 out of range
[h264 @ 0x4f8fa80] decode_slice_header error 
frame=  504 fps= 23 q=20.0 q=19.0 q=-1.0 size=     927kB time=02:39:25.24 bitrate=   0.8kbits/s    
[flv @ 0x2c96ae0] Stream discovered after head already parsed
[flv @ 0x2c96ae0] New video stream 0:3 at pos:4668671 and DTS:9567.66s
[h264 @ 0x3ade100] concealing 3502 DC, 3502 AC, 3502 MV errors in P frame
*** glibc detected *** /blc/bin/ffmpeg: corrupted double-linked list: 0x0000000002e74b70 ***
...
frame=  391 fps= 24 q=24.0 q=23.0 q=-1.0 size=     764kB time=02:34:48.89 bitrate=   0.7kbits/s    
[flv @ 0x3b23ae0] Stream discovered after head already parsed
[flv @ 0x3b23ae0] Video codec (1) is not implemented. Update your FFmpeg version to the newest one from Git. If the problem still occurs, it means that your file has a feature which has not been implemented.
[flv @ 0x3b23ae0] If you want to help, upload a sample of this file to ftp://upload.ffmpeg.org/incoming/ and contact the ffmpeg-devel mailing list. ([email protected])
[flv @ 0x3b23ae0] New video stream 0:3 at pos:3725795 and DTS:9290.96s 
...

In many cases, I get a segmentation fault.
In order to try isolate the issue, I manually merged Roman's branch and yours. I used from your branch everything from HLS/DASH and minor updates for STAT (port number), and the rest from Roman. It is working perfectly again with MP3 support and so on.
My assumption is that the problem seems to be somewhere in your changes impacting LIVE module as FFMPEG is actually a RTMP client when it crashes, launched using exec_push directive. I can only assume that at a moment in time it gets messages that he can't parse or understand and I've seen you submitted changes around this area.

FFMPEG is a very recent build using internal rtmp support.
I had thought that maybe building with librtmp would be better as maybe your changes require features not build into FFMPEG yet.
Unfortunately, I don't have now the time to continue isolating this and find the culprit as it isn't easy to reproduce. Sometimes the stream could work for yours until a crash. Under heavier load though, it would seem to to crash every few minutes and after a while the entire worker process is stuck at 100% CPU usage, not responding and needs manual restart.
NGINX worker process doesn't seem to crash though, other streams work fine until it could hang. It's just that it's sending data FFMPEG cannot understand.

I think you can try to reproduce if you simply leave FFMPEG running as a live RTMP client for a few hours or a day or two. It should crash at some point. Ideally you should publish with latest FMLE as maybe it has something to do with commands came from FMLE?
Relevant rtmp server options from my configuration:

  timeout       30s;
  ping          30s;
  ping_timeout  15s;
  max_streams   128;
  ack_window    1000000;
  chunk_size    16384;
  max_message   512k;
  buflen        1s;
  respawn_timeout   2s;
  live                on;
  meta                copy;
  interleave          on;
  wait_key            on;
  wait_video          on;
  publish_notify      on;
  drop_idle_publisher 10s;
  sync                100ms;
  idle_streams        off;

Sorry for not having more details, also debug logs would have been a problem because hours of running in debug generates file sizes that for now I can't afford.
For now I am very happy with my custom build but maybe this report helps and I would really like to completely use your branch someday.

Thank you.

HE-AAC SBR breakup when using audio only stream

I'd like to let you know that your branch of nginx-rtmp-module has the same issue as arut's original version. I'm actually using your version when testing this issue.

The gist of it is that when using an audio only stream with HE-AAC from libfdk_aac there's SBR breakup when the player transitions between TS files. When using libaacplus this doesn't happen. The only difference I can see is that nginx-rtmp-module's status screen recognizes libfdk_aac's stream as HE-AAC but recognizes libaacplus's stream as LC-AAC.

There's some more information over here:
arut#521

on_*_done bytes values

Is it easy to add bytes value to those events? I check nginx stat page for that and wasn't editing notify stuff to not break it, but putting send and received bytes count in those events (or only in on_done) will make accounting much easier and accurate.

FFmpeg stagnates if a stream isn't available

I have trouble with FFmpeg if a stream isn't available:

$ ffmpeg -i rtmp://my-nginx-ip:1935/live/unknown -c copy -f rtmp://my-endpoint

A Wowza-Server will return an 404 or something else, so the FFmpeg process dies. But NGINX-RTMP maintains the connection = FFmpeg stagnates and does't close the process.

Is there a known handling? E.g. with "exec_play"?

occasional quiet hls failure, no error logs, ffmpeg process just hangs

originally reported: arut#783

currently using this nginx-rtmp module

more details, latest conf files
https://gist.github.com/victusfate/981fc2336046a14e218092e2454d7f8b

zombie broadcast (broadcast appears connected but server does no processing)
verbose ffmpeg logs - just hangs
https://gist.github.com/victusfate/13d39e55fc647d9693f7470812d1dc6a

for comparison a normally processed stream ( I truncated as soon as it started processing)
https://gist.github.com/victusfate/d1391603520fe5a1509fafa15f22d261

dummy FCPublish functionality

Is there a way to provide dummy response to make a connecting publisher that uses the FCPublish method (and related calls) happy? I have an RTMP encode/stream appliance that gets tripped up when it tries to use the FCPublish method of pushing a stream.

After connecting to the app, is sends a createStream(), gets a blank result as a response _result() and then sends a FCPublish('stream_name') and then that is where everything gets stuck until it eventually sends a FCUnpublish() and a deleteStream()

Not working with nginx 1.9.11 and 1.9.12

I never had trouble upgrading Nginx before, but it seems I found the first version that breaks nginx-rtmp-module: 1.9.11.

After upgrading Nginx to mainline 1.9.11 this evening, my streams broke. All .m3u8 URL's for my HLS-stream give a 404-error. Static pages do work, so Nginx seems to be installed right.

Reverting back to 1.9.10 solves the problem, streams can be downloaded again. Am I the only one experiencing this? Is there some sort of log I could watch? Or try something else to troubleshoot this?

Can't compile on RedHat 6.6 (ngx_rtmp_relay_module)

I can't compile latest version 1.1.7.7 (https://github.com/sergey-dryabzhinsky/nginx-rtmp-module/archive/v1.1.7.7.zip) with Nginx 1.80 (http://hg.nginx.org/nginx/archive/01d52c2b460d.tar.gz) on RHEL 6.6 x86_64 and latest from the original repos works (https://github.com/arut/nginx-rtmp-module/archive/v1.1.7.zip):

> make
make -f objs/Makefile
make[1]: Entering directory `/home/admin/nginx'
cc -c -pipe  -O -W -Wall -Wpointer-arith -Wno-unused-parameter -Werror -g  -Inginx-rtmp-module-1.1.7.7  -I src/core -I src/event -I src/event/modules -I src/os/unix -I objs -I src/http -I src/http/modules -I src/mail \
                -o objs/addon/nginx-rtmp-module-1.1.7.7/ngx_rtmp_relay_module.o \
                nginx-rtmp-module-1.1.7.7/ngx_rtmp_relay_module.c
cc1: warnings being treated as errors
nginx-rtmp-module-1.1.7.7/ngx_rtmp_relay_module.c: In function ‘ngx_rtmp_relay_create_connection’:
nginx-rtmp-module-1.1.7.7/ngx_rtmp_relay_module.c:504: error: value computed is not used
make[1]: *** [objs/addon/nginx-rtmp-module-1.1.7.7/ngx_rtmp_relay_module.o] Error 1
make[1]: Leaving directory `/home/admin/nginx'
make: *** [build] Error 2

publishing broken (SIGCHLD)

I am using nginx 1.9.7 on a raspberry pi 2 on debian jessie.
Publishing appears to be broken. I've tried ffmpeg and OBS, both had connection errors.

It worked with aruts branch (v1.1.7), but I'm not having any luck with this one (v1.1.7.9).

rtmp.conf

rtmp {

    server {

        listen 1935;
        chunk_size 4096;

        application live2 {
                live on;
                dash on;
                dash_path /mnt/ramdisk/dash;
                dash_fragment 10s;
        }

        application live {
                live on;
                record off;
                publish_notify on;
                play_restart on;
        }
    }
}

ffmpeg verbose output:

Opening an output file: rtmp://192.168.3.211/live/test.
Parsing...
Parsed protocol: 0
Parsed host    : 192.168.3.211
Parsed app     : live
RTMP_Connect1, ... connected, handshaking
HandShake: Type Answer   : 03
HandShake: Server Uptime : 49550062
HandShake: FMS Version   : 0.0.0.0
HandShake: Handshaking finished....
RTMP_Connect1, handshaked
RTMP_SendPacket: fd=516, size=89
  0000:  03 00 00 00 00 00 59 14  00 00 00 00               ......Y.....
  0000:  02 00 07 63 6f 6e 6e 65  63 74 00 3f f0 00 00 00   ...connect.?....
  0010:  00 00 00 03 00 03 61 70  70 02 00 04 6c 69 76 65   ......app...live
  0020:  00 04 74 79 70 65 02 00  0a 6e 6f 6e 70 72 69 76   ..type...nonpriv
  0030:  61 74 65 00 05 74 63 55  72 6c 02 00 19 72 74 6d   ate..tcUrl...rtm
  0040:  70 3a 2f 2f 31 39 32 2e  31 36 38 2e 33 2e 32 31   p://192.168.3.21
  0050:  31 2f 6c 69 76 65 00 00  09                        1/live...
Invoking connect
RTMP_ReadPacket: fd=516
RTMP_ReadPacket, failed to read RTMP packet header
rtmp://192.168.3.211/live/test: Unknown error occurred

debug.log

2015/11/29 23:29:45 [debug] 28376#0: epoll: fd:6 ev:0001 d:018EE6A0
2015/11/29 23:29:45 [debug] 28376#0: accept on 0.0.0.0:1935, ready: 0
2015/11/29 23:29:45 [debug] 28376#0: posix_memalign: 01851150:4096 @16
2015/11/29 23:29:45 [debug] 28376#0: *1 accept: 192.168.3.199:55381 fd:12
2015/11/29 23:29:45 [info] 28376#0: *1 client connected '192.168.3.199'
2015/11/29 23:29:45 [debug] 28376#0: *1 setting chunk_size=128
2015/11/29 23:29:45 [debug] 28376#0: *1 posix_memalign: 01852180:4096 @16
2015/11/29 23:29:45 [debug] 28376#0: *1 handshake: start server handshake
2015/11/29 23:29:45 [debug] 28376#0: *1 handshake: allocating buffer
2015/11/29 23:29:45 [debug] 28376#0: *1 recv: fd:12 -1 of 1537
2015/11/29 23:29:45 [debug] 28376#0: *1 recv() not ready (11: Resource temporarily unavailable)
2015/11/29 23:29:45 [debug] 28376#0: *1 event timer add: 12: 60000:1432266987
2015/11/29 23:29:45 [debug] 28376#0: *1 epoll add event: fd:12 op:1 ev:80002001
2015/11/29 23:29:45 [debug] 28376#0: timer delta: 13915
2015/11/29 23:29:45 [debug] 28376#0: worker cycle
2015/11/29 23:29:45 [debug] 28376#0: epoll timer: 60000
2015/11/29 23:29:45 [debug] 28376#0: epoll: fd:12 ev:0001 d:018EE808
2015/11/29 23:29:45 [debug] 28376#0: *1 event timer del: 12: 1432266987
2015/11/29 23:29:45 [debug] 28376#0: *1 recv: fd:12 1537 of 1537
2015/11/29 23:29:45 [debug] 28376#0: *1 epoll del event: fd:12 op:2 ev:00000000
2015/11/29 23:29:45 [debug] 28376#0: *1 handshake: stage 2
2015/11/29 23:29:45 [debug] 28376#0: *1 handshake: peer version=0.0.0.0 epoch=49609406
2015/11/29 23:29:45 [debug] 28376#0: *1 handshake: old-style challenge
2015/11/29 23:29:45 [debug] 28376#0: *1 send: fd:12 1537 of 1537
2015/11/29 23:29:45 [debug] 28376#0: *1 handshake: stage 3
2015/11/29 23:29:45 [debug] 28376#0: *1 handshake: old-style response
2015/11/29 23:29:45 [debug] 28376#0: *1 send: fd:12 1536 of 1536
2015/11/29 23:29:45 [debug] 28376#0: *1 handshake: stage 4
2015/11/29 23:29:45 [debug] 28376#0: *1 recv: fd:12 -1 of 1536
2015/11/29 23:29:45 [debug] 28376#0: *1 recv() not ready (11: Resource temporarily unavailable)
2015/11/29 23:29:45 [debug] 28376#0: *1 event timer add: 12: 60000:1432266988
2015/11/29 23:29:45 [debug] 28376#0: *1 epoll add event: fd:12 op:1 ev:80002001
2015/11/29 23:29:45 [debug] 28376#0: timer delta: 1
2015/11/29 23:29:45 [debug] 28376#0: worker cycle
2015/11/29 23:29:45 [debug] 28376#0: epoll timer: 60000
2015/11/29 23:29:45 [debug] 28376#0: epoll: fd:12 ev:0001 d:018EE808
2015/11/29 23:29:45 [debug] 28376#0: *1 event timer del: 12: 1432266988
2015/11/29 23:29:45 [debug] 28376#0: *1 recv: fd:12 1536 of 1536
2015/11/29 23:29:45 [debug] 28376#0: *1 epoll del event: fd:12 op:2 ev:00000000
2015/11/29 23:29:45 [debug] 28376#0: *1 handshake: stage 5
2015/11/29 23:29:45 [debug] 28376#0: *1 handshake: done
2015/11/29 23:29:45 [debug] 28376#0: *1 event timer add: 12: 60000:1432266992
2015/11/29 23:29:45 [debug] 28376#0: *1 ping: wait 60000ms
2015/11/29 23:29:45 [debug] 28376#0: *1 recv: fd:12 -1 of 146
2015/11/29 23:29:45 [debug] 28376#0: *1 recv() not ready (11: Resource temporarily unavailable)
2015/11/29 23:29:45 [debug] 28376#0: *1 epoll add event: fd:12 op:1 ev:80002001
2015/11/29 23:29:45 [debug] 28376#0: timer delta: 4
2015/11/29 23:29:45 [debug] 28376#0: worker cycle
2015/11/29 23:29:45 [debug] 28376#0: epoll timer: 60000
2015/11/29 23:29:45 [debug] 28376#0: epoll: fd:12 ev:0001 d:018EE808
2015/11/29 23:29:45 [debug] 28376#0: *1 recv: fd:12 101 of 146
2015/11/29 23:29:45 [debug] 28376#0: *1 RTMP bheader fmt=0 csid=3
2015/11/29 23:29:45 [debug] 28376#0: *1 RTMP mheader fmt=0 amf_cmd (20) time=0+0 mlen=89 len=0 msid=0
2015/11/29 23:29:45 [debug] 28376#0: *1 RTMP recv amf_cmd (20) csid=3 timestamp=0 mlen=89 msid=0 nbufs=1
2015/11/29 23:29:45 [debug] 28376#0: *1 nhandlers: 1
2015/11/29 23:29:45 [debug] 28376#0: *1 calling handler 0
2015/11/29 23:29:45 [debug] 28376#0: *1 AMF read (1) 02 '?'
2015/11/29 23:29:45 [debug] 28376#0: *1 AMF read (2) 00 07 '??'
2015/11/29 23:29:45 [debug] 28376#0: *1 AMF read (7) 63 6F 6E 6E 65 63 74 'connect'
2015/11/29 23:29:45 [debug] 28376#0: *1 AMF func 'connect' passed to handler 0/1
2015/11/29 23:29:45 [debug] 28376#0: *1 AMF read (1) 00 '?'
2015/11/29 23:29:45 [debug] 28376#0: *1 AMF read (8) 3F F0 00 00 00 00 00 00 '????????'
2015/11/29 23:29:45 [debug] 28376#0: *1 AMF read (1) 03 '?'
2015/11/29 23:29:45 [debug] 28376#0: *1 AMF read (2) 00 03 '??'
2015/11/29 23:29:45 [debug] 28376#0: *1 AMF read (3) 61 70 70 'app'
2015/11/29 23:29:45 [debug] 28376#0: *1 AMF read (1) 02 '?'
2015/11/29 23:29:45 [debug] 28376#0: *1 AMF read (2) 00 04 '??'
2015/11/29 23:29:45 [debug] 28376#0: *1 AMF read (4) 6C 69 76 65 'live'
2015/11/29 23:29:45 [debug] 28376#0: *1 AMF read (2) 00 04 '??'
2015/11/29 23:29:45 [debug] 28376#0: *1 AMF read (4) 74 79 70 65 'type'
2015/11/29 23:29:45 [debug] 28376#0: *1 AMF read (1) 02 '?'
2015/11/29 23:29:45 [debug] 28376#0: *1 AMF read (2) 00 0A '??'
2015/11/29 23:29:45 [debug] 28376#0: *1 AMF read (10) XX XX XX XX XX XX XX XX XX XX '??????????'
2015/11/29 23:29:45 [debug] 28376#0: *1 AMF read (2) 00 05 '??'
2015/11/29 23:29:45 [debug] 28376#0: *1 AMF read (5) 74 63 55 72 6C 'tcUrl'
2015/11/29 23:29:45 [debug] 28376#0: *1 AMF read (1) 02 '?'
2015/11/29 23:29:45 [debug] 28376#0: *1 AMF read (2) 00 19 '??'
2015/11/29 23:29:45 [debug] 28376#0: *1 AMF read (25) 72 74 6D 70 3A 2F 2F 31 39 32 2E 31 36 38 2E 33 2E 32 31 31 2F 6C 69 76 65 'rtmp://192.168.3.211/live'
2015/11/29 23:29:45 [debug] 28376#0: *1 AMF read (2) 00 00 '??'
2015/11/29 23:29:45 [debug] 28376#0: *1 AMF read (1) 09 '?'
2015/11/29 23:29:45 [info] 28376#0: *1 connect: app='live' args='' flashver='' swf_url='' tc_url='rtmp://192.168.3.211/live' page_url='' acodecs=0 vcodecs=0 object_encoding=0, client: 192.168.3.199, server: 0.0.0.0:1935
2015/11/29 23:29:45 [notice] 28375#0: signal 17 (SIGCHLD) received
2015/11/29 23:29:45 [alert] 28375#0: worker process 28376 exited on signal 11
2015/11/29 23:29:45 [debug] 28375#0: shmtx forced unlock
2015/11/29 23:29:45 [debug] 28375#0: wake up, sigio 0
2015/11/29 23:29:45 [debug] 28375#0: reap children
2015/11/29 23:29:45 [debug] 28375#0: child: 0 28376 e:0 t:1 d:0 r:1 j:0
2015/11/29 23:29:45 [debug] 28375#0: pass close channel s:0 pid:28376 to:28377
2015/11/29 23:29:45 [debug] 28375#0: channel 3:8
2015/11/29 23:29:45 [debug] 28377#0: epoll: fd:10 ev:0001 d:018EE6A0
2015/11/29 23:29:45 [notice] 28375#0: start worker process 28387
2015/11/29 23:29:45 [debug] 28377#0: channel handler
2015/11/29 23:29:45 [debug] 28375#0: pass channel s:0 pid:28387 fd:3 to s:1 pid:28377 fd:9
2015/11/29 23:29:45 [debug] 28377#0: channel: 16
2015/11/29 23:29:45 [debug] 28375#0: child: 1 28377 e:0 t:0 d:0 r:1 j:0
2015/11/29 23:29:45 [debug] 28377#0: channel command: 2
2015/11/29 23:29:45 [debug] 28375#0: sigsuspend
2015/11/29 23:29:45 [debug] 28377#0: close channel s:0 pid:28376 our:28376 fd:3
2015/11/29 23:29:45 [debug] 28377#0: channel: 16
2015/11/29 23:29:45 [debug] 28377#0: channel command: 1
2015/11/29 23:29:45 [debug] 28377#0: get channel s:0 pid:28387 fd:3
2015/11/29 23:29:45 [notice] 28375#0: signal 29 (SIGIO) received
2015/11/29 23:29:45 [debug] 28377#0: channel: -2
2015/11/29 23:29:45 [debug] 28375#0: wake up, sigio 0
2015/11/29 23:29:45 [debug] 28377#0: timer delta: 13953
2015/11/29 23:29:45 [debug] 28375#0: sigsuspend
2015/11/29 23:29:45 [debug] 28377#0: epoll timer: 46047
2015/11/29 23:29:45 [debug] 28387#0: notify eventfd: 12
2015/11/29 23:29:45 [debug] 28387#0: eventfd: 13
2015/11/29 23:29:45 [debug] 28387#0: malloc: 0184F130:8192
2015/11/29 23:29:45 [debug] 28387#0: malloc: 018EE6A0:122880
2015/11/29 23:29:45 [debug] 28387#0: malloc: 0190C6A8:49152
2015/11/29 23:29:45 [debug] 28387#0: malloc: 019186B0:49152
2015/11/29 23:29:45 [debug] 28387#0: epoll add event: fd:6 op:1 ev:00002001
2015/11/29 23:29:45 [debug] 28387#0: epoll add event: fd:7 op:1 ev:00002001
2015/11/29 23:29:45 [debug] 28387#0: epoll add event: fd:8 op:1 ev:00002001
2015/11/29 23:29:45 [debug] 28387#0: setproctitle: "nginx: worker process"
2015/11/29 23:29:45 [debug] 28387#0: worker cycle
2015/11/29 23:29:45 [debug] 28387#0: epoll timer: -1

error: variable 'errfl' set but not used

Hi, I was stuck on the module compilation process.
Trying to install on Ubuntu 14.04
nginx 1.6.3

/opt/nginx-rtmp-module/ngx_rtmp_send.c: In function 'ngx_rtmp_create_fi':
/opt/nginx-rtmp-module/ngx_rtmp_send.c:878:37: error: variable 'errfl' set but not used [-Werror=unused-but-set-variable]
     int                             errfl;
                                     ^
cc1: all warnings being treated as errors
make[1]: *** [objs/addon/nginx-rtmp-module/ngx_rtmp_send.o] Error 1
make[1]: Leaving directory `/opt/nginx-1.6.3'
make: *** [build] Error 2

I got into the mentioned file ngx_rtmp_send.c and indeed noticed that variable, still didn't get the point of using this line:

errfl = sprintf((char *)buf_time, "%02d:%02d:%02d.%06d", tm.tm_hour, tm.tm_min, tm.tm_sec, (int)tv.tv_usec);
// Strange order, but FMLE send like this
errfl = sprintf((char *)buf_date, "%02d-%02d-%04d", tm.tm_mday, tm.tm_mon + 1, tm.tm_year + 1900);

prevent changing post args

is there a possibility to prevent changing post argumnets (pageurl, addr, clientid etc) passed to on_play?

Appears to only play first playlist of segments then stops

Greetings Sergey,

First of all, I would like to say thank you for continuing this nginx module. Much appreciated.

The dash players I have tested with all "freeze" apparently after only playing the first playlist of segments.

This is the dev branch of dashif:
http://ethernetweb.com/dashjs-test/live.html

This is a link to the mpd:
http://ethernetweb.com:19360/dash/ethernetweb/index.mpd

Have tested with bit-dash:
http://www.dash-player.com/demo/manifest-test/

Have tested with stable / master 1.6.0 dashif.
dashif.org/reference/players/javascript/v1.6.0/samples/dash-if-reference-player/index.html?url=http://ethernetweb.com:19360/dash/ethernetweb/index.mpd

All result in the player stopping and the buffer reaching 0.

Thank you very much.

crash event when publishing multiple streams at same time

Hello all,

I’m able to create a crash event and can reproduce the crash with ease when I start multiple streams at once. I’ve looked at the process via strace and it seems to go in a read / write loop, but its not clear where in the code it happens.

I am no developer, so perhaps someone can tell me the best data to collect in order submit here in hopes that some smarter than me might know the cause and how to fix it. I’ve tried running in gdb, but when I do a back trace the core is already gone.

Can someone tell me the best way to collect data that might nail down the cause?

Thanks so much,
Mike

digest auth without php

Is there a simple way to use publisher auth w/o php?

Looking over the docs and examples I've seen on_publish forwarded to auth.php

Drop ngx-local-relay client through control submodule

Hi, guys. I'm trying to avoid using external applications like FFmpeg.
My config:

rtmp {
    server {
        listen 1935;

        live on;
        record off;

        application live {
            push rtmp://127.0.0.1/one;
            push rtmp://127.0.0.1/two;
        }

        application one {
                on_publish http://php_app/rtmp/publish;
        }

        application two {
                on_publish http://php_app/rtmp/publish;
        }
    }
}

When I start streaming by OBS, i see: http://prntscr.com/aj7rs0
At http://php_app/rtmp/publish - there is some kind of redirecting logic to external streaming services.

When I drop connection by sending a request to http://rtmphost/control/drop/publisher?app=youtube&name=re_admin_8e2218e4ffb0fdf9c41c362580b3c5d6 or http://rtmphost/control/drop/client?app=live&name=re_admin_8e2218e4ffb0fdf9c41c362580b3c5d6&clientid=41, connection drops, but after 3 seconds it appears again.

Can I drop connection permanently?

Segfault after loading dynamic `modules/ngx_rtmp_module.so` and rtmp to config

Using the following sources on el7 on a fresh install:
https://github.com/sergey-dryabzhinsky/nginx-rtmp-module/archive/v1.1.7.10.tar.gz
http://nginx.org/download/nginx-1.9.12.tar.gz

uname -a
Linux nginx-box 3.10.0-327.10.1.el7.x86_64 #1 SMP Sat Jan 23 04:54:55 EST 2016 x86_64 x86_64 x86_64 GNU/Linux
yum install automake autoconf gcc GeoIP-devel gd-devel pcre-devel openssl-devel
tar xzf v1.1.7.10.tar.gz
tar xzf nginx-1.9.12.tar.gz
cd nginx-1.9.12
./configure --add-dynamic-module=../nginx-rtmp-module-1.1.7.10/
make
make install

/usr/local/nginx/sbin/nginx 
nginx version: nginx/1.9.12
built by gcc 4.8.5 20150623 (Red Hat 4.8.5-4) (GCC) 
built with OpenSSL 1.0.1e-fips 11 Feb 2013
TLS SNI support enabled
configure arguments: --add-dynamic-module=../nginx-rtmp-module-1.1.7.10/

ls -l /usr/local/nginx/modules/
total 1752
-rwxr-xr-x 1 root root 1792703 Mar  3 16:09 ngx_rtmp_module.so

vim /usr/local/nginx/conf/nginx.conf
add "load_module modules/ngx_rtmp_module.so;" below log lines

nginx runs at this point
add Multi-worker streaming example from readme to bottom of /usr/local/nginx/conf/nginx.conf

rtmp_auto_push on;

rtmp {
    server {
        listen 1935;

        application mytv {
            live on;
        }
    }
}

attempt to start nginx

/usr/local/nginx/sbin/nginx
Segmentation fault

trace

gdb /usr/local/nginx/sbin/nginx
GNU gdb (GDB) Red Hat Enterprise Linux 7.6.1-80.el7
Copyright (C) 2013 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
and "show warranty" for details.
This GDB was configured as "x86_64-redhat-linux-gnu".
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>...
Reading symbols from /usr/local/nginx/sbin/nginx...done.
(gdb) run
Starting program: /usr/local/nginx/sbin/nginx 
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib64/libthread_db.so.1".

Program received signal SIGSEGV, Segmentation fault.
ngx_rtmp_core_server (cf=0x7fffffffe0f0, cmd=<optimized out>, conf=<optimized out>) at ../nginx-rtmp-module-1.1.7.10/ngx_rtmp_core_module.c:389
389     cscf->ctx = ctx;
Missing separate debuginfos, use: debuginfo-install glibc-2.17-106.el7_2.4.x86_64 keyutils-libs-1.5.8-3.el7.x86_64 krb5-libs-1.13.2-10.el7.x86_64 libcom_err-1.42.9-7.el7.x86_64 libselinux-2.2.2-6.el7.x86_64 nss-softokn-freebl-3.16.2.3-13.el7_1.x86_64 openssl-libs-1.0.1e-51.el7_2.4.x86_64 pcre-8.32-15.el7.x86_64 xz-libs-5.1.2-12alpha.el7.x86_64 zlib-1.2.7-15.el7.x86_64

help? :)

Please fix build error on windows environment

Hi
When I was build your source, It occurred error
I was build with Visual Studio 2010 command prompt on Windows 8.1

objs/lib/nginx-rtmp-module/ngx_rtmp_send.c(6) : error C2220: 경고가 오류로 처리
되어 생성된 'object' 파일이 없습니다.
objs/lib/nginx-rtmp-module/ngx_rtmp_send.c(6) : warning C4627: '#include <sys/ti
me.h>': 미리 컴파일된 헤더 사용을 찾을 때 건너뛰었습니다.
'ngx_config.h'에 지시문 추가 또는 미리 컴파일된 헤더 다시 빌드
objs/lib/nginx-rtmp-module/ngx_rtmp_send.c(615) : error C2143: 구문 오류 : ';'이
(가) '형식' 앞에 없습니다.
objs/lib/nginx-rtmp-module/ngx_rtmp_send.c(626) : error C2143: 구문 오류 : ';'이
(가) '형식' 앞에 없습니다.
objs/lib/nginx-rtmp-module/ngx_rtmp_send.c(646) : error C2143: 구문 오류 : ';'이
(가) '형식' 앞에 없습니다.
objs/lib/nginx-rtmp-module/ngx_rtmp_send.c(669) : error C2065: 'out_elts' : 선언
되지 않은 식별자입니다.
objs/lib/nginx-rtmp-module/ngx_rtmp_send.c(669) : error C2109: 첨자는 배열 또는
포인터 형식을 사용해야 합니다.
objs/lib/nginx-rtmp-module/ngx_rtmp_send.c(670) : error C2065: 'out_inf' : 선언
되지 않은 식별자입니다.
objs/lib/nginx-rtmp-module/ngx_rtmp_send.c(670) : error C2109: 첨자는 배열 또는
포인터 형식을 사용해야 합니다.
objs/lib/nginx-rtmp-module/ngx_rtmp_send.c(673) : error C2065: 'out_inf_ex_data'
: 선언되지 않은 식별자입니다.
objs/lib/nginx-rtmp-module/ngx_rtmp_send.c(673) : error C2109: 첨자는 배열 또는
포인터 형식을 사용해야 합니다.
objs/lib/nginx-rtmp-module/ngx_rtmp_send.c(681) : error C2065: 'out_elts' : 선언
되지 않은 식별자입니다.
objs/lib/nginx-rtmp-module/ngx_rtmp_send.c(681) : warning C4047: '함수' : 'ngx_r
tmp_amf_elt_t *'의 간접 참조 수준이 'int'과(와) 다릅니다.
objs/lib/nginx-rtmp-module/ngx_rtmp_send.c(681) : warning C4024: 'ngx_rtmp_creat
e_amf' : 형식 및 실제 매개 변수 3의 형식이 서로 다릅니다.
objs/lib/nginx-rtmp-module/ngx_rtmp_send.c(682) : error C2065: 'out_elts' : 선언
되지 않은 식별자입니다.
objs/lib/nginx-rtmp-module/ngx_rtmp_send.c(682) : error C2065: 'out_elts' : 선언
되지 않은 식별자입니다.
objs/lib/nginx-rtmp-module/ngx_rtmp_send.c(682) : error C2109: 첨자는 배열 또는
포인터 형식을 사용해야 합니다.
objs/lib/nginx-rtmp-module/ngx_rtmp_send.c(682) : error C2198: 'ngx_rtmp_create_
amf' : 호출에 매개 변수가 너무 적습니다.
objs/lib/nginx-rtmp-module/ngx_rtmp_send.c(687) : error C2061: 구문 오류 : 식별
자 'ngx_rtmp_send_redirect_status'
objs/lib/nginx-rtmp-module/ngx_rtmp_send.c(687) : error C2059: 구문 오류 : ';'
objs/lib/nginx-rtmp-module/ngx_rtmp_send.c(687) : error C2059: 구문 오류 : '형식
'
objs/lib/nginx-rtmp-module/ngx_rtmp_send.c(879) : error C2079: 'tz'은(는) 정의되
지 않은 struct 'timezone'을(를) 사용합니다.
objs/lib/nginx-rtmp-module/ngx_rtmp_send.c(919) : warning C4013: 'gettimeofday'
이(가) 정의되지 않았습니다. extern은 int형을 반환하는 것으로 간주합니다.
NMAKE : fatal error U1077: '"C:\Program Files (x86)\Microsoft Visual Studio 10.0
\VC\BIN\cl.EXE"' : '0x2' 반환 코드입니다.

Sorry for korean language. I'm using korean visual studio
But I think you can understand what is problem
no problem build https://github.com/arut/nginx-rtmp-module source
only your source have build problem

Please fix it.
Thanks

Recover stream

I don't know if I should ask this here or on a ffmpeg forum or something, but I will give it a try here first.

I stream a few IP-camera's with nginx-rtmp and I use exec_static to pull the rtsp stream from the camera en push it to rtmp://localhost:1935/name with ffmpeg.

Every time when there's a small hickup on the line or the IP-adres of a camera changes and the dyndns needs a minute to update, the stream fails and does not recover.

At the moment I restart Nginx a few times a day, but that's a 'dirty hack' and it's still possible a stream won't be available for a few hours.

Is there a way to make it recover again? I guess exec_pull would fix it, but that's not an option as I am only using HLS ( #59 )

Push and Pull from an application

Righ now is only possible to either pull or push from an rtmp application, would be great to have the possibility to do both at the same time.


application myapp {
    pull rtmp://myserver.com:1935/live/stream name=mystream;
    push myohterserver.com;
}

Notify return codes: 401, 403, 404

Proposal for processing new HTTP return codes for notify callbacks:

  • 401 - no auth. For example, no token given.
  • 403 - no access. For example, check user rights to push streams and deny.
  • 404 - not found. For example, check for registered streams and deny unknown.

For on_connect, on_play, on_publish.

Result: send NetConnection.Connect.Rejected, connection close.

TS discontinuity errors

When re-streaming hls streams generated by nginx-rtmp-module with vlc the vlc log is filled with messages like the ones bellow

ts error: libdvbpsi (PSI decoder): TS duplicate (received 0, expected 1) for PID 0
ts error: libdvbpsi (PSI decoder): TS duplicate (received 0, expected 1) for PID 4095
ts error: libdvbpsi (PSI decoder): TS duplicate (received 0, expected 1) for PID 0
ts error: libdvbpsi (PSI decoder): TS duplicate (received 0, expected 1) for PID 4095

Basically this should be happening when the continuity counter wraps.

Use exec_pull for hls

I gave exec_pull a try today and it looks impressive. Making use of that would save a lot of bandwith and processing power that's now used for streams where people are not always looking at.

But, bummer, it does not work with hls... and I'm only using hls at the moment.

Would there be a way to make exec_pull work for hls too? Or is it too complicated?

Error: variable ‘msg_type’ set but not used

I can't compile latest version (1.1.7.9) with Nginx 1.8.1 on CentOS7 64-bit:

[...]
nginx-rtmp-module-1.1.7.9/ngx_rtmp_live_module.c: In function ‘ngx_rtmp_live_data’:
nginx-rtmp-module-1.1.7.9/ngx_rtmp_live_module.c:1059:37: error: variable ‘msg_type’ set but not used [-Werror=unused-but-set-variable]
     u_char                         *msg_type;
                                     ^
cc1: all warnings being treated as errors
make[1]: *** [objs/addon/nginx-rtmp-module-1.1.7.9/ngx_rtmp_live_module.o] Error 1
make[1]: *** Waiting for unfinished jobs....
make[1]: Leaving directory `/home/admin/nginx'
make: *** [build] Error 2

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.