Skip to content

Commit

Permalink
-Start the project and introduce the conf directory, adding several c…
Browse files Browse the repository at this point in the history
…ommon configuration examples

-Customizable favicon.ico
-Adding Pause and Resume methods to Stream in the engine
-The engine introduces sync.Cond to replace the pseudo Spinlock
-Preview plugin introduction jessibuca pro demo
-Jessica plugin introduces support for HTTP/ws-h264/h265 bare streams
-Recording plugin adds a prompt in the log when the file cannot be created
-PS plugin fixes a bug where a single port cannot be reused after use
-Webtransport starts by default through built-in certificate mode

- 启动工程引入conf目录,添加若干常用配置示例
- 可以自定义favicon.ico
- 引擎中Stream增加Pause和Resume方法
- 引擎引入sync.Cond替代伪自旋锁
- 预览插件引入jessibuca pro demo
- jessica插件引入对http/ws-h264/h265 裸流支持
- 录制插件在无法创建文件时日志中增加提示
- ps插件修复一个单端口使用后无法重复使用的bug
- webtransport通过内置证书方式默认启动
  • Loading branch information
langhuihui committed Jun 11, 2023
1 parent ebc7e90 commit a9c4334
Show file tree
Hide file tree
Showing 10 changed files with 80 additions and 48 deletions.
3 changes: 2 additions & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,11 @@ FROM alpine:latest
WORKDIR /opt

ADD monibuca /opt
ADD config.yaml /opt
ADD local.monibuca.com.key /opt
ADD local.monibuca.com_bundle.pem /opt
#暴露端口
EXPOSE 8080 8081 1935 554 58200 5060 8000-9000
EXPOSE 5060/udp 58200/udp 8000-9000/udp
#最终运行docker的命令
ENTRYPOINT ["./m7s"]
ENTRYPOINT ["./monibuca"]
9 changes: 9 additions & 0 deletions conf/hls.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# hls纯转发,即从HLS->HLS

global:
disableall: true
enablertp: false
enableavcc: false
hls:
enable: true
relaymode: 1
7 changes: 7 additions & 0 deletions conf/https.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# 默认的http端口是8080
# 这里指定8081为https端口
# 本地访问https://local.monibuca.com:8081,请配置host文件,将127.0.0.1 local.monibuca.com加入到host文件中
global:
listenaddrlts: :8081
certfile: local.monibuca.com_bundle.pem
keyfile: local.monibuca.com.key
6 changes: 6 additions & 0 deletions conf/rtmp.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
# 只包含rtmp,关闭其他所有插件,只能用于rtmp的转发
global:
disableall: true
enablertp: false
rtmp:
enable: true
4 changes: 4 additions & 0 deletions conf/rtmps.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# 开启接受rtmps
rtmp:
tcp:
listenaddrtls: :443
23 changes: 23 additions & 0 deletions conf/rtsp.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# rtsp 拉流配置
global:
disableall: true # 需要转换其他协议的话,需要将disableall设置为false
enableavcc: false # 如果需要转换成rtmp和flv的话,需要改成true
delayclosetimeout: 2s # 无订阅者时,2s后关闭拉流
rtsp:
enable: true # 如果disableall为false的话,这个可以不需要写
pullprotocol: tcp
pull:
pullonstart:
rtsp/obs: rtsp://localhost:8554/live
# live/test1: rtsp://localhost:8554/live/rtsp
# live/test2: rtsp://localhost:8554/live/rtsp
# live/test3: rtsp://localhost:8554/live/rtsp
# live/test4: rtsp://localhost:8554/live/rtsp
# live/test5: rtsp://localhost:8554/live/rtsp
# live/test6: rtsp://localhost:8554/live/rtsp
# live/test7: rtsp://localhost:8554/live/rtsp
# live/test8: rtsp://localhost:8554/live/rtsp
# live/test9: rtsp://localhost:8554/live/rtsp
pullonsub: # 按需拉流
rtsp/100: rtsp://admin:[email protected]/cam/realmonitor?channel=1&subtype=0
rtsp/101: rtsp://admin:[email protected]/cam/realmonitor?channel=1&subtype=0
40 changes: 11 additions & 29 deletions config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,32 +4,14 @@
# 插件配置参考各个插件的文档
# 插件都有一个enable配置,如果为false则不启用该插件,默认为true即不需要配置。

# global:
# console:
# secret: "ab0f6913670062af4d2f15c621205178"
# http:
# listenaddrtls: :8081
# certfile: local.monibuca.com_bundle.pem
# keyfile: local.monibuca.com.key
# record:
# enable: false
# hls:
# autorecord: true
# fragment: 20s
# webtransport:
# enable: false
# certfile: local.monibuca.com_bundle.pem
# keyfile: local.monibuca.com.key
# gb28181:
# # enable: false
# rtsp:
# # enable: false
# pull:
# pullonstart:
# live/rtsp: rtsp://admin:[email protected]/Streaming/Channels/201?transportmode=unicast
# hls:
# # enable: false
# pull:
# pullonstart: true
# pulllist:
# live/hls: http://111.40.196.27/PLTV/88888888/224/3221225548/index.m3u8
global:
http:
listenaddrtls: :8081
certfile: local.monibuca.com_bundle.pem
keyfile: local.monibuca.com.key
llhls:
enable: false
hls:
enable: false
monitor:
enable: false
Binary file added favicon.ico
Binary file not shown.
12 changes: 6 additions & 6 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -3,25 +3,25 @@ module monibuca
go 1.19

require (
m7s.live/engine/v4 v4.13.1
m7s.live/engine/v4 v4.13.2
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/jessica/v4 v4.2.0
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/preview/v4 v4.1.0
m7s.live/plugin/record/v4 v4.3.6
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
m7s.live/plugin/webtransport/v4 v4.0.6
)

