Android-RTMP-Muxer
Android-RTMP-Muxer copied to clipboard
Is this still working for facebook live streams? I'm suddenly getting header: -1.
Is there anybody currently using this in any facebook live streaming apps?
Hey @MarsVard !
Don't know about your issue (never used it with Facebook live servers) but I'm curious if you have more details and what's your use case around it.
Cheers
@benoitletondor all I know is that the API url changed from rtmp.facebook to live-api.facebook.
I'm still unable to debug the rtmp connect call with Android studio. Looking for the correct tools to do so.
But I can't find any info in the documentation about any other changes they made.
I'll update this ticket as soon as I have more info.
@benoitletondor I was trying some settings to figure this out, when I set the serverUrl to rtmp://live-api.facebook.com/rtmp/ I get this exception: Error reading length of object param: found 14336 out of a 239 bytes long buffer, aborting
Not sure what to make of it, am I not allowed to set the serverUrl in the start call?
@benoitletondor the stream throws errors, like I mentioned yesterday, but it actually works if I do the following:
mRtmpMuxer.start(StreamService.this, DEFAULT_APP_NAME, "rtmp://" + DEFAULT_RMTP_HOST + "/rtmp", null);
mRtmpMuxer.createStream(STREAM_PATH);
Still throws the Amf0Functions exception saying "Error reading length of object param: found xxxxxxx out of a xxx bytes long buffer, aborting" though...
Hey @MarsVard,
I think there's probably a bug with that parameter, serverUrl, but here's what the doc says about it:
URL of the target stream. Defaults to rtmp[e]://host[:port]/app/playpath.
So my guess is that maybe you don't need it. Let's say you have an URL that is something like: rtmp://server.com:9999/myapp/mychannel
It means that we have 4 parameters:
- host: server.com
- port: 9999
- app: myapp
- playpath: mychannel
To use them you need to use the Muxer like this:
RtmpMuxer muxer = RtmpMuxer(host, port, ...);
muxer.start(this, app, null, null);
muxer.createStream(playpath);
Does that make any sense to you?
Best
Sure, but I think with new changes on facebook's side, you need to provide the serverURL too to make it work. because the way you suggest was what I had implemented and it was not connecting (throwing a header = -1 exception).
Now it's not throwing that exception so I can just start the stream and push frames to it.
Ok so is it working or not? I'm not sure
Sorry about the confusion. The status now is this: When I add the serverUrl, it throws a non fatal exception allowing me to "muxer.createStream(playpath);" and start pushing frames.
So I think there is a bug in the serverUrl part like you mentioned.
help me please, I can not broadcast on youtube. I think the RtmpReader class is not suitable for youtube's rtmp server response.
need help, please