Usama
Usama

Reputation: 660

avio_open2 fails randomly for RTMPS Facebook live streaming

I am trying to re stream a video to Facebook RTMPS endpoint and , facing an issue specifically with Facebook's RTMPS endpoint . I have tried with linkedin RTMPS endpoint and its working fine , but Facebook end point some times works and fails some times its totally random . The avio_open2 call sometimes fails randomly, returning a -5 error. This only seems to happen with the Facebook endpoint .on ffmpeg log side I see that the handshake was successful , I don't understand the reason for failure here. (i am running in multithreaded environment )

int ret = avformat.avio_open2(pb, url , AVIO_FLAG_WRITE, null, getOptionDictionary());

[rtmps @ 0x7a5978023640] Handshaking...
[rtmps @ 0x7a5978023640] Type answer 3
[rtmps @ 0x7a5978023640] Server version 1.0.5.4
[rtmps @ 0x7a5978023640] Proto = rtmps, path = /rtmp/FB-1709082269638040-0-test-KRmT_Y, app = rtmp, fname = FB-1709082269638040-0-AbyNzKGtN-KRmT_Y
[rtmps @ 0x7a5978023640] Window acknowledgement size = 5000000
[rtmps @ 0x7a5978023640] Max sent, unacked = 5000000
[rtmps @ 0x7a5978023640] New incoming chunk size = 4096
[rtmps @ 0x7a5978023640] Releasing stream...
[rtmps @ 0x7a5978023640] FCPublish stream...
[rtmps @ 0x7a5978023640] Creating stream...
[rtmps @ 0x7a5978023640] Sending publish command for 'FB-test-0-test-KRmT_Y'
[rtmps @ 0x7a5964021780] No default whitelist set
[tls @ 0x7a596402a900] No default whitelist set
[tcp @ 0x7a596402ab00] No default whitelist set
[tcp @ 0x7a596402ab00] Original list of addresses:
[tcp @ 0x7a596402ab00] Address 57.144.176.149 port 443
[tcp @ 0x7a596402ab00] Address 2a03:2880:f358:95:face:b00c:0:1411 port 443
[tcp @ 0x7a596402ab00] Interleaved list of addresses:
[tcp @ 0x7a596402ab00] Address 57.144.176.149 port 443
[tcp @ 0x7a596402ab00] Address 2a03:2880:f358:95:face:b00c:0:1411 port 443
[tcp @ 0x7a596402ab00] Starting connection attempt to 57.144.176.149 port 443
[tcp @ 0x7a596402ab00] Successfully connected to 57.144.176.149 port 443

My java cpp and ffmpeg version is

<javacpp.version>1.5.11</javacpp.version>
<javacpp.ffmpeg.version>7.1-${javacpp.version}</javacpp.ffmpeg.version>

Upvotes: -1

Views: 14

Answers (0)

Related Questions