Video re-transmitter
RTSP proxy + Rtsp to WebSocket + Http control mode
Program requires 1 argument to start(in combined mode this argument is ignored, so if you are going to use combined mode, you can just type any single char to bypass args check)
example: rtsp://username:password@127.0.0.1:554/?trackID=1
-p - RTSP proxy
-w - video translation through websocket(fMP4)
-h - combined mode with control by HTTP API
In case of combined mode, some of program options might be ignored as further adding of rtsp remote sources is done through HTTP API. Each newly added rtsp remote source in combined mode is connected via TCP(known bug, UDP is implemented, but not wired with HTTP API)
Each mode has additional option - local port. If you are going to use port choosen by system - set option value to 0.
-p:p - local RTSP proxy port
-w:p - local websocket translation port
-h:p - local HTTP port for combined mode
JUNK 0
DEBUG 1
INFO 2
NOTICE 3
WARN 4
ERR 5
CRITICAL 6
EMERGENCY 7
tcp
udp
POST, JSON /add_proxy
{
'remote_address':<remote_rtsp_address>,
'local_port':<local_port>
}
local_port - local Rtsp proxy port, for system auto-selected port put 0
POST,JSON /stop_proxy
{
'id':<proxy_id>
}
GET /proxy_list
POST, JSON /add_broadcast`
{
'remote_address':<remote_rtsp_address>,
'lifetime':<websocket_stream_lifetime>,
'active_time':<websocket_stream_active_time>
}
websocket_stream_lifetime - total duration of websocket translation(seconds). Once this parameter becomes greater than application running time - translation stops. Put 0 to avoid this limitation.
websocket_stream_active_time - If translation does not have any clients connected for this period of time - translation will be stopped. Put 0 to avoid this limitation.
POST, JSON /stop_broadcast
{
'id':<websocket_broadcast_id>
}
GET /broadcast_list
Example - starting in rtsp proxy mode with verbosity level INFO on local port 6060, remote rtsp connections use TCP protocol
Example - starting in websocket translation mode with verbosity level INFO on local port 6060, remote rtsp connections use UDP protocol
#Examples of using program in combined mode could be found in /web folder.