You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi:
I am using go2rtc lib with verison 1.9.1,to connect rtmp server for getting the video stream data. but I got the network error[EOF].
So I debug the code to find the error position. By learning RTMP protocol, I find there is no response data when sending the connection description to server after handshake stage. I don't know why it happens. Here is the code:
rtmpURL := "rtmp://xxx:xxx/live/openUrl/WabN53"
client, err := rtmp.DialPlay(rtmpURL)
if err != nil {
panic(err)
}
ret := client.GetMedias()
fmt.Printf("%v\n", ret)
Debuging the further code, I find the first step of c.clienHandshake() is ok. The next step c.writePacketSize() is also ok. But the third step c.writeConnect() failed. After c.writeMessage(3, TypeCommand, 0, b) step, the error position is at c.readResponse(1).
Thank you for your replies. I am sorry to make you misunderstand.
The first part codes above are written in my project. The main intention is to access the remote RTMP server and get media information by creating RTMP client. They are from Go2rtc library at line 14: https://github.com/AlexxIT/go2rtc/blob/master/pkg/rtmp/client.go
The second part codes is in the further debug, which are from file at line 84 and 118: https://github.com/AlexxIT/go2rtc/blob/master/pkg/rtmp/client.go. The connecting stage of RTMP protocol is realized in the file at line 230: https://github.com/AlexxIT/go2rtc/blob/master/pkg/rtmp/conn.go . At first, I got EOF error after running the origin code. I doubted whether I missed some key information during the connecting stage. So I modified the sending description data, adding some fields. But it doesn't work.
I don't know why it happens. I check the codes and functions according to the RTMP protocol, including handshake, connection etc. But the server does not repsonse the expected message of "_result" command type . In contrast, I get the EOF error from network. Could you give me some suggestion?
Hi:
I am using go2rtc lib with verison 1.9.1,to connect rtmp server for getting the video stream data. but I got the network error[EOF].
So I debug the code to find the error position. By learning RTMP protocol, I find there is no response data when sending the connection description to server after handshake stage. I don't know why it happens. Here is the code:
Debuging the further code, I find the first step of c.clienHandshake() is ok. The next step c.writePacketSize() is also ok. But the third step c.writeConnect() failed. After c.writeMessage(3, TypeCommand, 0, b) step, the error position is at c.readResponse(1).
Looking forward to your replies~
The text was updated successfully, but these errors were encountered: