当前位置: 首页 > 工具软件 > Monibuca > 使用案例 >

monibuca运行在centos8/7下

张嘉熙
2023-12-01

官网:http://monibuca.com/

官方的demo:

bash <(curl -s -S -L https://monibuca.com/demo.sh) 

没法用
真的很神奇,1.41.1的go,但是只支持1.35.1的

我魔改了下也不一定能用

cd /opt
wget https://studygolang.com/dl/golang/go1.13.15.linux-amd64.tar.gz
export PATH=$PATH:/opt/go/bin:/usr/local/go/bin
tar -vxf go1.13.15.linux-amd64.tar.gz
go env -w GOROOT=/opt/go
go env -w GOPATH=/usr/local/go
go env -w GOPROXY="https://goproxy.io,direct"
#go get github.com/langhuihui/monibuca
go get gitee.com/mirrors/Monibuca
monibuca

那我们用git回来的方式吧

cd /opt
wget https://studygolang.com/dl/golang/go1.13.15.linux-amd64.tar.gz
export PATH=$PATH:/opt/go/bin:/usr/local/go/bin
tar -vxf go1.13.15.linux-amd64.tar.gz

go env -w GOROOT=/opt/go
go env -w GOPATH=/usr/local/go
go env -w GOPROXY="https://goproxy.io,direct"

git clone https://github.com/langhuihui/monibuca.git
cd monibuca/
go run main.go 

正常了,打开你的8081端口吧

monibuca实现HLS观看的配置

[RTMP]
ListenAddr = ":1935"
[GateWay]
ListenAddr = ":8081"
[Jessica]
ListenAddr = ":8080"
[LogRotate]
Path = "logs"
[Cluster]
ListenAddr = ":2019"
[TS]
Path  = "resource/ts"
BufferLength = 2048
AutoPublish  = true
[Record]
Path = "resource"
[RTSP]
AutoPull = false
RemoteAddr = "rtsp://localhost/test"
ListenAddr = ":554"

[HDL]
ListenAddr = ":2020"
[WebRTC]
PublicIP = "127.0.0.1"
#这个是重点
[HLS]
EnableWrite=true
EnableMemory=true
Fragment=10
Window=2

观看地址:
http://ip:8081/hls/live/xx.m3u8

 类似资料: