"直播保存位置Web服务":0,
```
-开启之后,启动会显示服务地址,在局域网内打开网址可以取得所有直播流的串流地址。
+开启之后,启动会显示服务地址,在局域网内打开网址可以取得所有直播流的串流地址
+
+支持跨域,注意:在https网站默认无法加载非本机http服务
- dtmp结尾:当前正在获取的流,播放此链接时进度将保持当前流进度
- flv/m3u8结尾:保存完毕的直播流,播放此链接时将从头开始播放
I: 2021/04/13 20:07:45 命令行操作 [直播Web服务: http://192.168.31.245:38259]
```
+测试可用项目:
+
+- [bilibili/flv.js](https://github.com/bilibili/flv.js)
+- [bytedance/xgplayer](https://github.com/bytedance/xgplayer)
+- [video-dev/hls.js](https://github.com/video-dev/hls.js)
+- [mpv](https://mpv.io/)
+
#### 命令行操作
在准备动作完成(`T: 2021/03/06 16:22:39 命令行操作 [回车查看帮助]`)后,输入回车将显示帮助
byteC := make(chan []byte,1024*1024*30)//传来的关键帧间隔buf为3s,避免超出buf,设为30M
go func(){
- for !p.Checkfile().IsExist(savestream.path + ".flv.dtmp") {
- time.Sleep(time.Second)
- }
- if err := Stream(savestream.path + ".flv.dtmp",&savestream.flv_front,byteC,exit_chan);err != nil {
- flog.L(`T: `,err);
- return
+ for !p.Checkfile().IsExist(savestream.path + ".flv.dtmp") {time.Sleep(time.Second)}
+ for {
+ if err := Stream(savestream.path + ".flv.dtmp",&savestream.flv_front,byteC,exit_chan);err != nil {
+ flog.L(`T: `,err);
+ return
+ }
+ select {
+ case <-exit_chan:return;
+ default:;
+ }
}
}()