arut / nginx-rtmp-module

NGINX-based Media Streaming Server
http://nginx-rtmp.blogspot.com
BSD 2-Clause "Simplified" License
13.5k stars 3.52k forks source link

m3u8 generated but rtmp gone #1131

Open binooetomo opened 7 years ago

binooetomo commented 7 years ago

Dear All.

Here is my rtmp config. `

    rtmp {
        server {
            listen 1935;
            chunk_size 4000;
            #ping 30s;
            notify_method get;

            application live {

                # enable live streaming
                live on;
                wait_video on;
                wait_key on;
                #record first 1K of stream
                record all;
                record_path /tmp/livestream;
                record_max_size 1K;

                # append current timestamp to each flv
                record_unique on;

                hls on;
                hls_path /tmp/hls-live;
                hls_fragment 6;
                hls_playlist_length 10;

                # publish only from localhost
                allow publish 127.0.0.1;
                deny publish all;
                allow play all;
            }
        }
    }

` I run ffmpeg local to pull my ip-cams and feed it to nginx.

I also have a http 'server' segment in my nginx.conf to serve m3u8 files.

I use ffplay from other station to test.

Using http to play m3u8 files .... work great, but when use rtmp it looks stuck.

from nginx access.log, I got : [07/Oct/2017:08:54:58 +0700] PLAY "live" "myfeed" "" - 401 436 "" "LNX 9,0,124,2" (38s)

Sincerely -bino-

Crypter commented 7 years ago

As far as I know nginx comes pre-configured to use 'auto' number of workers , this directive is most likely at the very top of nginx.conf. Change that number to 1 and see if works.