Browse Source

change default RTSPS port (#867)

pull/923/head
aler9 3 years ago
parent
commit
1e07636f86
  1. 8
      README.md
  2. 2
      internal/conf/conf.go
  3. 6
      internal/core/api_test.go
  4. 2
      internal/core/rtsp_server_test.go
  5. 2
      rtsp-simple-server.yml

8
README.md

@ -639,7 +639,7 @@ ffmpeg -rtsp_transport udp_multicast -i rtsp://localhost:8554/mystream -c copy o
or _GStreamer_: 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): or _VLC_ (append `?vlcmulticast` to the URL):
@ -666,16 +666,16 @@ serverKey: server.key
serverCert: server.crt 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: 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_. 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_.

2
internal/conf/conf.go

@ -306,7 +306,7 @@ func (conf *Conf) CheckAndFillMissing() error {
} }
if conf.RTSPSAddress == "" { if conf.RTSPSAddress == "" {
conf.RTSPSAddress = ":8555" conf.RTSPSAddress = ":8322"
} }
if conf.RTPAddress == "" { if conf.RTPAddress == "" {

6
internal/core/api_test.go

@ -207,7 +207,7 @@ func TestAPIPathsList(t *testing.T) {
TLSConfig: &tls.Config{InsecureSkipVerify: true}, TLSConfig: &tls.Config{InsecureSkipVerify: true},
} }
err := source.StartPublishing("rtsps://localhost:8555/mypath", err := source.StartPublishing("rtsps://localhost:8322/mypath",
gortsplib.Tracks{track}) gortsplib.Tracks{track})
require.NoError(t, err) require.NoError(t, err)
defer source.Close() defer source.Close()
@ -268,7 +268,7 @@ func TestAPIList(t *testing.T) {
TLSConfig: &tls.Config{InsecureSkipVerify: true}, TLSConfig: &tls.Config{InsecureSkipVerify: true},
} }
err := source.StartPublishing("rtsps://localhost:8555/mypath", err := source.StartPublishing("rtsps://localhost:8322/mypath",
gortsplib.Tracks{track}) gortsplib.Tracks{track})
require.NoError(t, err) require.NoError(t, err)
defer source.Close() defer source.Close()
@ -399,7 +399,7 @@ func TestAPIKick(t *testing.T) {
TLSConfig: &tls.Config{InsecureSkipVerify: true}, TLSConfig: &tls.Config{InsecureSkipVerify: true},
} }
err := source.StartPublishing("rtsps://localhost:8555/mypath", err := source.StartPublishing("rtsps://localhost:8322/mypath",
gortsplib.Tracks{track}) gortsplib.Tracks{track})
require.NoError(t, err) require.NoError(t, err)
defer source.Close() defer source.Close()

2
internal/core/rtsp_server_test.go

@ -50,7 +50,7 @@ func TestRTSPServerPublishRead(t *testing.T) {
defer p.close() defer p.close()
} else { } else {
proto = "rtsps" proto = "rtsps"
port = "8555" port = "8322"
serverCertFpath, err := writeTempFile(serverCert) serverCertFpath, err := writeTempFile(serverCert)
require.NoError(t, err) require.NoError(t, err)

2
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". # Address of the TCP/RTSP listener. This is needed only when encryption is "no" or "optional".
rtspAddress: :8554 rtspAddress: :8554
# Address of the TCP/TLS/RTSPS listener. This is needed only when encryption is "strict" or "optional". # 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. # Address of the UDP/RTP listener. This is needed only when "udp" is in protocols.
rtpAddress: :8000 rtpAddress: :8000
# Address of the UDP/RTCP listener. This is needed only when "udp" is in protocols. # Address of the UDP/RTCP listener. This is needed only when "udp" is in protocols.

Loading…
Cancel
Save