Intended to help play RTSP streams from IP Cams (and some other URL types) in browsers.
Online demo: http://ipcam.stream:5080
sudo snap install rtsp-to-webrtsp --edge
;http://your.server.address:5080/
;sudoedit /var/snap/rtsp-to-webrtsp/common/restreamer.conf
;sudo snap restart rtsp-to-webrtsp
;streamers
section with something like
streamers: (
{
name: "Your source name"
url: "rtsp://your.ip.cam.address:port/path"
}
)
sudo snap restart rtsp-to-webrtsp
;webrtc
section uncomment stun-server
(and maybe replace value with your preferable STUN server), min-rtp-port
and rtp-ports-count
(and provide some reasonable values)
webrtc: {
stun-server: "stun://stun.l.google.com:19302"
min-rtp-port: 6000
rtp-ports-count: 100
}
use-coturn: false
in agents
section
agents: {
use-coturn: false
}
webrtc
section)sudo snap restart rtsp-to-webrtsp
;users
section of config file;streamers
section proxy
streamer for Remote Agent
streamers: (
{
name: "Proxy for Remote Agent"
type: "proxy"
agent-token: "some random and pretty long string"
}
)
sudo snap restart rtsp-to-webrtsp
;signalling-server
section with the same properties you've defined on the server
signalling-server: {
host: "your.server.address"
tls: true // or `false` if you didn't configure TLS on server
uri: "Proxy for Remote Agent"
token: "some random and pretty long string"
}
sudo snap restart rtsp-to-webrtsp
;streamers
section with something like
streamers: (
{
restream: false
name: "DVR"
type: "record"
record-token: "some-random-string"
recordings-dir: "recordings" // path relative to %SNAP_COMMON% (/var/snap/rtsp-to-webrtsp/common/) where recordings will be placed
recordings-dir-max-size: 1024
recording-chunk-size: 10
}
)
sudo snap restart rtsp-to-webrtsp
;webrtsp-record-streamer
as described here;/var/snap/rtsp-to-webrtsp/common/recordings/DVR/
;./enableTLS.sh root@your.server.address:22 you@gmail.com
;https://your.server.address:5443/
;sudo snap logs rtsp-to-webrtsp -f
;