mirror of
https://github.com/langhuihui/monibuca.git
synced 2025-12-24 13:48:04 +08:00
该协议为苹果公司推出的低延迟HLS协议,本次更新新增了对该协议播放支持。 同rtsp库一样,采用了第三方库来实现:**github.com/bluenviron/gohlslib** 1.1 使用方法 通过访问形如http://localhost:8080/llhls/live/test/index.m3u8来播放。 其中**live/test**为streamPath,可以替换成实际的值 1.2 插件配置 在llhls下可以配置http配置,用于修改端口号。插件配置方式可以参考文档 1.3 源码说明 llhls相关代码位于**github.com/Monibuca/plugin-hls** 的 **llhls.go** 中。hls和llhls两个插件共用一个代码仓库,因此引入hls时也同时引入了llhls插件。 2 新增HLS.js测试页面 HLS.js测试页面是将hls.js的编译后的代码嵌入到了hls插件仓库中,以方便调试hls流使用。 2.1 访问地址 http://localhost:8080/hls/index.html 该页面也可以用于测试llhls 3 新增对RTMPS协议支持 该协议为RTMP协议的衍生协议,是在TCP基础上增加了TLS安全加固,原理类似HTTPS。 该协议支持是rtmp插件的增强。需要通过配置TLS端口来开启该功能。 3.1 配置 ```yaml rtmp: tcp: listenaddrtls: :4443 ``` 3.2 推流测试 ``` ffmpeg -i source -f flv rtmps://localhost:4443/live/test ``` 如果配置成443端口,则可以省略端口号 3.3 对外推拉流 已经支持,既可以在配置pull或者push中使用rtmps的远程地址 4 其他更新内容 4.1 优化了HLS纯转发模式的资源消耗 > 当只需要将HLS拉流转发时,可以使用纯转发模式 > 纯转发模式由于不需要解析HLS协议中的TS格式,因此对资源消耗比较小。 > 通过配置HLS插件的 **relaymode: 1**开启 4.2 修复了当开启时光回溯功能时的内存泄漏 具体原因是,在进行时间戳判断时忽略了当时间戳超过最大值时的情况,导致ringbuffer无限扩大 > 所谓时光回溯功能,是指可以缓存较多的数据,以订阅当前画面更早一些的画面 > 通过配置**publish**配置中的**buffertime**来开启时光回溯 > 订阅流时需要指定订阅模式,即需要在订阅时加参数`?mode=2` > 如果需要修改参数名称(有时可能会有冲突,可以通过配置submodeargname 来改变 4.3 WebRTC插件测试页面运行URL中带有参数 为了更方便测试WebRTC功能,允许在访问测试页面时,带上参数 4.3.1 推流测试页面 **http://localhost:8080/webrtc/test/publish?streamPath=live/test** 可以推送到**live/test**。不传该参数则推送到**live/webrtc** 测试房间功能是也可以带上token参数 4.3.2 播放测试页面 **http://localhost:8080/webrtc/test/subscribe?streamPath=live/test** 可以订阅**live/test**的流。不传该参数则订阅**live/webrtc** 4.4 Stream中增加NeverTimeout属性 该属性设置成true可以是的流不再判断超时,保持流永远存活,其目的是有些流并不会产生AudioTrack和VideoTrack,比如纯转发流,或者Room的用于广播消息的流,此时可以在发布成功后,对流设置这个属性
107 lines
4.5 KiB
Modula-2
107 lines
4.5 KiB
Modula-2
module monibuca
|
|
|
|
go 1.19
|
|
|
|
require (
|
|
m7s.live/engine/v4 v4.13.1
|
|
m7s.live/plugin/debug/v4 v4.0.0
|
|
m7s.live/plugin/edge/v4 v4.0.5
|
|
m7s.live/plugin/fmp4/v4 v4.0.3
|
|
m7s.live/plugin/gb28181/v4 v4.3.3
|
|
m7s.live/plugin/hdl/v4 v4.1.6
|
|
m7s.live/plugin/hls/v4 v4.3.0
|
|
m7s.live/plugin/hook/v4 v4.0.2
|
|
m7s.live/plugin/jessica/v4 v4.1.4
|
|
m7s.live/plugin/logrotate/v4 v4.0.4
|
|
m7s.live/plugin/monitor/v4 v4.0.2
|
|
m7s.live/plugin/preview/v4 v4.0.4
|
|
m7s.live/plugin/record/v4 v4.3.5
|
|
m7s.live/plugin/room/v4 v4.0.9
|
|
m7s.live/plugin/rtmp/v4 v4.2.1
|
|
m7s.live/plugin/rtsp/v4 v4.2.2
|
|
m7s.live/plugin/snap/v4 v4.0.6
|
|
m7s.live/plugin/webrtc/v4 v4.1.6
|
|
m7s.live/plugin/webtransport/v4 v4.0.5
|
|
)
|
|
|
|
require (
|
|
github.com/abema/go-mp4 v0.10.1 // indirect
|
|
github.com/aler9/gortsplib/v2 v2.2.2 // indirect
|
|
github.com/aler9/writerseeker v0.0.0-20220601075008-6f0e685b9c82 // indirect
|
|
github.com/asticode/go-astikit v0.30.0 // indirect
|
|
github.com/asticode/go-astits v1.11.0 // indirect
|
|
github.com/bluenviron/gohlslib v0.2.5 // indirect
|
|
github.com/bluenviron/gortsplib/v3 v3.2.1 // indirect
|
|
github.com/bluenviron/mediacommon v0.5.0 // indirect
|
|
github.com/cnotch/ipchub v1.1.0 // indirect
|
|
github.com/denisbrodbeck/machineid v1.0.1 // indirect
|
|
github.com/discoviking/fsm v0.0.0-20150126104936-f4a273feecca // indirect
|
|
github.com/edgeware/mp4ff v0.30.1 // indirect
|
|
github.com/ghettovoice/gosip v0.0.0-20221121090201-9a2ed2233b6d // indirect
|
|
github.com/go-ole/go-ole v1.2.6 // indirect
|
|
github.com/go-task/slim-sprig v0.0.0-20210107165309-348f09dbbbc0 // indirect
|
|
github.com/gobwas/httphead v0.1.0 // indirect
|
|
github.com/gobwas/pool v0.2.1 // indirect
|
|
github.com/gobwas/ws v1.2.1 // indirect
|
|
github.com/golang/mock v1.6.0 // indirect
|
|
github.com/google/pprof v0.0.0-20210407192527-94a9f03dee38 // indirect
|
|
github.com/google/uuid v1.3.0 // indirect
|
|
github.com/husanpao/ip v0.0.0-20220711082147-73160bb611a8 // indirect
|
|
github.com/logrusorgru/aurora v2.0.3+incompatible // indirect
|
|
github.com/lufia/plan9stats v0.0.0-20220913051719-115f729f3c8c // indirect
|
|
github.com/marten-seemann/qpack v0.3.0 // indirect
|
|
github.com/mattn/go-colorable v0.1.13 // indirect
|
|
github.com/mattn/go-isatty v0.0.17 // indirect
|
|
github.com/mcuadros/go-defaults v1.2.0 // indirect
|
|
github.com/mgutz/ansi v0.0.0-20200706080929-d51e80ef957d // indirect
|
|
github.com/onsi/ginkgo/v2 v2.2.0 // indirect
|
|
github.com/pion/datachannel v1.5.5 // indirect
|
|
github.com/pion/dtls/v2 v2.2.6 // indirect
|
|
github.com/pion/ice/v2 v2.3.1 // indirect
|
|
github.com/pion/interceptor v0.1.12 // indirect
|
|
github.com/pion/logging v0.2.2 // indirect
|
|
github.com/pion/mdns v0.0.7 // indirect
|
|
github.com/pion/randutil v0.1.0 // indirect
|
|
github.com/pion/rtcp v1.2.10 // indirect
|
|
github.com/pion/rtp v1.7.13 // indirect
|
|
github.com/pion/sctp v1.8.6 // indirect
|
|
github.com/pion/sdp/v3 v3.0.6 // indirect
|
|
github.com/pion/srtp/v2 v2.0.12 // indirect
|
|
github.com/pion/stun v0.4.0 // indirect
|
|
github.com/pion/transport/v2 v2.0.2 // indirect
|
|
github.com/pion/turn/v2 v2.1.0 // indirect
|
|
github.com/pion/udp/v2 v2.0.1 // indirect
|
|
github.com/pion/webrtc/v3 v3.1.56 // indirect
|
|
github.com/power-devops/perfstat v0.0.0-20220216144756-c35f1ee13d7c // indirect
|
|
github.com/q191201771/naza v0.30.8 // indirect
|
|
github.com/quangngotan95/go-m3u8 v0.1.0 // indirect
|
|
github.com/quic-go/qpack v0.4.0 // indirect
|
|
github.com/quic-go/qtls-go1-18 v0.2.0 // indirect
|
|
github.com/quic-go/qtls-go1-19 v0.2.0 // indirect
|
|
github.com/quic-go/qtls-go1-20 v0.1.0 // indirect
|
|
github.com/quic-go/quic-go v0.32.0 // indirect
|
|
github.com/satori/go.uuid v1.2.1-0.20181028125025-b2ce2384e17b // indirect
|
|
github.com/shirou/gopsutil/v3 v3.22.10 // indirect
|
|
github.com/sirupsen/logrus v1.9.0 // indirect
|
|
github.com/tevino/abool v1.2.0 // indirect
|
|
github.com/tklauser/go-sysconf v0.3.11 // indirect
|
|
github.com/tklauser/numcpus v0.6.0 // indirect
|
|
github.com/x-cray/logrus-prefixed-formatter v0.5.2 // indirect
|
|
github.com/yapingcat/gomedia v0.0.0-20230426092936-387031404274 // indirect
|
|
github.com/yusufpapurcu/wmi v1.2.2 // indirect
|
|
go.uber.org/atomic v1.10.0 // indirect
|
|
go.uber.org/multierr v1.8.0 // indirect
|
|
go.uber.org/zap v1.24.0 // indirect
|
|
golang.org/x/crypto v0.6.0 // indirect
|
|
golang.org/x/exp v0.0.0-20221205204356-47842c84f3db // indirect
|
|
golang.org/x/mod v0.8.0 // indirect
|
|
golang.org/x/net v0.9.0 // indirect
|
|
golang.org/x/sync v0.1.0 // indirect
|
|
golang.org/x/sys v0.7.0 // indirect
|
|
golang.org/x/term v0.7.0 // indirect
|
|
golang.org/x/text v0.9.0 // indirect
|
|
golang.org/x/tools v0.6.0 // indirect
|
|
gopkg.in/yaml.v3 v3.0.1 // indirect
|
|
m7s.live/plugin/ps/v4 v4.0.4 // indirect
|
|
)
|