LibRtmp-Client-for-Android: Writing frames returns -1
Is there some way to check what a return code means?
I currently create a RTMPMuxer like so RTMPMuxer rtmpMuxer = new RTMPMuxer();
and open it using
int res = rtmpMuxer.open("rtmp://<url>", 1810, 1080);
I then try to send frames from the Android camera (NV21 format) using rtmpMuxer.writeVideo(arr, 0, arr.length, (int) System.currentTimeMillis())
where arr is the byte[]
from the camera. But this returns -1.
I checked rtmpMuxer.isConnected() == 1
and that returns true, so it is connected.
How can I debug it not sending frames?
About this issue
- Original URL
- State: closed
- Created 8 years ago
- Comments: 23 (9 by maintainers)
OK, finally solved it. See thread https://github.com/ant-media/LibRtmp-Client-for-Android/issues/103
OK, it expects NAL units.
https://github.com/ant-media/LibRtmp-Client-for-Android/blob/b853f185640ab75b840871ed088e117cf397dfa2/rtmp-client/src/main/cpp/flvmuxer/xiecc_rtmp.c#L516
I got it now , i was using encoder wrongly thats why video is not getting ,my encoder is not encoding to h264 correctly ,I will fix it later but for now i am interested in using your LiveVideoBroadcaster ,so i am working on it.