require (
Expand Down Expand Up @@ -102,5 +102,5 @@ require (
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
m7s.live/plugin/ps/v4 v4.0.5 // indirect
)
24 changes: 12 additions & 12 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -398,8 +398,8 @@ gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C
gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA=
gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
m7s.live/engine/v4 v4.13.1 h1:LWgrz1Jhcf6tbMGdHZV7aVshtqPzRdzKrk9xaM0b9ko=
m7s.live/engine/v4 v4.13.1/go.mod h1:LoALBfV5rmsz5TJQr6cmLxM33mfUE5BKBq/sMtXOVlc=
m7s.live/engine/v4 v4.13.2 h1:0OhHNenyLgZJW/6aU5NmT5yv5sXG/e0c2qxLmJ0LqgM=
m7s.live/engine/v4 v4.13.2/go.mod h1:LoALBfV5rmsz5TJQr6cmLxM33mfUE5BKBq/sMtXOVlc=
m7s.live/plugin/debug/v4 v4.0.0 h1:yVFI/XB/EwR9NyihwvTIC/tocibPdE/NQZjDnOtRq/M=
m7s.live/plugin/debug/v4 v4.0.0/go.mod h1:A/C1ViacCOK7EPeeCfiwlUrC2TUtRdEqzrR0Yd9b1KQ=
m7s.live/plugin/edge/v4 v4.0.5 h1:0CEfbMAmD2jAUeb+jaZD5vvq968wrJli30PUkaNpbDo=
Expand All @@ -414,18 +414,18 @@ m7s.live/plugin/hls/v4 v4.3.0 h1:1VcXQi72XOK9brgDgodtffv9PABtpqbXmyK0PVDNNj4=
m7s.live/plugin/hls/v4 v4.3.0/go.mod h1:GFZyP5FIvqPX9NHh4J2kfURm1PwcXSkj4qT8DeX6sbI=
m7s.live/plugin/hook/v4 v4.0.2 h1:fKwsx7gDAzfKfCz0C+knoY4wg/qnlQloM996l3jUWNc=
m7s.live/plugin/hook/v4 v4.0.2/go.mod h1:zoyGSwIIdt4NGFdqrKHLFCwwMk4oAOF+dlvSV6cizGU=
m7s.live/plugin/jessica/v4 v4.1.4 h1:6aYwIvNzPh6P06fiPrpb+R69Jx3f5g400vXLdsIa0Bk=
m7s.live/plugin/jessica/v4 v4.1.4/go.mod h1:lUmggsscxqiIvPSY1+RB2vzGstpgSaj/HQOlNTOVCCs=
m7s.live/plugin/jessica/v4 v4.2.0 h1:HhK/f5CpfXeKueWgaIB3DR3JJunKojGlON+X0Q+/O58=
m7s.live/plugin/jessica/v4 v4.2.0/go.mod h1:4z+5NOFuEaLiAszUdABb9SI5o+ZRnFzTB4wWYImeCbk=
m7s.live/plugin/logrotate/v4 v4.0.4 h1:y3X+aJ/FSftWMa4yDWF+662xfV5lrEaOZofV8SGQLTc=
m7s.live/plugin/logrotate/v4 v4.0.4/go.mod h1:a8hIV59GjpQDE+Ip790CU7yOHaG4+Iweci0sLvo43FU=
m7s.live/plugin/monitor/v4 v4.0.2 h1:Pto/w3HqzN19wLIJLRwsXPOfLOrkE3b10GCtoqP3UsY=
m7s.live/plugin/monitor/v4 v4.0.2/go.mod h1:wYcjvXM03RK00DGA/R7zfiENNT7jDFQhp0rEBvO1mTw=
m7s.live/plugin/preview/v4 v4.0.4 h1:xDS0817CLo3hx+wAcncE46gPDiPN5AsIWdAdbBltGDA=
m7s.live/plugin/preview/v4 v4.0.4/go.mod h1:iYhWqFbTvTNDFplbTOrE5X9M6ED7gCKkKMuM5QmBocg=
m7s.live/plugin/ps/v4 v4.0.4 h1:O/eygpdONSXm/nEnj7JuWkSwBa0mQXixV/CyY4Yr4zo=
m7s.live/plugin/ps/v4 v4.0.4/go.mod h1:H6/wg14Zcg0Jpmw3e0XYq4mweotufmcpgpLybwF0kgo=
m7s.live/plugin/record/v4 v4.3.5 h1:HekgcZTZkR8UKc5CdK769NlVUlozG472bROV/lVdo/Q=
m7s.live/plugin/record/v4 v4.3.5/go.mod h1:8TWcAJAjMcsHOiuT/SVCxdknSmlXH93iZowkQLOfFU0=
m7s.live/plugin/preview/v4 v4.1.0 h1:VdGAFSTNNG5uY8NNp8k+i0k1/vp3tZMRiyZdDFJuzJo=
m7s.live/plugin/preview/v4 v4.1.0/go.mod h1:iYhWqFbTvTNDFplbTOrE5X9M6ED7gCKkKMuM5QmBocg=
m7s.live/plugin/ps/v4 v4.0.5 h1:qd+B4vEiPflqQVUce4dbQwsQcQ0wwYYyyCdfOaEdRg4=
m7s.live/plugin/ps/v4 v4.0.5/go.mod h1:H6/wg14Zcg0Jpmw3e0XYq4mweotufmcpgpLybwF0kgo=
m7s.live/plugin/record/v4 v4.3.6 h1:aFZPpop6QFPOPfKvOnKBWr4dknzPweKAqALAvEclk74=
m7s.live/plugin/record/v4 v4.3.6/go.mod h1:8TWcAJAjMcsHOiuT/SVCxdknSmlXH93iZowkQLOfFU0=
m7s.live/plugin/room/v4 v4.0.9 h1:1kscEupO4NLYkNZI8ayJ8tu9qDuENxnDhgGZ9MtRcSk=
m7s.live/plugin/room/v4 v4.0.9/go.mod h1:rmngA5yNAJpjsT1+jt6kvbMtT7gjLM7q/gwPq3vaQDY=
m7s.live/plugin/rtmp/v4 v4.2.1 h1:8QKhIvHsJvaW3dqF9y0qnER0GN9oQ4oUHIBGCbxl/vo=
Expand All @@ -436,5 +436,5 @@ m7s.live/plugin/snap/v4 v4.0.6 h1:Hz0WEN6YrKDWvwpAwpfPl+V40eW0k/+8qzqS2OupzxA=
m7s.live/plugin/snap/v4 v4.0.6/go.mod h1:XHggonZ0lIKEX/OP2rXjV2mPpG4urmvMT3foIaFRsus=
m7s.live/plugin/webrtc/v4 v4.1.6 h1:MzKtwcIHopmUiQPfsJDXkYOZvuuy0UbyGdygL4u1Nb4=
m7s.live/plugin/webrtc/v4 v4.1.6/go.mod h1:0kDXvyiPUputAR9MT6U9zu8yuJ5JhkYEMHB6aYEBRU8=
m7s.live/plugin/webtransport/v4 v4.0.5 h1:2Twt0R0ty0vbB+oXe4z160Z88d3tV3muFeQziZYTKWM=
m7s.live/plugin/webtransport/v4 v4.0.5/go.mod h1:BNe8/gAIRpgeGGTVnFnaHrqEKtzOeSq3VdlQgfc9ri4=
m7s.live/plugin/webtransport/v4 v4.0.6 h1:mgAkNs4GxHc8UiCi/NT2R2i+tD6uKujb0/uqW3CagWQ=
m7s.live/plugin/webtransport/v4 v4.0.6/go.mod h1:BNe8/gAIRpgeGGTVnFnaHrqEKtzOeSq3VdlQgfc9ri4=

0 comments on commit a9c4334

Please sign in to comment.