Step 1: Download nginx
Download link: http://nginx-win.ecsds.eu/download/nginx 1.7.11.3 Gryphon.zip
Unzip after the download is complete;
Step 2: Modify the configuration file conf\nginx-win-rtmp.conf or conf\nginx-win.conf
rtmp {
server {
listen 1935;
chunk_size 4000;
application live {
live on;
allow play all; # play /usr/local/data/ live ; #// Video file storage location, access method rtmp://localhost:1935/ live #If there is video 1.mp4 in the video path, the access path is rtmp://localhost:1935/ live /1.mp4 } }
}
illustrate:
- rtmp is the protocol name
- server indicates that the internal configuration is related to the server
- listen listen port number, the default port number of rtmp protocol is 1935
- The application path accessed by application is
gzhm
- live on; turn on real-time
- allow play all; allow all addresses to publish/play
- record off; do not record data
See thanks for details : https://blog.csdn.net/defonds/article/details/9274479/
Step 3: Start the server
Enter windows cmd;
> cd nginx-1.7.11.3-Gryphon
> nginx.exe -c conf\nginx-win-rtmp.conf
Step 4: Download ffmpeg push stream https://ffmpeg.zeranoe.com/builds/
Unzip after download is complete
Configure environment variables
Enter the ffmpeg -version command in the dos window . If there is information, it means success:
For details, see: https://www.cnblogs.com/xiezhidong/p/6924775.html
Step 5: Under the C:\Windows\System32\cmd.exe directory
Execute ffmpeg.exe -re -i F:\renming\1.mp4 -f flv rtmp://localhost:1935/ live /1 to push
Step 6: Download VLC Player
Others: Baidu can