SRT encoder transmission to obtain public network IP address 3 solutions

SRT is the most popular Internet transmission protocol nowadays. It has the advantages of low latency, stable and reliable transmission. It can be widely used in remote production, remote monitoring, remote interaction and other scenarios that require Internet remote transmission.
SRT is a point-to-point transmission protocol. Because it needs to penetrate the Internet, at least one end needs to have a public network IP address. Set one end of the device with a public IP address to listener mode, and the other end uses caller mode to initiate a connection request to the opposite end. After the SRT connection is successfully established, the video stream can be transmitted in real time.
Taking two sites A and B in a common networking environment as an example, the video stream is transmitted from the encoder of site A to the decoder of site B in real time in SRT mode, and how to implement the public network transmission solution (we all solve the site The public network address of B is introduced, and the same is true for site A), here is mainly the network-related configuration, SRT specific configuration please refer to the SRT configuration manual.
Insert picture description here

Solution 1: broadband operator PPPoE mode to obtain public network IP address/port mapping

Broadband operators can provide routers with public IP addresses (public IP addresses cannot be provided for 4G Internet access). The public IP addresses are configured on the router's outside interface, and the router has a one-to-one mapping to the decoder IP/port.
Insert picture description here
1) Set the WAN port of the router to obtain the public IP address in PPPoE mode.
Insert picture description here
Note: If you want the router interface to directly obtain the public IP address, the broadband operator needs to cooperate.

One is to set the broadband optical modem to transparent transmission mode, and place the PPPoE dialing function on the router for execution, so that the public/private network address port mapping can be configured on the router.

The second is that operators are required to conditionally provide public IP addresses to users (usually Telecom Broadband has more public IP address resources. Because the cost of applying for fixed public IP addresses of operators is too high, it is generally possible to have public IP addresses. However, although the public IP address is changed, it can remain unchanged for a certain period of time, unless the device restarts.)

In general, if the WAN port obtains the IP address of the 10.xxx, 172.16.xx–172.32.xx, 192.168.xx network segment, this belongs to the category of private network IP addresses, and users cannot directly access it through the Internet. .

2) Set the port forward of the router (Port Forward)

As shown in the figure below, map the UDP33222 port of the external network address to the UDP33222 port of the internal network 192.168.4.101 (decoder IP address and ensure that this IP address is interoperable with the router).

That is, when the peer device uses SRT to initiate a connection to port 33222 of the public IP address of the router, the router will directly forward the data stream to the decoder 192.168.4.101 device for response and reply. (SRT is transmitted by UDP protocol, so the port mapping must be configured as UDP protocol)
Insert picture description hereNote: If the broadband operator can provide multiple public IP addresses (generally, dedicated line mode is required, PPPoE dial-up mode can only obtain one public IP address ), one is used for the router to surf the Internet, and the other is used for the decoder alone, you can configure the public network IP directly on the network port of the decoder, so that the port mapping configuration can be avoided.

Solution 2: Use FRP as public network address

Buy a server in the cloud (the cloud server can provide the public IP address), and use FRP to do the port mapping between public and private addresses. When the peer device connects to the public IP/port of the cloud server in SRT mode, FRP The service can forward the data stream to the intranet decoder device.
Insert picture description here
FRP is a popular cross-platform open source and free intranet penetration tool. It supports Windows, macOS and Linux platforms to establish a connection between the extranet and the intranet, and realize remote access to the intranet without a public IP address.

Solution 3: Purchase an IP box to obtain a public IP address

After purchasing an IP box and its broadband service, the IP box can obtain a public IP address in the intranet, connect the decoder to it, and configure the device accordingly, then the public network address of the IP box and the private network IP of the decoder can be realized One-to-one correspondence of addresses. In this way, when the peer device is connected to the public network IP/port of the IP box in SRT mode, the IP box can forward the data stream to the intranet decoder device.
Insert picture description here

Solution 4: Obtain public IP address by other tools

 另外,还有花生壳、Ngrok、n2n、lanproxy 等等工具可以使用,热爱学习的请自行研究。
 
 附加:科普公网IP地址知识

 01公网IP地址
  公网 IP 地址,是可以被全世界任何人访问的(如果你不对这个 IP 地址做限制的话),用于互联网使用。比如 14.215.177.39 是百度公司的地址,你在任何可以上网的地方都能访问到这个 IP 地址。有这么一种情况:办理的联通带宽,分配的 IP 只能在联通内部访问,移动网络不能访问。这个IP 只能算是“联通内的公网 IP”,不是真正的公网 IP 地址。

02 Private network IP address
Private network IP address, such as: 10.xxx, 172.16.xx–172.32.xx, 192.168.xx, etc. The private network address can only be used in the local area network, that is, users who can only access the local network and cross the Internet It is impossible to access a device through this IP address.
03 Fixed public network IP address
Fixed public network IP address, corresponding to the opposite side is dynamic public network IP address. Generally, when we use the dial-up mode to surf the Internet, the network service provider will temporarily "lend" an IP to you from the IP address pool. This IP will be "returned" when we go offline, and it may be "borrowed" to another when we connect again. An IP, that is, your IP is not fixed. Conversely, the service provider can assign you a private public network IP address, and the public network IP is fixed (the company’s private line is in this mode, but the operators charge more for the private line mode. When we use SRT, generally It is fine to use a dynamic public IP address, which will remain unchanged for a certain period of time, or it can be accessed by domain name).
Solution download address : https://download.csdn.net/download/kiloview2019/12844049
This article is original, please mark it from CSND blog KILOVIEW.

Guess you like

Origin blog.csdn.net/kiloview2019/article/details/108593848