hardman / AWLive

最简单的iOS 推流代码,视频捕获,软编码(faac,x264),硬编码(aac,h264),横屏直播,美颜,flv编码,rtmp协议,blog内陆续更新代码解析,你想学的知识这里都有,愿意懂直播技术的同学快来看!!
Apache License 2.0
696 stars 194 forks source link

ERROR: RTMP_Connect0, failed to connect socket. 65 (No route to host) #18

Closed PJStation closed 4 years ago

PJStation commented 4 years ago

真机6s iOS13.4,本地nginx测试,地址也填了电脑地址 错误: ERROR: RTMP_Connect0, failed to connect socket. 65 (No route to host) aw rtmp closing.......

aw rtmp closed.......

2020-04-17 18:49:45.517451+0800 AWLive[24612:3841936] [OC] rtmp state changed from(aw_rtmp_state_connecting), to(aw_rtmp_state_closed) 2020-04-17 18:49:45.518377+0800 AWLive[24612:3841936] [OC] rtmp state changed from(aw_rtmp_state_closed), to(aw_rtmp_state_idle) aw rtmp closing.......

[d] closed rtmp context 2020-04-17 18:49:45.519529+0800 AWLive[24612:3841936] [OC] rtmp state changed from(aw_rtmp_state_idle), to(aw_rtmp_state_error_open) 2020-04-17 18:49:45.520548+0800 AWLive[24612:3841936] [OC] rtmp state changed from(aw_rtmp_state_error_open), to(aw_rtmp_state_idle) 2020-04-17 18:49:45.521338+0800 AWLive[24612:3841936] [OC] rtmp state changed from(aw_rtmp_state_idle), to(aw_rtmp_state_error_net) 2020-04-17 18:49:45.522171+0800 AWLive[24612:3841936] [OC] rtmp state changed from(aw_rtmp_state_error_net), to(aw_rtmp_state_idle) 2020-04-17 18:49:45.523620+0800 AWLive[24612:3841936] startCapture rtmpOpen error!!! retcode=0 aw rtmp closing.......

[d] closed rtmp context

AppHock commented 4 years ago

兄弟解决问题没,我自己把本地文件推流,VLC都可以播放,至少确定地址和nginx服务是好的,就是Demo运行连接失败

AppHock commented 4 years ago

愚蠢的问题,需要获取App网络访问权限

WS-Vincent commented 4 years ago

我的iphone7怎么也没有网络提示的弹框出现,但是11pro Max可以进入链接播放,但是播放全是花屏,也没声音,代码有问题吧。

PJStation commented 4 years ago

愚蠢的问题,需要获取App网络访问权限

愚蠢的问题,需要获取App网络访问权限

已开启了网络访问权限

PJStation commented 4 years ago

兄弟解决问题没,我自己把本地文件推流,VLC都可以播放,至少确定地址和nginx服务是好的,就是Demo运行连接失败

未解决

PJStation commented 4 years ago

真机6s iOS13.4,本地nginx测试,地址也填了电脑地址 错误: ERROR: RTMP_Connect0, failed to connect socket. 65 (No route to host) aw rtmp closing.......

aw rtmp closed.......

2020-04-17 18:49:45.517451+0800 AWLive[24612:3841936] [OC] rtmp state changed from(aw_rtmp_state_connecting), to(aw_rtmp_state_closed) 2020-04-17 18:49:45.518377+0800 AWLive[24612:3841936] [OC] rtmp state changed from(aw_rtmp_state_closed), to(aw_rtmp_state_idle) aw rtmp closing.......

[d] closed rtmp context 2020-04-17 18:49:45.519529+0800 AWLive[24612:3841936] [OC] rtmp state changed from(aw_rtmp_state_idle), to(aw_rtmp_state_error_open) 2020-04-17 18:49:45.520548+0800 AWLive[24612:3841936] [OC] rtmp state changed from(aw_rtmp_state_error_open), to(aw_rtmp_state_idle) 2020-04-17 18:49:45.521338+0800 AWLive[24612:3841936] [OC] rtmp state changed from(aw_rtmp_state_idle), to(aw_rtmp_state_error_net) 2020-04-17 18:49:45.522171+0800 AWLive[24612:3841936] [OC] rtmp state changed from(aw_rtmp_state_error_net), to(aw_rtmp_state_idle) 2020-04-17 18:49:45.523620+0800 AWLive[24612:3841936] startCapture rtmpOpen error!!! retcode=0 aw rtmp closing.......

[d] closed rtmp context

PJStation commented 4 years ago

真机6s iOS13.4,本地nginx测试,地址也填了电脑地址 错误: ERROR: RTMP_Connect0, failed to connect socket. 65 (No route to host) aw rtmp closing.......

aw rtmp closed.......

2020-04-17 18:49:45.517451+0800 AWLive[24612:3841936] [OC] rtmp state changed from(aw_rtmp_state_connecting), to(aw_rtmp_state_closed) 2020-04-17 18:49:45.518377+0800 AWLive[24612:3841936] [OC] rtmp state changed from(aw_rtmp_state_closed), to(aw_rtmp_state_idle) aw rtmp closing.......

[d] closed rtmp context 2020-04-17 18:49:45.519529+0800 AWLive[24612:3841936] [OC] rtmp state changed from(aw_rtmp_state_idle), to(aw_rtmp_state_error_open) 2020-04-17 18:49:45.520548+0800 AWLive[24612:3841936] [OC] rtmp state changed from(aw_rtmp_state_error_open), to(aw_rtmp_state_idle) 2020-04-17 18:49:45.521338+0800 AWLive[24612:3841936] [OC] rtmp state changed from(aw_rtmp_state_idle), to(aw_rtmp_state_error_net) 2020-04-17 18:49:45.522171+0800 AWLive[24612:3841936] [OC] rtmp state changed from(aw_rtmp_state_error_net), to(aw_rtmp_state_idle) 2020-04-17 18:49:45.523620+0800 AWLive[24612:3841936] startCapture rtmpOpen error!!! retcode=0 aw rtmp closing.......

[d] closed rtmp context 已解决!! 解决方案: 利用WKWebView开启网络权限弹窗 WKWebView *wkWebView = [[WKWebView alloc] init]; [wkWebView loadRequest:[NSURLRequest requestWithURL:[NSURL URLWithString:@"www.baidu.com"]]];