change srt streamid like srs srt streamid

This commit is contained in:
xiongguangjie
2022-06-11 21:37:41 +08:00
parent 4d6cff36b8
commit f8373302d0
5 changed files with 151 additions and 61 deletions

View File

@@ -9,16 +9,35 @@
## usage
zlm get vhost,app,streamid and push or play by streamid of srt like this `<vhost>/<app>/<streamid>?type=<push|play>& <other>=<other>`
zlm get vhost,app,streamid and push or play by streamid of srt like this
`#!::key1=value1,key2=value2,key3=value4......`
h and r is special key,to get vhost app streamid, if h not exist ,vhost is default value
m is special key, to judge is push or pull, if vaule is publish the mode is pushotherwise is play, if m not exist, mode is play
other key and m ,can use by webhook to auth for play or push
like
#!::h=zlmediakit.com,r=live/test,m=publish
vhost = zlmediakit.com
app = live
streamid = test
mode is push
- OBS push stream url
`srt://192.168.1.105:9000?streamid=__defaultVhost__/live/test?type=push`
`srt://192.168.1.105:9000?streamid=#!::r=live/test,m=publish`
- ffmpeg push
`ffmpeg -re -stream_loop -1 -i test.ts -c:v copy -c:a copy -f mpegts srt://192.168.1.105:9000?streamid="__defaultVhost__/live/test?type=push"`
`ffmpeg -re -stream_loop -1 -i test.ts -c:v copy -c:a copy -f mpegts srt://192.168.1.105:9000?streamid=#!::r=live/test,m=publish`
- ffplay pull
`ffplay -i srt://192.168.1.105:9000?streamid=__defaultVhost__/live/test`
`ffplay -i srt://192.168.1.105:9000?streamid=#!::r=live/test`
- vlc not support ,because can't set stream id [reference](https://github.com/Haivision/srt/issues/1015)