LibRtmp-Client-for-Android icon indicating copy to clipboard operation
LibRtmp-Client-for-Android copied to clipboard

Can not stream with RtmpStreamer?

Open murod93 opened this issue 5 years ago • 2 comments

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!

murod93 avatar Feb 11 '20 02:02 murod93

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.

Chandu1233 avatar Jun 21 '21 14:06 Chandu1233

You can alternatively use the WebRTC Android SDK which is free to download at https://antmedia.io

mekya avatar Jun 21 '21 17:06 mekya