EasyNVR is the longest and most stable video streaming media management and distribution solution developed by TSINGSEE Video for commercial use. EasyNVR can output video streams of RTSP, HLS, FLV and other protocols, and can also call iframe addresses for third-party integration. In the last article, we shared how to fix forwarding EasyNVR video streams using Nginx. If you are in the article, you can read how to fix forwarding EasyNVR video streams using Nginx. This article will share with you the steps of Nginx proxy dynamic forwarding EasyNVR video stream.

1. Install and configure Nginx. After the configuration is complete, you need to locate the Server in the configuration file as follows:

2. We can see the parameter of location under the server. We need to modify the parameter of location.

root html;
index index.html index.htm;
if ( $uri ~ (\d+)\.(\d+)\.(\d+)\.(\d+):(\d+)(.*)){
set $Real $1.$2.$3.$4:$5;
set $Realpa $6;
proxy_pass http://$Real$Realpa;
Copy the code

The code is the dynamic forwarding of video stream running code.

3. Then we started EasyNVR and Nginx to check the running program of the code. At this point, we can use other computers to check whether it is successful. EasyNVR can also be tested on different servers.

Port 98 in the figure above is an Nginx forwarding port.

If the video output is normal, Nginx dynamic forwarding succeeds. If you are interested in our technology sharing, please continue to follow us for updates.