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

通过ffmpeg拖送rtsp流到monibuca 控制台一直报错 lost rtp packet 预览播放 会卡住不动 #120

Open
yh4922 opened this issue Feb 26, 2024 · 10 comments

Comments

@yh4922
Copy link

yh4922 commented Feb 26, 2024

推送命令

ffmpeg -rtsp_transport tcp -i rtsp://admin:123456@192.168.18.40:554/Streaming/Channels/101 -c:a copy -c:v copy -f rtsp rtsp://192.168.18.103/live/test40

控制台日志

10:17:17        WARN    lost rtp packet        {"流": "live/test40", "id": 3, "轨道": "h264", "lastSeq": 41741, "lastSeq2": 41737}
10:17:17        WARN    lost rtp packet        {"流": "live/test40", "id": 3, "轨道": "h264", "lastSeq": 41767, "lastSeq2": 41764}
10:17:17        WARN    lost rtp packet        {"流": "live/test40", "id": 3, "轨道": "h264", "lastSeq": 41780, "lastSeq2": 41777}
10:17:17        WARN    lost rtp packet        {"流": "live/test40", "id": 3, "轨道": "h264", "lastSeq": 41795, "lastSeq2": 41790}
10:17:17        WARN    lost rtp packet        {"流": "live/test40", "id": 3, "轨道": "h264", "lastSeq": 41809, "lastSeq2": 41805}
10:17:17        WARN    lost rtp packet        {"流": "live/test40", "id": 3, "轨道": "h264", "lastSeq": 41823, "lastSeq2": 41819}
10:17:17        WARN    lost rtp packet        {"流": "live/test40", "id": 3, "轨道": "h264", "lastSeq": 41837, "lastSeq2": 41833}
10:17:17        WARN    lost rtp packet        {"流": "live/test40", "id": 3, "轨道": "h264", "lastSeq": 41851, "lastSeq2": 41847}
10:17:17        WARN    lost rtp packet        {"流": "live/test40", "id": 3, "轨道": "h264", "lastSeq": 41865, "lastSeq2": 41861}
10:17:17        WARN    lost rtp packet        {"流": "live/test40", "id": 3, "轨道": "h264", "lastSeq": 41880, "lastSeq2": 41875}
10:17:18        WARN    lost rtp packet        {"流": "live/test40", "id": 3, "轨道": "h264", "lastSeq": 41933, "lastSeq2": 41929}
10:17:18        WARN    lost rtp packet        {"流": "live/test40", "id": 3, "轨道": "h264", "lastSeq": 41961, "lastSeq2": 41957}
10:17:18        WARN    lost rtp packet        {"流": "live/test40", "id": 3, "轨道": "h264", "lastSeq": 41974, "lastSeq2": 41971}
10:17:18        WARN    lost rtp packet        {"流": "live/test40", "id": 3, "轨道": "h264", "lastSeq": 41990, "lastSeq2": 41984}
10:17:18        WARN    lost rtp packet        {"流": "live/test40", "id": 3, "轨道": "h264", "lastSeq": 42004, "lastSeq2": 42000}
10:17:18        WARN    lost rtp packet        {"流": "live/test40", "id": 3, "轨道": "h264", "lastSeq": 42032, "lastSeq2": 42028}
10:17:18        WARN    lost rtp packet        {"流": "live/test40", "id": 3, "轨道": "h264", "lastSeq": 42046, "lastSeq2": 42042}

播放测试

http://192.168.18.103:8080/preview/live/test40?type=ws-raw

每次播放都只会播放一两帧 就卡住了

@langhuihui
Copy link
Owner

你可以直接配置让m7s 拉摄像头的 rtsp 流

@yh4922
Copy link
Author

yh4922 commented Feb 28, 2024

这是测试场景 实际场景 rtsp 和 m7s 不在一个局域网 需要通过ffmpeg 推送到云上的m7s

@langhuihui
Copy link
Owner

那你加个 tcp 参数,否则会丢包

@yh4922
Copy link
Author

yh4922 commented Feb 28, 2024

说的是 m7s的配置么
ffmpeg 我有加 -rtsp_transport tcp

@langhuihui
Copy link
Owner

我看到你加了,但是你加的是从远端拉流的 tcp,推到 m7s 你没加

@yh4922
Copy link
Author

yh4922 commented Feb 28, 2024

image
这个不就是推流的参数么

@langhuihui
Copy link
Owner

没错,你只写了一个
现在你有两条 rtsp 流,一条是从远端到 ffmpeg,另一条是从 ffmpeg 到m7s

@yh4922
Copy link
Author

yh4922 commented Feb 28, 2024

image
没太明白

@langhuihui
Copy link
Owner

ffmpeg -rtsp_transport tcp -i rtsp://admin:123456@192.168.18.40:554/Streaming/Channels/101 -c:a copy -c:v copy -f rtsp -rtsp_transport tcp rtsp://192.168.18.103/live/test40

@yh4922
Copy link
Author

yh4922 commented Feb 28, 2024

确实可以 不会报错了 一时没反应过来 推流那边也可以加这个参数
感谢感谢🙏🙏🙏

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