From 4d9a55b92485d1591c76c798126dd1df7098cde0 Mon Sep 17 00:00:00 2001 From: xiongguangjie Date: Sat, 4 Jun 2022 13:31:15 +0800 Subject: [PATCH] add srt usage for zlm --- srt/srt.md | 25 +++++++++++++++++++++++++ srt/srt_en.md | 24 ++++++++++++++++++++++++ 2 files changed, 49 insertions(+) create mode 100644 srt/srt.md create mode 100644 srt/srt_en.md diff --git a/srt/srt.md b/srt/srt.md new file mode 100644 index 00000000..2d504720 --- /dev/null +++ b/srt/srt.md @@ -0,0 +1,25 @@ +## 特性 +- NACK(重传) +- listener 支持 +- 推流只支持ts推流 +- 拉流只支持ts拉流 +- 协议实现 [参考](https://haivision.github.io/srt-rfc/draft-sharabayko-srt.html) +- 版本支持(>=1.3.0) +- fec与加密没有实现 + +## 使用 + +zlm中的srt更加streamid 来确定是推流还是拉流,来确定vhost,app,streamid(ZLM中的) +srt中的streamid 为 `//?type=& =` + +- OBS 推流地址 + + `srt://192.168.1.105:9000?streamid=__defaultVhost__/live/test?type=push` +- ffmpeg 推流 + + `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"` +- ffplay 拉流 + + `ffplay -i srt://192.168.1.105:9000?streamid=__defaultVhost__/live/test` + +- vlc 不支持,因为无法指定streamid[参考](https://github.com/Haivision/srt/issues/1015) \ No newline at end of file diff --git a/srt/srt_en.md b/srt/srt_en.md new file mode 100644 index 00000000..c4ef2b1d --- /dev/null +++ b/srt/srt_en.md @@ -0,0 +1,24 @@ +## feature +- NACK support +- listener support +- push stream payload must ts +- pull stream payload is ts +- protocol impliment [reference](https://haivision.github.io/srt-rfc/draft-sharabayko-srt.html) +- version support (>=1.3.0) +- fec and encriyped not support + +## usage + +zlm get vhost,app,streamid and push or play by streamid of srt like this `//?type=& =` + +- OBS push stream url + + `srt://192.168.1.105:9000?streamid=__defaultVhost__/live/test?type=push` +- 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"` +- ffplay pull + + `ffplay -i srt://192.168.1.105:9000?streamid=__defaultVhost__/live/test` + +- vlc not support ,because can't set stream id [reference](https://github.com/Haivision/srt/issues/1015) \ No newline at end of file