Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

monibuca当前版本不支持g711a么? #106

Open
zxfskr opened this issue Nov 3, 2023 · 6 comments
Open

monibuca当前版本不支持g711a么? #106

zxfskr opened this issue Nov 3, 2023 · 6 comments

Comments

@zxfskr
Copy link

zxfskr commented Nov 3, 2023

m7s_linux_amd64.tar.gz我使用官网下载的这个包,再Ubuntu上接受推流:
ffmpeg -re -stream_loop -1 -i ./videos/bbb_1080p_60fps.mp4 -c:v h264 -c:a pcm_alaw -r 30 -s 720x1080 -ac 2 -rtsp_transport udp -f rtsp rtsp://localhost:554/live/test
然后使用ffplay播放:
ffplay rtsp://localhost:554/live/test
monibuca会报错,然后自动停止:
11:46:36 INFO 订阅者+1 {"流": "live/test", "类型": "RTSPSubscriber", "ID": "824651629952", "流": "live/test", "remains": 1}
11:46:36 INFO 阻塞式播放 {"流": "live/test", "类型": "RTSPSubscriber", "ID": "824651629952", "流": "live/test", "subType": 1}
11:46:36 INFO 开始读取 {"流": "live/test", "类型": "RTSPSubscriber", "ID": "824651629952", "流": "live/test", "轨道": "h264", "mode": 0}
11:46:36 INFO 第一帧已读取 {"流": "live/test", "类型": "RTSPSubscriber", "ID": "824651629952", "流": "live/test", "轨道": "h264", "第一帧时间戳": "6.343206959s", "第一帧序列号": 128}
11:46:36 INFO 开始读取 {"流": "live/test", "类型": "RTSPSubscriber", "ID": "824651629952", "流": "live/test", "轨道": "pcma", "mode": 0}
11:46:36 INFO 第一帧已读取 {"流": "live/test", "类型": "RTSPSubscriber", "ID": "824651629952", "流": "live/test", "轨道": "pcma", "第一帧时间戳": "6.343206959s", "第一帧序列号": 394}
11:46:37 INFO 播放停止 {"流": "live/test", "类型": "RTSPSubscriber", "ID": "824651629952", "流": "live/test", "reason": "stop"}

,当我把推流的格式换成aac的时候,可以正常推流播放,是因为monibuca当前版本不支持g711a么?

@langhuihui
Copy link
Owner

支持的,你试试用 tcp 推流

@zxfskr
Copy link
Author

zxfskr commented Nov 3, 2023

推流命令换成:ffmpeg -re -stream_loop -1 -i ./videos/bbb_1080p_60fps.mp4 -c:v h264 -c:a pcm_alaw -r 30 -s 720x1080 -ac 2 -rtsp_transport tcp -f rtsp rtsp://localhost:554/live/test

一样的结果:

11:55:03 INFO 已创建 {"流": "live/test"}
11:55:03 INFO 发布 {"流": "live/test", "类型": "RTSPPublisher", "流": "live/test", "ptr": "0xc000db0960"}
11:55:03 INFO ⌛->🟡 {"流": "live/test", "动作": "publish"}
11:55:03 INFO set track {"流": "live/test", "类型": "RTSPPublisher", "流": "live/test", "名称": "h264"}
11:55:03 INFO set track {"流": "live/test", "类型": "RTSPPublisher", "流": "live/test", "名称": "pcma"}
11:55:03 INFO 音频轨道已附加 {"流": "live/test", "轨道": "pcma", "sample rate": 48000}
11:55:06 INFO 🟡->🟢 {"流": "live/test", "动作": "track available"}
11:55:06 INFO 视频轨道已附加 {"流": "live/test", "轨道": "h264", "width": 720, "height": 1080}
11:55:07 INFO GB28181 LocalAndInternalIPs {"routes": {}}
11:55:29 INFO 订阅 {"流": "live/test", "类型": "RTSPSubscriber", "ID": "824634606624", "流": "live/test"}
11:55:29 INFO 轨道+1 {"流": "live/test", "类型": "RTSPSubscriber", "ID": "824634606624", "流": "live/test", "名称": "pcma"}
11:55:29 INFO 轨道+1 {"流": "live/test", "类型": "RTSPSubscriber", "ID": "824634606624", "流": "live/test", "名称": "h264"}
11:55:29 INFO 订阅者+1 {"流": "live/test", "类型": "RTSPSubscriber", "ID": "824634606624", "流": "live/test", "remains": 1}
11:55:29 INFO 阻塞式播放 {"流": "live/test", "类型": "RTSPSubscriber", "ID": "824634606624", "流": "live/test", "subType": 1}
11:55:29 INFO 开始读取 {"流": "live/test", "类型": "RTSPSubscriber", "ID": "824634606624", "流": "live/test", "轨道": "h264", "mode": 0}
11:55:29 INFO 第一帧已读取 {"流": "live/test", "类型": "RTSPSubscriber", "ID": "824634606624", "流": "live/test", "轨道": "h264", "第一帧时间戳": "22.244188807s", "第一帧序列号": 606}
11:55:29 INFO 开始读取 {"流": "live/test", "类型": "RTSPSubscriber", "ID": "824634606624", "流": "live/test", "轨道": "pcma", "mode": 0}
11:55:29 INFO 第一帧已读取 {"流": "live/test", "类型": "RTSPSubscriber", "ID": "824634606624", "流": "live/test", "轨道": "pcma", "第一帧时间戳": "22.244188807s", "第一帧序列号": 1888}
11:55:29 INFO 播放停止 {"流": "live/test", "类型": "RTSPSubscriber", "ID": "824634606624", "流": "live/test", "reason": "stop"}
zxf@DESKTOP-3S5GP0U:~/workspace/monibuca$

换成音频aac推流后就正常了。。。

@zxfskr
Copy link
Author

zxfskr commented Nov 3, 2023

m7s_linux_amd64.tar.gz
用的就是这个官网下载的最新的包,直接./m7s启动的

@langhuihui
Copy link
Owner

好的,我看一下

@langhuihui
Copy link
Owner

这个是由于第三方库导致的,下个版本我兼容一下

@zxfskr
Copy link
Author

zxfskr commented Nov 4, 2023

我注意到更新了一版beta版本,这个版本可以播放pcma了,但是声音和画面被慢放了,应该是时间戳的设置还有点问题。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants