srs/trunk/3rdparty/srs-bench/vendor/modules.txt
Haibo Chen(陈海博) 5dc292ce64
NEW PROTOCOL: Support viewing stream over RTSP. v7.0.47 (#4333)
## Introduce

This PR adds support for viewing streams via the RTSP protocol. Note
that it only supports viewing streams, not publishing streams via RTSP.

Currently, only publishing via RTMP is supported, which is then
converted to RTSP. Further work is needed to support publishing RTC/SRT
streams and converting them to RTSP.

## Usage

Build and run SRS with RTSP support:

```
cd srs/trunk && ./configure --rtsp=on && make -j16
./objs/srs -c conf/rtsp.conf
```

Push stream via RTMP by FFmpeg:

```
ffmpeg -re -i doc/source.flv -c copy -f flv rtmp://localhost/live/livestream
```

View the stream via RTSP protocol, try UDP first, then use TCP:

```
ffplay -i rtsp://localhost:8554/live/livestream
```

Or specify the transport protocol with TCP:

```
ffplay -rtsp_transport tcp -i rtsp://localhost:8554/live/livestream
```

## Unit Test

Run utest for RTSP:

```
./configure --utest=on & make utest -j16
./objs/srs_utest
```

## Regression Test

You need to start SRS for regression testing.

```
./objs/srs -c conf/regression-test-for-clion.conf
```

Then run regression tests for RTSP.

```
cd srs/trunk/3rdparty/srs-bench
go test ./srs -mod=vendor -v -count=1 -run=TestRtmpPublish_RtspPlay
```

## Blackbox Test

For blackbox testing, SRS will be started by utest, so there is no need
to start SRS manually.

```
cd srs/trunk/3rdparty/srs-bench
go test ./blackbox -mod=vendor -v -count=1 -run=TestFast_RtmpPublish_RtspPlay_Basic
```

## UDP Transport

As UDP requires port allocation, this PR doesn't support delivering
media stream via UDP transport, so it will fail if you try to use UDP as
transport:

```
ffplay -rtsp_transport udp -i rtsp://localhost:8554/live/livestream

[rtsp @ 0x7fbc99a14880] method SETUP failed: 461 Unsupported Transport
rtsp://localhost:8554/live/livestream: Protocol not supported

[2025-07-05 21:30:52.738][WARN][14916][7d7gf623][35] RTSP: setup failed: code=2057
(RtspTransportNotSupported) : UDP transport not supported, only TCP/interleaved mode is supported
```

There are no plans to support UDP transport for RTSP. In the real world,
UDP is rarely used; the vast majority of RTSP traffic uses TCP.

## Play Before Publish

RTSP supports audio with AAC and OPUS codecs, which is significantly
different from RTMP or WebRTC.

RTSP uses commands to exchange SDP and specify the audio track to play,
unlike WHEP or HTTP-FLV, which use the query string of the URL. RTSP
depends on the player’s behavior, making it very difficult to use and
describe.

Considering the feature that allows playing the stream before publishing
it, it requires generating some default parameters in the SDP. For OPUS,
the sample rate is 48 kHz with 2 channels, while AAC is more complex,
especially regarding the sample rate, which may be 44.1 kHz, 32 kHz, or
48 kHz.

Therefore, for RTSP, we cannot support play-then-publish. Instead, there
must already be a stream when playing it, so that the audio codec is
determined.

## Opus Codec

No Opus codec support for RTSP, because for RTC2RTSP, it always converts
RTC to RTMP frames, then converts them to RTSP packets. Therefore, the
audio codec is always AAC after converting RTC to RTMP.

This means the bridge architecture needs some changes. We need a new
bridge that binds to the target protocol. For example, RTC2RTMP converts
the audio codec, but RTC2RTSP keeps the original audio codec.

Furthermore, the RTC2RTMP bridge should also support bypassing the Opus
codec if we use enhanced-RTMP, which supports the Opus audio codec. I
think it should be configurable to either transcode or bypass the audio
codec. However, this is not relevant to RTSP.

## AI Contributor

Below commits are contributed by AI:

* [AI: Remove support for media transport via
UDP.](755686229f)
* [AI: Add crutial logs for each RTSP
stage.](9c8cbe7bde)
* [AI: Support AAC doec for
RTSP.](7d7cc12bae)
* [AI: Add option --rtsp for
RTSP.](f67414d9ee)
* [AI: Extract SrsRtpVideoBuilder for RTC and
RTSP.](562e76b904)

---------

Co-authored-by: Jacob Su <suzp1984@gmail.com>
Co-authored-by: winlin <winlinvip@gmail.com>
2025-07-11 08:18:40 -04:00

261 lines
9.0 KiB
Plaintext

# github.com/bluenviron/gortsplib/v4 v4.13.1
## explicit; go 1.21.0
github.com/bluenviron/gortsplib/v4
github.com/bluenviron/gortsplib/v4/pkg/auth
github.com/bluenviron/gortsplib/v4/pkg/base
github.com/bluenviron/gortsplib/v4/pkg/bytecounter
github.com/bluenviron/gortsplib/v4/pkg/conn
github.com/bluenviron/gortsplib/v4/pkg/description
github.com/bluenviron/gortsplib/v4/pkg/format
github.com/bluenviron/gortsplib/v4/pkg/format/rtpac3
github.com/bluenviron/gortsplib/v4/pkg/format/rtpav1
github.com/bluenviron/gortsplib/v4/pkg/format/rtph264
github.com/bluenviron/gortsplib/v4/pkg/format/rtph265
github.com/bluenviron/gortsplib/v4/pkg/format/rtplpcm
github.com/bluenviron/gortsplib/v4/pkg/format/rtpmjpeg
github.com/bluenviron/gortsplib/v4/pkg/format/rtpmpeg1audio
github.com/bluenviron/gortsplib/v4/pkg/format/rtpmpeg1video
github.com/bluenviron/gortsplib/v4/pkg/format/rtpmpeg4audio
github.com/bluenviron/gortsplib/v4/pkg/format/rtpmpeg4video
github.com/bluenviron/gortsplib/v4/pkg/format/rtpsimpleaudio
github.com/bluenviron/gortsplib/v4/pkg/format/rtpvp8
github.com/bluenviron/gortsplib/v4/pkg/format/rtpvp9
github.com/bluenviron/gortsplib/v4/pkg/headers
github.com/bluenviron/gortsplib/v4/pkg/liberrors
github.com/bluenviron/gortsplib/v4/pkg/multicast
github.com/bluenviron/gortsplib/v4/pkg/ringbuffer
github.com/bluenviron/gortsplib/v4/pkg/rtcpreceiver
github.com/bluenviron/gortsplib/v4/pkg/rtcpsender
github.com/bluenviron/gortsplib/v4/pkg/rtplossdetector
github.com/bluenviron/gortsplib/v4/pkg/rtpreorderer
github.com/bluenviron/gortsplib/v4/pkg/rtptime
github.com/bluenviron/gortsplib/v4/pkg/sdp
# github.com/bluenviron/mediacommon/v2 v2.1.0
## explicit; go 1.21.0
github.com/bluenviron/mediacommon/v2/pkg/bits
github.com/bluenviron/mediacommon/v2/pkg/codecs/ac3
github.com/bluenviron/mediacommon/v2/pkg/codecs/av1
github.com/bluenviron/mediacommon/v2/pkg/codecs/h264
github.com/bluenviron/mediacommon/v2/pkg/codecs/h265
github.com/bluenviron/mediacommon/v2/pkg/codecs/jpeg
github.com/bluenviron/mediacommon/v2/pkg/codecs/mpeg1audio
github.com/bluenviron/mediacommon/v2/pkg/codecs/mpeg4audio
github.com/bluenviron/mediacommon/v2/pkg/codecs/mpeg4video
github.com/bluenviron/mediacommon/v2/pkg/codecs/vp8
github.com/bluenviron/mediacommon/v2/pkg/codecs/vp9
# github.com/ghettovoice/gosip v0.0.0-20220929080231-de8ba881be83
## explicit; go 1.13
github.com/ghettovoice/gosip/log
github.com/ghettovoice/gosip/sip
github.com/ghettovoice/gosip/sip/parser
github.com/ghettovoice/gosip/timing
github.com/ghettovoice/gosip/transport
github.com/ghettovoice/gosip/util
# github.com/gobwas/httphead v0.1.0
## explicit; go 1.15
github.com/gobwas/httphead
# github.com/gobwas/pool v0.2.1
## explicit
github.com/gobwas/pool
github.com/gobwas/pool/internal/pmath
github.com/gobwas/pool/pbufio
github.com/gobwas/pool/pbytes
# github.com/gobwas/ws v1.1.0-rc.1
## explicit; go 1.15
github.com/gobwas/ws
github.com/gobwas/ws/wsutil
# github.com/google/gopacket v1.1.19
## explicit; go 1.12
github.com/google/gopacket
github.com/google/gopacket/layers
github.com/google/gopacket/pcapgo
# github.com/google/uuid v1.6.0
## explicit
github.com/google/uuid
# github.com/haivision/srtgo v0.0.0-20230627061225-a70d53fcd618
## explicit; go 1.12
github.com/haivision/srtgo
# github.com/konsorten/go-windows-terminal-sequences v1.0.2
## explicit
github.com/konsorten/go-windows-terminal-sequences
# github.com/mattn/go-colorable v0.1.4
## explicit
github.com/mattn/go-colorable
# github.com/mattn/go-isatty v0.0.8
## explicit
github.com/mattn/go-isatty
# github.com/mattn/go-pointer v0.0.1
## explicit
github.com/mattn/go-pointer
# github.com/mgutz/ansi v0.0.0-20170206155736-9520e82c474b
## explicit
github.com/mgutz/ansi
# github.com/ossrs/go-oryx-lib v0.0.9
## explicit
github.com/ossrs/go-oryx-lib/aac
github.com/ossrs/go-oryx-lib/amf0
github.com/ossrs/go-oryx-lib/avc
github.com/ossrs/go-oryx-lib/errors
github.com/ossrs/go-oryx-lib/flv
github.com/ossrs/go-oryx-lib/http
github.com/ossrs/go-oryx-lib/logger
github.com/ossrs/go-oryx-lib/rtmp
# github.com/pion/datachannel v1.5.10
## explicit; go 1.20
github.com/pion/datachannel
# github.com/pion/dtls/v3 v3.0.6
## explicit; go 1.20
github.com/pion/dtls/v3
github.com/pion/dtls/v3/internal/ciphersuite
github.com/pion/dtls/v3/internal/ciphersuite/types
github.com/pion/dtls/v3/internal/closer
github.com/pion/dtls/v3/internal/net
github.com/pion/dtls/v3/internal/net/udp
github.com/pion/dtls/v3/internal/util
github.com/pion/dtls/v3/pkg/crypto/ccm
github.com/pion/dtls/v3/pkg/crypto/ciphersuite
github.com/pion/dtls/v3/pkg/crypto/clientcertificate
github.com/pion/dtls/v3/pkg/crypto/elliptic
github.com/pion/dtls/v3/pkg/crypto/fingerprint
github.com/pion/dtls/v3/pkg/crypto/hash
github.com/pion/dtls/v3/pkg/crypto/prf
github.com/pion/dtls/v3/pkg/crypto/signature
github.com/pion/dtls/v3/pkg/crypto/signaturehash
github.com/pion/dtls/v3/pkg/net
github.com/pion/dtls/v3/pkg/protocol
github.com/pion/dtls/v3/pkg/protocol/alert
github.com/pion/dtls/v3/pkg/protocol/extension
github.com/pion/dtls/v3/pkg/protocol/handshake
github.com/pion/dtls/v3/pkg/protocol/recordlayer
# github.com/pion/ice/v4 v4.0.10
## explicit; go 1.20
github.com/pion/ice/v4
github.com/pion/ice/v4/internal/atomic
github.com/pion/ice/v4/internal/fakenet
github.com/pion/ice/v4/internal/stun
github.com/pion/ice/v4/internal/taskloop
# github.com/pion/interceptor v0.1.40
## explicit; go 1.20
github.com/pion/interceptor
github.com/pion/interceptor/internal/ntp
github.com/pion/interceptor/internal/rtpbuffer
github.com/pion/interceptor/internal/sequencenumber
github.com/pion/interceptor/pkg/flexfec
github.com/pion/interceptor/pkg/flexfec/util
github.com/pion/interceptor/pkg/nack
github.com/pion/interceptor/pkg/report
github.com/pion/interceptor/pkg/rfc8888
github.com/pion/interceptor/pkg/twcc
# github.com/pion/logging v0.2.4
## explicit; go 1.20
github.com/pion/logging
# github.com/pion/mdns/v2 v2.0.7
## explicit; go 1.19
github.com/pion/mdns/v2
# github.com/pion/randutil v0.1.0
## explicit; go 1.14
github.com/pion/randutil
# github.com/pion/rtcp v1.2.15
## explicit; go 1.20
github.com/pion/rtcp
# github.com/pion/rtp v1.8.20
## explicit; go 1.20
github.com/pion/rtp
github.com/pion/rtp/codecs
github.com/pion/rtp/codecs/av1/obu
github.com/pion/rtp/codecs/vp9
# github.com/pion/sctp v1.8.39
## explicit; go 1.20
github.com/pion/sctp
# github.com/pion/sdp/v3 v3.0.14
## explicit; go 1.20
github.com/pion/sdp/v3
# github.com/pion/srtp/v3 v3.0.6
## explicit; go 1.20
github.com/pion/srtp/v3
# github.com/pion/stun/v3 v3.0.0
## explicit; go 1.19
github.com/pion/stun/v3
github.com/pion/stun/v3/internal/hmac
# github.com/pion/transport/v3 v3.0.7
## explicit; go 1.19
github.com/pion/transport/v3
github.com/pion/transport/v3/deadline
github.com/pion/transport/v3/netctx
github.com/pion/transport/v3/packetio
github.com/pion/transport/v3/replaydetector
github.com/pion/transport/v3/stdnet
github.com/pion/transport/v3/utils/xor
github.com/pion/transport/v3/vnet
# github.com/pion/turn/v4 v4.0.2
## explicit; go 1.20
github.com/pion/turn/v4
github.com/pion/turn/v4/internal/allocation
github.com/pion/turn/v4/internal/client
github.com/pion/turn/v4/internal/ipnet
github.com/pion/turn/v4/internal/proto
github.com/pion/turn/v4/internal/server
# github.com/pion/webrtc/v4 v4.1.3
## explicit; go 1.20
github.com/pion/webrtc/v4
github.com/pion/webrtc/v4/internal/fmtp
github.com/pion/webrtc/v4/internal/mux
github.com/pion/webrtc/v4/internal/util
github.com/pion/webrtc/v4/pkg/media
github.com/pion/webrtc/v4/pkg/media/h264reader
github.com/pion/webrtc/v4/pkg/media/h264writer
github.com/pion/webrtc/v4/pkg/media/h265reader
github.com/pion/webrtc/v4/pkg/media/ivfwriter
github.com/pion/webrtc/v4/pkg/media/oggreader
github.com/pion/webrtc/v4/pkg/media/oggwriter
github.com/pion/webrtc/v4/pkg/rtcerr
# github.com/pkg/errors v0.9.1
## explicit
github.com/pkg/errors
# github.com/satori/go.uuid v1.2.1-0.20181028125025-b2ce2384e17b
## explicit
github.com/satori/go.uuid
# github.com/sirupsen/logrus v1.4.2
## explicit
github.com/sirupsen/logrus
# github.com/tevino/abool v0.0.0-20170917061928-9b9efcf221b5
## explicit
github.com/tevino/abool
# github.com/wlynxg/anet v0.0.5
## explicit; go 1.20
github.com/wlynxg/anet
# github.com/x-cray/logrus-prefixed-formatter v0.5.2
## explicit
github.com/x-cray/logrus-prefixed-formatter
# github.com/yapingcat/gomedia/codec v0.0.0-20220617074658-94762898dc25
## explicit; go 1.16
github.com/yapingcat/gomedia/codec
# github.com/yapingcat/gomedia/mpeg2 v0.0.0-20220617074658-94762898dc25
## explicit; go 1.16
github.com/yapingcat/gomedia/mpeg2
# golang.org/x/crypto v0.39.0
## explicit; go 1.23.0
golang.org/x/crypto/cryptobyte
golang.org/x/crypto/cryptobyte/asn1
golang.org/x/crypto/curve25519
golang.org/x/crypto/ssh/terminal
# golang.org/x/net v0.41.0
## explicit; go 1.23.0
golang.org/x/net/bpf
golang.org/x/net/dns/dnsmessage
golang.org/x/net/internal/iana
golang.org/x/net/internal/socket
golang.org/x/net/internal/socks
golang.org/x/net/ipv4
golang.org/x/net/ipv6
golang.org/x/net/proxy
# golang.org/x/sys v0.33.0
## explicit; go 1.23.0
golang.org/x/sys/cpu
golang.org/x/sys/plan9
golang.org/x/sys/unix
golang.org/x/sys/windows
# golang.org/x/term v0.32.0
## explicit; go 1.23.0
golang.org/x/term