欢迎来到尧图网

客户服务 关于我们

您的位置:首页 > 汽车 > 维修 > 搭建rtmp流媒体服务器的步骤

搭建rtmp流媒体服务器的步骤

2024/10/24 3:21:26 来源:https://blog.csdn.net/wangjunfeng0000/article/details/139830480  浏览:    关键词:搭建rtmp流媒体服务器的步骤

网络上很多问文章介绍使用ffmpeg推送和拉流,经常遗漏安装rtsp-simple-server的步骤,执行推流命令:

D:\software\ffmpeg-7.0.1-full_build\bin\ffmpeg.exe -re -stream_loop -1 -i "D:\Video\汪汪队立大功\S07\001.mp4" -vcodec h264 -acodec aac -f flv rtmp://127.0.0.1/live/test110

会出现如下报错:

[tcp @ 00000256cd34b3c0] Connection to tcp://127.0.0.1:1935?tcp_nodelay=0 failed: Error number -138 occurred
[rtmp @ 00000256cd3cd340] Cannot open connection tcp://127.0.0.1:1935?tcp_nodelay=0

找到一个比较完整的过程的介绍文章:

基于FFmpeg进行rtsp推流及拉流(详细教程)_ffmpeg推流-CSDN博客

补齐了启动rtsp-server过程,执行mediamtx.exe 作为 rtsp-simple-server,遇到如下问题:

1. 遇到报错

D:\software\mediamtx_v1.8.3_windows_amd64>mediamtx.exe
2024/06/20 11:35:41 INF MediaMTX v1.8.3
2024/06/20 11:35:41 INF configuration loaded from D:\software\mediamtx_v1.8.3_windows_amd64\mediamtx.yml
2024/06/20 11:35:41 INF [RTSP] listener opened on :8554 (TCP), :8000 (UDP/RTP), :8001 (UDP/RTCP)
2024/06/20 11:35:41 ERR listen tcp :1935: bind: An attempt was made to access a socket in a way forbidden by its access permissions.
2024/06/20 11:35:41 INF [RTSP] listener is closing
2024/06/20 11:35:41 INF waiting for running hooks

解决方法:

启动windows power shell后,执行:

sc stop winnat

sc start winnat

sc相关介绍:SC命令一键搞定

版权声明:

本网仅为发布的内容提供存储空间,不对发表、转载的内容提供任何形式的保证。凡本网注明“来源:XXX网络”的作品,均转载自其它媒体,著作权归作者所有,商业转载请联系作者获得授权,非商业转载请注明出处。

我们尊重并感谢每一位作者,均已注明文章来源和作者。如因作品内容、版权或其它问题,请及时与我们联系,联系邮箱:809451989@qq.com,投稿邮箱:809451989@qq.com