Can not stream with RtmpStreamer?
Thanks for good library, I've been trying to integrate LibRtmp android in my project. I've tested demo application in github https://github.com/ant-media/LiveVideoBroadcaster. However, the streaming failed on some devices such as LG G6, due to RTMPMuxer opening issue. I'll leave some fragments of code below, please help me to solve the problem.
public boolean open(String url) {
frameCount = 0;
lastVideoFrameTimeStamp = 0;
lastAudioFrameTimeStamp = 0;
mLastReceivedVideoFrameTimeStamp = -1;
mLastReceivedAudioFrameTimeStamp = -1;
lastSentFrameTimeStamp = -1;
isConnected = false;
int result = rtmpMuxer.open(url, 0, 0);
if (result > 0) {
// file_open("/mnt/sdcard/stream.flv" + (int) Math.random() * 1000);
// writeFLVHeader(true, true); isConnected = true;
}
return isConnected;
}
int result = rtmpMuxer.open(url, 0, 0), this always returning negative numbers on LG G6, and sometimes on Huawei.
Since open function of RtmpMuxer returning false, startBroadcasting in LivevideoBroadcaster failed and showing error message "Failed to start. Please check server url and security credentials.". However on other devices, it's working fine. Thanks for your answer beforehand!
HI @minmax9493 we are facing this issue in Samsung S8 also, can you please let me know if there is any fix for this issue?
Thanks in advance.
You can alternatively use the WebRTC Android SDK which is free to download at https://antmedia.io