From 1e07636f86936568002a34715fde9b12ebf19276 Mon Sep 17 00:00:00 2001 From: aler9 <46489434+aler9@users.noreply.github.com> Date: Sat, 16 Apr 2022 16:24:40 +0200 Subject: [PATCH] change default RTSPS port (#867) --- README.md | 8 ++++---- internal/conf/conf.go | 2 +- internal/core/api_test.go | 6 +++--- internal/core/rtsp_server_test.go | 2 +- rtsp-simple-server.yml | 2 +- 5 files changed, 10 insertions(+), 10 deletions(-) diff --git a/README.md b/README.md index e0029d65..87b2bac0 100644 --- a/README.md +++ b/README.md @@ -639,7 +639,7 @@ ffmpeg -rtsp_transport udp_multicast -i rtsp://localhost:8554/mystream -c copy o or _GStreamer_: ``` -gst-launch-1.0 rtspsrc protocols=udp-mcast location=rtsps://ip:8555/... +gst-launch-1.0 rtspsrc protocols=udp-mcast location=rtsps://ip:8554/... ``` or _VLC_ (append `?vlcmulticast` to the URL): @@ -666,16 +666,16 @@ serverKey: server.key serverCert: server.crt ``` -Streams can then be published and read with the `rtsps` scheme and the `8555` port: +Streams can then be published and read with the `rtsps` scheme and the `8322` port: ``` -ffmpeg -i rtsps://ip:8555/... +ffmpeg -i rtsps://ip:8322/... ``` If the client is _GStreamer_, disable the certificate validation: ``` -gst-launch-1.0 rtspsrc tls-validation-flags=0 location=rtsps://ip:8555/... +gst-launch-1.0 rtspsrc tls-validation-flags=0 location=rtsps://ip:8322/... ``` At the moment _VLC_ doesn't support reading encrypted RTSP streams. A workaround consists in launching an instance of _rtsp-simple-server_ on the same machine in which _VLC_ is running, using it for reading the encrypted stream with the proxy mode, and reading the proxied stream with _VLC_. diff --git a/internal/conf/conf.go b/internal/conf/conf.go index a0b7ef80..052bdba0 100644 --- a/internal/conf/conf.go +++ b/internal/conf/conf.go @@ -306,7 +306,7 @@ func (conf *Conf) CheckAndFillMissing() error { } if conf.RTSPSAddress == "" { - conf.RTSPSAddress = ":8555" + conf.RTSPSAddress = ":8322" } if conf.RTPAddress == "" { diff --git a/internal/core/api_test.go b/internal/core/api_test.go index 87b2f571..0ac30541 100644 --- a/internal/core/api_test.go +++ b/internal/core/api_test.go @@ -207,7 +207,7 @@ func TestAPIPathsList(t *testing.T) { TLSConfig: &tls.Config{InsecureSkipVerify: true}, } - err := source.StartPublishing("rtsps://localhost:8555/mypath", + err := source.StartPublishing("rtsps://localhost:8322/mypath", gortsplib.Tracks{track}) require.NoError(t, err) defer source.Close() @@ -268,7 +268,7 @@ func TestAPIList(t *testing.T) { TLSConfig: &tls.Config{InsecureSkipVerify: true}, } - err := source.StartPublishing("rtsps://localhost:8555/mypath", + err := source.StartPublishing("rtsps://localhost:8322/mypath", gortsplib.Tracks{track}) require.NoError(t, err) defer source.Close() @@ -399,7 +399,7 @@ func TestAPIKick(t *testing.T) { TLSConfig: &tls.Config{InsecureSkipVerify: true}, } - err := source.StartPublishing("rtsps://localhost:8555/mypath", + err := source.StartPublishing("rtsps://localhost:8322/mypath", gortsplib.Tracks{track}) require.NoError(t, err) defer source.Close() diff --git a/internal/core/rtsp_server_test.go b/internal/core/rtsp_server_test.go index ef6a528f..8dbf7150 100644 --- a/internal/core/rtsp_server_test.go +++ b/internal/core/rtsp_server_test.go @@ -50,7 +50,7 @@ func TestRTSPServerPublishRead(t *testing.T) { defer p.close() } else { proto = "rtsps" - port = "8555" + port = "8322" serverCertFpath, err := writeTempFile(serverCert) require.NoError(t, err) diff --git a/rtsp-simple-server.yml b/rtsp-simple-server.yml index 688f627a..38b8d703 100644 --- a/rtsp-simple-server.yml +++ b/rtsp-simple-server.yml @@ -73,7 +73,7 @@ encryption: "no" # Address of the TCP/RTSP listener. This is needed only when encryption is "no" or "optional". rtspAddress: :8554 # Address of the TCP/TLS/RTSPS listener. This is needed only when encryption is "strict" or "optional". -rtspsAddress: :8555 +rtspsAddress: :8322 # Address of the UDP/RTP listener. This is needed only when "udp" is in protocols. rtpAddress: :8000 # Address of the UDP/RTCP listener. This is needed only when "udp" is in protocols.