- download nginx from http://nginx.org
- unzip it, run nginx.exe, it is equal to run: nginx -c conf\nginx.conf we can change it default port from 80 to other. the trace and error log is in logs folder
- nginx command:
- nginx -s stop
- nginx -s quit
- nginx -s reload
- nginx -s reopen
- nginx -V
but, this version doesn't support streaming, so, we can change it to another version:
- http://nginx-win.ecsds.eu/ it contains nginx-rtmp-module . I get nginx 1.7.11.3 Gryphon
- modify the nginx-win.conf, add :
rtmp {
server {
listen 1935;
chunk_size 4000;
application live {
live on;
record off;
}
application hls {
live on;
hls on;
hls_path /tmp/hls;
}
application dash {
live on;
dash on;
dash_path /tmp/dash;
}
}
}
- start nginx: nginx.exe -c ./conf/nginx-win.conf
- broadcast one file: ffmpeg -re -i "C:\myprogram\testfile\test_1M.mp4" -c copy -f flv rtmp://localhost/live/stream
- play it from rtmp server: ffplay rtmp://localhost/live/stream
No comments:
Post a Comment