Forward RTSP stream to remote socket (RTSP Proxy?)

佐手、 提交于 2019-11-29 14:54:09

I don't know RTSP, but it seems to be a standard TCP-only protocol. Try to run on server A:

ssh -g -R 554:192.168.1.50:554 server_B_hostname

This will open the public port 554 on Server B, and forward it to 192.168.1.50:554 from A's point of view.

Some servers have sshd configured to refuse the ssh -g -R forwarding (for no good reason). If you can, you should check /etc/ssh/sshd_config on Server B and add AllowTcpForwarding yes.

RTSP is a TCP controlling protocol towards a streaming server. The protocol uses OPTION commands to get info about the stream. When the client has enough info about the server and it's capabilities can send a PLAY command with a 'transport string' telling it. How to stream, Usually on UDP port 554. The client prior to send the PLAY, should be prepared to do recfrom(SRV UDP, PORT). There are transport commands that can make the server to stream on the TCP as well. Saying this I guess you can write your own RTSP+DATA proxy on the local NET. Keep in mind you have to pass also all the TCP headers going on all the time between parties, telling the client current frames, and such. On the 'CLOUD' server you need another custom software to be able to get what you send and expose itself as a rtsp source.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!