Environment under Windows Setup
First, to prepare the work, we need to download the program we need
1, Easydarwin:https://github.com/easydarwin/easydarwin
2, ffmpeg:http://ffmpeg.org/
3, nginx:http://nginx.org/en/download.html
Second, build Web services
1, modify the Nginx configuration file,
One is the port that the Web service listens to, then the Easydarwin service end will use;
The other is the Web service root directory, which is where HLS slices and videos are stored. In order to test the convenience of creating a new Test.txt file, the contents of random input, such as: good luck
2. Start the Web service
Open command: Start Nginx.exe
Stop command: nginx.exe-s stop
Third, compile the source program, modify the configuration file
1, compile the downloaded Easydarwin, with vs open. \easydarwin-master\easydarwin\winntsupport\easydarwin.sln, compile. Normally there is no error and if there is an error, check if the file is missing.
2, copy the necessary dynamic library to the running directory, copy all the files under Easydarwin-master\easydarwin\lib to your running directory, the default is \easydarwin-master\easydarwin\winntsupport \debug
3, manually create a new directory, in the running directory, the new directory Movies (storage video files and tiles, etc.) and Logs (log directory)
4, modify the configuration file,
Http_root_dir is the Web service address; local_ip_address is the server IP address
If you are using HLS, you need to set the parameter to True.
Some of the other parameters can be modified according to individual needs.
Iv. System Testing
1, first start the Web Service (command: Start Nginx.exe), browser access: Http://192.168.1.107:8088/test.txt, if you do not see "Good luck", Then check if the lower port is occupied (command: Netstat-ano).
2. Start Easydarwin Server (command: easydarwin.exe-d-C Easydarwin.xml)
After successful startup, the output is like this, indicating that the dynamic library is running and the port settings are not problematic. (The Easydarwin server port is 554, it is possible to conflict with a media service on the system and need to shut down this service)
3, start Ffmpeg.exe, start to push the stream
Push stream command: e:\ffmpeg\bin>ffmpeg.exe-i rtsp://192.168.1.100:10554/udp/av0_1-vcodec copy-acodec copy-rtsp_transport TCP -F RTSP RTSP://192.168.1.107/LIVE2.SDP
Note: Rtsp://192.168.1.100:10554/udp/av0_1, is our Ipcamera's RTSP address;
The back RTSP://192.168.1.107/LIVE2.SDP is the RTSP address we push to the server for external access;
Under normal circumstances the ffmpeg output is such that the push is successful.
4. Verify the video stream of the push
Test RTSP Address: Use the client program VLC or Easyplayer to open the address RTSP://192.168.1.107/LIVE2.SDP
Test HLS Address:
You can ask for a real HLS address and then visit it first. (Request Link: http://192.168.1.107:8081/api/easyhlsmodule?name=live&url= "RTSP://192.168.1.107/LIVE2.SDP")
Re-use the client program VLC or Easyplayer to open the address http://192.168.1.107:8088/live/live.m3u8
Linux system on the other hand, in addition to Easydarwin compilation, the other configuration is basically the same, and then I put the Linux required commands are affixed.
Easydarwin server build and Client Push flow complete Example