harlanc / xiu

A simple,high performance and secure live media server in pure Rust (RTMP[cluster]/RTSP/WebRTC[whip/whep]/HTTP-FLV/HLS).🦀
https://www.rustxiu.com
MIT License
1.6k stars 168 forks source link

如何通过rtmp库搭建一个自己的流服务? #109

Closed lpf763827726 closed 2 months ago

lpf763827726 commented 3 months ago

我看了您的rtmp库后,有2个例子,但是都尝试过后貌似都连不上,想问一下有没有比较详细的示例?有点不太会使用,抱歉 尝试0.0.0.0:1935,启动服务后,obs连接rtmp://本机ip:1935一直提示无法连接至服务器,是只能通过http么还是说?等待回复,谢谢

zuiyu1998 commented 3 months ago

obs的地址:rtmp://本机ip:1935/app_name/stream_name,这个是可以用的

lpf763827726 commented 3 months ago

obs的地址:rtmp://本机ip:1935/app_name/stream_name,这个是可以用的

试了下就是类似这个,但是他会提示无法连接服务器

zuiyu1998 commented 2 months ago

有日志之类的截图吗

harlanc commented 2 months ago

https://www.rustxiu.com/zh-cn/docs/scenarios/rtmp#obs%E6%8E%A8%E6%B5%81 OBS推流参考下这个

lpf763827726 commented 2 months ago

有日志之类的截图吗

没打印内容我记得,不过已经没事了,我改成用webrtc了现在,谢谢

lpf763827726 commented 2 months ago

https://www.rustxiu.com/zh-cn/docs/scenarios/rtmp#obs%E6%8E%A8%E6%B5%81 OBS推流参考下这个

这个方式可以使用,但是我想在自己的rust服务中开一个接口可以使用obs连接传流,不过已经没事了,我改成webrtc实现功能了,谢谢