jaryhe 67001cd674 new | 6 bulan lalu | |
---|---|---|
.. | ||
LICENSE | 6 bulan lalu | |
README.en.md | 6 bulan lalu | |
README.md | 6 bulan lalu | |
client.go | 6 bulan lalu | |
go.mod | 6 bulan lalu | |
go.sum | 6 bulan lalu | |
main.go | 6 bulan lalu | |
publisher.go | 6 bulan lalu | |
server.go | 6 bulan lalu | |
subscriber.go | 6 bulan lalu |
简体中文 | English
The RTSP plugin provides the ability to push and pull the RTSP protocol and also to push and pull the RTSP protocol to remote servers.
https://github.com/Monibuca/plugin-rtsp
import (
_ "m7s.live/plugin/rtsp/v4"
)
rtsp://localhost/live/test
localhost
is the m7s server domain name or IP address, and the default port 554
can be omitted, otherwise it is required to be written.live
represents appName
test
represents streamName
live/test
in m7s will serve as the stream identity.For example, push stream to m7s through ffmpeg
ffmpeg -i [video source] -c:v h264 -c:a aac -f rtsp rtsp://localhost/live/test
This will create a stream named live/test
inside m7s.
If the live/test
stream already exists in m7s, then you can use the RTSP protocol to play it.
ffplay rtsp://localhost/live/test
rtsp:
publish: # Refer to the global configuration format
subscribe: # Refer to the global configuration format
pull: # Format reference document https://m7s.live/guide/config.html#%E6%8F%92%E4%BB%B6%E9%85%8D%E7%BD%AE
push: # Format reference document https://m7s.live/guide/config.html#%E6%8F%92%E4%BB%B6%E9%85%8D%E7%BD%AE
listenaddr: :554
udpaddr: :8000
rtcpaddr: :8001
readbuffercount: 2048
writebuffercount: 2048
:::tip Configuration override publish and subscribe, any section not configured will use global configuration. :::
rtsp/api/list
Get all RTSP streams
rtsp/api/pull?target=[RTSP address]&streamPath=[Stream identity]&save=[0|1|2]
Pull the RTSP to m7s from a remote server
The RTSP address needs to be urlencoded to prevent special characters from affecting parsing
rtsp/api/push?target=[RTSP address]&streamPath=[Stream identity]
Push local streams to remote servers