Closed moliyadi closed 1 year ago
Hi, From the crash trace, all I can see is: there is a crash in the native part. That's not enough information to start looking at it. Could you get all traces (not only the traces from your application)?
There has been a fix in the last version of StreamPack in the close
of the RTMP socket. Which version do you use? Are you up to date?
Thank you for your reply, I found the problem, before rtmpdroid v1.0.4 I use this
var tcUrl = url
val index = url.lastIndexOf("/")
if (index > 0) {
tcUrl = url.substring(0, index)
}
socket.connect("$url tcUrl=$tcUrl live=1 flashver=FMLE/3.0\\20(compatible;\\20FMSc/1.0)")
instead of
socket.connect("$url live=1 flashver=FMLE/3.0\\20(compatible;\\20FMSc/1.0)")
because earlier I tested that publish would fail if I didn't customize tcUrl.
But with the latest code, even if I don't manually specify tcUrl, the stream should work, thanks very much.
PS: I think it would be nice to improve rtmpdroid and support a custom tcUrl method, thanks.
Hi,
I made changes in connect(String)
to avoid a crash on close
or a memory loss. That explains the change of behavior. I guess I won't avoid to have that memory loss.
Why do you have to customize tcUrl?
I also see that you directly call socket.connect
the RtmpProducer
does not satisfied you requirements?
Why do you have to customize tcUrl? I also see that you directly call socket.connect the RtmpProducer does not satisfied you requirements?
Because before rtmpdroid v1.0.4, there seems to be a problem with tcurl, which contains the stream
part of the push stream url, like this:
publish url: rtmp://192.168.124.203:19350/live/aaaa
Publishing a stream to the rtmp server(like SRS or ZLMediakit) using the request above would fail, so I set tcUrl manually.
But with the latest code, tcUrl seems to be working properly(liek this), so I remove the customization, thank you.
publish url: rtmp://192.168.124.203:19350/live/livestream
Ok. I get why you needed to set tcUrl. Let's get back to your crash. It is a native crash so most of the stacktrace is not displayed. Could you get all traces from adb logcat (not only the traces from your application)?
Ok, this seems fixed. Please reopen the issue if it is not the case.
Hi, thank you for make this wonderful project, the part of SRT works very well, but there seems to be some problems in the part of RTMP, when I stop RTMP publishing, the app crashed, log like this:
I found if I comment out
socket.close()
inRtmpProducer.kt
, then no longer causeA/libc: Fatal signal 7 (SIGBUS), code 1, fault addr 0x7f617f72b1 in tid 5910 (reampack.sample)
crash, but the socket was not closed, when start publish again, app crashed again.I hope you can provide some help. Thanks.