Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can not stream with RtmpStreamer? #87

Open
murod93 opened this issue Feb 11, 2020 · 2 comments
Open

Can not stream with RtmpStreamer? #87

murod93 opened this issue Feb 11, 2020 · 2 comments

Comments

@murod93
Copy link

murod93 commented Feb 11, 2020

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!

@Chandu1233
Copy link

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.

@mekya
Copy link
Contributor

mekya commented Jun 21, 2021

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants