What is rtsp proxy? How to set it up?
What is rtsp proxy?
Use the rtsp client to fetch data from the other rtsp server and then distribute the data to the clients of the rtsp server.
RTSP proxy functionality can be used to proxy device rtsp services, reducing device data distribution pressure.
The RTSP proxy function can also be used to establish a cascading structure for the rtsp server.
How to set it up?
Open the rtsp server configuration file config.xml and edit the proxy node.
<proxy>
<suffix>proxy</suffix>
<url></url>
<user>admin</user>
<pass>admin</pass>
<transfer>TCP</transfer>
<ondemand>1</ondemand>
</proxy>
<proxy> : Specify the rtsp proxy parameters, it can configure multiple nodes
<suffix>
Specify the rtsp stream suffix, you can play the proxy stream from:
rtsp://youip/suffix
<url>
The original rtsp stream address
<user> <pass>
Specify the original rtsp stream login user and password information
<transfer>
Specify the rtsp client transfer protocol, TCP,UDP,MULTICAST
<ondemand>
Connect on demand, 1-Connect when needed, 0-Always keep connected
Below is the setup example:
<config>
<serverip>192.168.1.10</serverip>
<serverport>554</serverport>
...
<proxy>
<suffix>proxy1</suffix>
<url>rtsp://192.168.1.3/live</url>
<user>admin</user>
<pass>admin</pass>
<transfer>TCP</transfer>
<ondemand>1</ondemand>
</proxy>
<proxy>
<suffix>proxy2</suffix>
<url>rtsp://192.168.1.4/live</url>
<user>admin</user>
<pass>admin</pass>
<transfer>TCP</transfer>
<ondemand>1</ondemand>
</proxy>
...
</config>
Start the rtsp server, then use rtsp client to play the following rtsp stream:
rtsp://192.168.1.10/proxy1
rtsp://192.168.1.10/proxy2