pedroSG94 / RootEncoder

RootEncoder for Android (rtmp-rtsp-stream-client-java) is a stream encoder to push video/audio to media servers using protocols RTMP, RTSP, SRT and UDP with all code written in Java/Kotlin
Apache License 2.0
2.53k stars 771 forks source link

java.net.SocketTimeoutException: failed to connect to a.rtmp.youtube.com/31.13.88.26 (port 1935) from /192.168.31.188 (port 37056) after 5000m #1580

Open nv4010 opened 5 days ago

nv4010 commented 5 days ago

java.net.SocketTimeoutException: failed to connect to a.rtmp.youtube.com/31.13.88.26 (port 1935) from /192.168.31.188 (port 37056) after 5000m

pedroSG94 commented 5 days ago

That means that the server no response you. Maybe that server is down. Did you tried the alternative server?

nv4010 commented 5 days ago

connection error java.io.IOException: Unimplemented message type: null at com.pedro.rtmp.rtmp.message.RtmpMessage$Companion.getRtmpMessage(RtmpMessage.kt:68) at com.pedro.rtmp.rtmp.CommandsManager.readMessageResponse(CommandsManager.kt:132) at com.pedro.rtmp.rtmp.RtmpClient.handleMessages(RtmpClient.kt:348) at com.pedro.rtmp.rtmp.RtmpClient.access$handleMessages(RtmpClient.kt:53) at com.pedro.rtmp.rtmp.RtmpClient$connect$1.invokeSuspend(RtmpClient.kt:253) at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33)

nv4010 commented 5 days ago

rtmps://a.rtmp.youtube.com/live2/

nv4010 commented 5 days ago

rtmp://a.rtmp.youtube.com/live2/

pedroSG94 commented 5 days ago

connection error java.io.IOException: Unimplemented message type: null at com.pedro.rtmp.rtmp.message.RtmpMessage$Companion.getRtmpMessage(RtmpMessage.kt:68) at com.pedro.rtmp.rtmp.CommandsManager.readMessageResponse(CommandsManager.kt:132) at com.pedro.rtmp.rtmp.RtmpClient.handleMessages(RtmpClient.kt:348) at com.pedro.rtmp.rtmp.RtmpClient.access$handleMessages(RtmpClient.kt:53) at com.pedro.rtmp.rtmp.RtmpClient$connect$1.invokeSuspend(RtmpClient.kt:253) at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33)

Normally because the url used is incorrect (server found but close connection with you because the url is invalid). Did you add the stream key to the end of the url?

rtmps://a.rtmp.youtube.com/live2/xxxx-xxxx-xxxx-xxxx

replace xxxx-xxxx-xxxx-xxxx to the stream key provided by youtube
nv4010 commented 5 days ago

Thank you, the link is correct. The address is correct/

nv4010 commented 5 days ago

