将常见问题加入注释

This commit is contained in:
dexter
2023-03-28 20:48:19 +08:00
parent 5a436e0965
commit e65da00dac
2 changed files with 33 additions and 7 deletions

View File

@@ -78,6 +78,12 @@ If you are an experienced developer, then the best way is to carry out secondary
Third-party plugins and paid plugins provide additional functionality and are not listed here.
Inspired by:
- [mp4ff](https://github.com/edgeware/mp4ff) mp4 file format library [@edgeware](https://github.com/edgeware)
- [gosip](https://github.com/ghettovoice/gosip) go sip library [@ghettovoice](https://github.com/ghettovoice)
- [webrtc](https://github.com/pion/webrtc) go library and whole [@pion](https://github.com/pion) team
- [gortsplib](https://github.com/aler9/gortsplib) rtsp library [@aler9](https://github.com/aler9)
## Remote console
- Provides multi-instance management
@@ -98,12 +104,13 @@ The word Monibuca is derived from (Monica), and in order to solve the naming pro
- If you need to compile and start the project yourself, you need to install go1.19 or above.
The official download link of the latest version is provided:
- [Linux](https://m7s.live/bin/m7s_linux_x86)
- [Linux-arm64](https://m7s.live/bin/m7s_linux_arm64)
- [Mac](https://m7s.live/bin/m7s_darwin_x86)
- [Mac-arm64](https://m7s.live/bin/m7s_darwin_arm64)
- [Windows](https://m7s.live/bin/m7s_windows_x86)
- [Linux](https://download.m7s.live/bin/m7s_linux_arm64.tar.gz)
- [Linux-arm64](https://download.m7s.live/bin/m7s_linux_arm64.tar.gz)
- [Mac](https://download.m7s.live/bin/m7s_darwin_arm64.tar.gz)
- [Mac-arm64](https://download.m7s.live/bin/m7s_darwin_arm64.tar.gz)
- [Windows](https://download.m7s.live/bin/m7s_windows_amd64.tar.gz)
Don't forget to fix the rights chmod +x m7s_xxx_xxx on Linux and Mac.
# Run
## Executable files run directly

23
main.go
View File

@@ -11,6 +11,25 @@ package main
The live stream server for Go
(c) dexter 2019-present
说明:
本项目为 monibuca 的启动工程,你也可以自己创建一个启动工程
本启动工程引入了 engine 和一些列官方插件,并且保证版本依赖关系
自己创建工程的时候,版本依赖必须参考本工程,否则容易出现依赖关系错乱
流的播放地址请查看文档https://m7s.live/guide/qa/play.html
推拉流的配置方法看文档https://m7s.live/guide/config.html#%E6%8F%92%E4%BB%B6%E9%85%8D%E7%BD%AE
高频问题:
1、OBS只能推送 rtmp 协议,如需推送 rtsp 需要安装插件
2、除了rtsp协议以外其他协议播放H265需要使用jessibuca播放器preview 插件内置了jessibuca播放器
3、浏览器不能直接播放rtmp、rtsp等基于tcp的协议因为在js的环境中无法直接使用tcp或者udp传数据js没提供接口而rtsp或rtmp的流是基于tcp或者udp 所以纯web的方式目前是没办法直接播放rtsp或rtmp流的
4、webrtc是否可以播放h265取决于浏览器是否包含h265解码器通常不包含
5、webrtc不支持aac格式的音频
6、gb插件能收到设备的注册但是没有流可能1、媒体端口被防火墙拦截默认是582002、使用公网IP需要配置sipip字段或者mediaip字段用于设备向指定IP发送流。3、配置范围端口部分设备ssrc乱搞导致的
7、当没有订阅者的时候如何自动停止拉流设置publish 配置下的 delayclosetimeout 参数例如 10s代表最后一个订阅者离开后 10s 后自动停止流
8、使用 ffmpeg 推流时请加-c:v h264 -c:a aac否则 ffmpeg 会自动将流转换成系统不支持的格式
9、StreamPath 必须形如 live/test 。不能只有一级,或者斜杠开头,如/live 是错误的。
10、如果遇到直接退出崩溃查看一下fatal.log。
*/
import (
@@ -21,13 +40,13 @@ import (
"m7s.live/engine/v4"
"m7s.live/engine/v4/util"
_ "m7s.live/plugin/logrotate/v4"
_ "m7s.live/plugin/debug/v4"
_ "m7s.live/plugin/gb28181/v4"
_ "m7s.live/plugin/hdl/v4"
_ "m7s.live/plugin/hls/v4"
_ "m7s.live/plugin/hook/v4"
_ "m7s.live/plugin/jessica/v4"
_ "m7s.live/plugin/logrotate/v4"
_ "m7s.live/plugin/preview/v4"
_ "m7s.live/plugin/record/v4"
_ "m7s.live/plugin/room/v4"
@@ -45,7 +64,7 @@ var (
)
func main() {
fmt.Println("start monibuca version:", version)
fmt.Println("start github.com/langhuihui/monibuca version:", version)
conf := flag.String("c", "config.yaml", "config file")
flag.Parse()
ctx, cancel := context.WithCancel(context.WithValue(context.Background(), "version", version))