Building a streaming media server on windows through nginx (Chapter 1)

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:

  1. rtmp is the protocol name
  2. server indicates that the internal configuration is related to the server
  3. listen listen port number, the default port number of rtmp protocol is 1935
  4. The application path accessed by application is gzhm
  5. live on; turn on real-time  
  6. allow play all;  allow all addresses to publish/play
  7. 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





































































Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=325527266&siteId=291194637