2024-09-15 00:00:59.217 8295-8384 AIS-CLIENT E [WARN][get_frame_info_thread:516] csi num 2 channel 0 stream handling,skip this cb 2024-09-15 00:00:59.230 8295-8414 RtmpSender I wrote Video packet, size 48257 2024-09-15 00:00:59.284 8295-8384 AIS-CLIENT E [WARN][get_frame_info_thread:516] csi num 2 channel 0 stream handling,skip this cb 2024-09-15 00:00:59.317 8295-8384 AIS-CLIENT E [WARN][get_frame_info_thread:516] csi num 2 channel 0 stream handling,skip this cb 2024-09-15 00:00:59.332 8295-8414 RtmpSender I wrote Video packet, size 40721 2024-09-15 00:00:59.384 8295-8384 AIS-CLIENT E [WARN][get_frame_info_thread:516] csi num 2 channel 0 stream handling,skip this cb 2024-09-15 00:00:59.417 8295-8384 AIS-CLIENT E [WARN][get_frame_info_thread:516] csi num 2 channel 0 stream handling,skip this cb 2024-09-15 00:00:59.429 8295-8414 RtmpSender I wrote Video packet, size 41025 2024-09-15 00:00:59.484 8295-8384 AIS-CLIENT E [WARN][get_frame_info_thread:516] csi num 2 channel 0 stream handling,skip this cb 2024-09-15 00:00:59.517 8295-8384 AIS-CLIENT E [WARN][get_frame_info_thread:516] csi num 2 channel 0 stream handling,skip this cb 2024-09-15 00:00:59.530 8295-8414 RtmpSender I wrote Video packet, size 52945 2024-09-15 00:00:59.574 8295-8412 CommandsManager I read Acknowledgement(sequenceNumber=404183) 2024-09-15 00:00:59.583 8295-8384 AIS-CLIENT E [WARN][get_frame_info_thread:516] csi num 2 channel 0 stream handling,skip this cb 2024-09-15 00:00:59.617 8295-8384 AIS-CLIENT E [WARN][get_frame_info_thread:516] csi num 2 channel 0 stream handling,skip this cb 2024-09-15 00:00:59.629 8295-8414 RtmpSender I wrote Video packet, size 60721 2024-09-15 00:00:59.684 8295-8384 AIS-CLIENT E [WARN][get_frame_info_thread:516] csi num 2 channel 0 stream handling,skip this cb 2024-09-15 00:00:59.695 8295-8412 CommandsManager I read Acknowledgement(sequenceNumber=536941) 2024-09-15 00:00:59.717 8295-8384 AIS-CLIENT E [WARN][get_frame_info_thread:516] csi num 2 channel 0 stream handling,skip this cb 2024-09-15 00:00:59.737 8295-8414 RtmpSender I wrote Video packet, size 51617 2024-09-15 00:00:59.783 8295-8384 AIS-CLIENT E [WARN][get_frame_info_thread:516] csi num 2 channel 0 stream handling,skip this cb 2024-09-15 00:00:59.817 8295-8384 AIS-CLIENT E [WARN][get_frame_info_thread:516] csi num 2 channel 0 stream handling,skip this cb 2024-09-15 00:00:59.833 8295-8414 RtmpSender I wrote Video packet, size 57313 2024-09-15 00:00:59.883 8295-8384 AIS-CLIENT E [WARN][get_frame_info_thread:516] csi num 2 channel 0 stream handling,skip this cb 2024-09-15 00:00:59.917 8295-8384 AIS-CLIENT E [WARN][get_frame_info_thread:516] csi num 2 channel 0 stream handling,skip this cb 2024-09-15 00:00:59.930 8295-8414 RtmpSender I wrote Video packet, size 48433 2024-09-15 00:00:59.984 8295-8384 AIS-CLIENT E [WARN][get_frame_info_thread:516] csi num 2 channel 0 stream handling,skip this cb 2024-09-15 00:00:59.992 8295-8398 BufferPoolAccessor2.0 D evictor expired: 1, evicted: 0 2024-09-15 00:01:00.017 8295-8384 AIS-CLIENT E [WARN][get_frame_info_thread:516] csi num 2 channel 0 stream handling,skip this cb 2024-09-15 00:01:00.029 8295-8414 RtmpSender I wrote Video packet, size 63297 2024-09-15 00:01:00.083 8295-8384 AIS-CLIENT E [WARN][get_frame_info_thread:516] csi num 2 channel 0 stream handling,skip this cb 2024-09-15 00:01:00.117 8295-8384 AIS-CLIENT E [WARN][get_frame_info_thread:516] csi num 2 channel 0 stream handling,skip this cb 2024-09-15 00:01:00.129 8295-8414 RtmpSender I wrote Video packet, size 57281 2024-09-15 00:01:00.183 8295-8384 AIS-CLIENT E [WARN][get_frame_info_thread:516] csi num 2 channel 0 stream handling,skip this cb 2024-09-15 00:01:00.217 8295-8384 AIS-CLIENT E [WARN][get_frame_info_thread:516] csi num 2 channel 0 stream handling,skip this cb 2024-09-15 00:01:00.232 8295-8414 RtmpSender I wrote Video packet, size 64433 2024-09-15 00:01:00.283 8295-8384 AIS-CLIENT E [WARN][get_frame_info_thread:516] csi num 2 channel 0 stream handling,skip this cb 2024-09-15 00:01:00.317 8295-8384 AIS-CLIENT E [WARN][get_frame_info_thread:516] csi num 2 channel 0 stream handling,skip this cb 2024-09-15 00:01:00.331 8295-8414 RtmpSender I wrote Video packet, size 57729 2024-09-15 00:01:00.385 8295-8384 AIS-CLIENT E [WARN][get_frame_info_thread:516] csi num 2 channel 0 stream handling,skip this cb 2024-09-15 00:01:00.417 8295-8384 AIS-CLIENT E [WARN][get_frame_info_thread:516] csi num 2 channel 0 stream handling,skip this cb 2024-09-15 00:01:00.438 8295-8414 RtmpSender I wrote Video packet, size 64353 2024-09-15 00:01:00.484 8295-8384 AIS-CLIENT E [WARN][get_frame_info_thread:516] csi num 2 channel 0 stream handling,skip this cb 2024-09-15 00:01:00.517 8295-8384 AIS-CLIENT E [WARN][get_frame_info_thread:516] csi num 2 channel 0 stream handling,skip this cb 2024-09-15 00:01:00.528 8295-8414 RtmpSender I wrote Video packet, size 44993 2024-09-15 00:01:00.583 8295-8384 AIS-CLIENT E [WARN][get_frame_info_thread:516] csi num 2 channel 0 stream handling,skip this cb 2024-09-15 00:01:00.617 8295-8384 AIS-CLIENT E [WARN][get_frame_info_thread:516] csi num 2 channel 0 stream handling,skip this cb 2024-09-15 00:01:00.629 8295-8414 RtmpSender I wrote Video packet, size 64401 2024-09-15 00:01:00.683 8295-8384 AIS-CLIENT E [WARN][get_frame_info_thread:516] csi num 2 channel 0 stream handling,skip this cb 2024-09-15 00:01:00.717 8295-8384 AIS-CLIENT E [WARN][get_frame_info_thread:516] csi num 2 channel 0 stream handling,skip this cb 2024-09-15 00:01:00.729 8295-8414 RtmpSender I wrote Video packet, size 60833 2024-09-15 00:01:00.784 8295-8384 AIS-CLIENT E [WARN][get_frame_info_thread:516] csi num 2 channel 0 stream handling,skip this cb 2024-09-15 00:01:00.817 8295-8384 AIS-CLIENT E [WARN][get_frame_info_thread:516] csi num 2 channel 0 stream handling,skip this cb 2024-09-15 00:01:00.833 8295-8414 RtmpSender I wrote Video packet, size 60913

But it's strange that YouTube doesn't display the screen

pedroSG94 commented 5 days ago

I can't see any error. Remember that YouTube need audio to work. I can't see audio packets

nv4010 commented 5 days ago

Okay, I'll try again