arut / nginx-rtmp-module

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

manual record does not work #1424

Open hongweishang opened 5 years ago

hongweishang commented 5 years ago

conf below:

worker_processes 1; rtmp { server { listen 1956; chunk_size 4000; application live { live on;

hls on;

        #hls_path /usr/local/nginx/vs;
        #hls_fragment 5s;
        recorder rec1 {
           record all manual;
            record_suffix _%d%m%Y_%H%M%S.flv;
            record_path /usr/local/record;
            record_unique on;
        }   
    }   
}   

}

1 curl GET: live@ubuntu:/usr/local/nginx$ curl -v "http://localhost/rtmp-control/record/start?app=live&name=ccc&rec=rec1"

2 curl POST live@ubuntu:/usr/local/nginx$ curl -v POST -d "{'app':'live', 'name':'ccc','rec':'rec1'" "http://localhost/rtmp-control/record/start"

both get and post , not work

hongweishang commented 5 years ago

live@ubuntu:/usr/local/nginx$ curl -v -X POST -d "app=live&name=ccc&rec=rec1" "http://localhost/rtmp-control/record/start" Note: Unnecessary use of -X or --request, POST is already inferred.