Comments (7)
Ok, I will add this is in native dependencies (srtdroid
and rtmpdroid
):
System.loadLibrary("crypto")
System.loadLibrary("ssl")
Already in rtmpdroid
: apivideo/api.video-rtmpdroid@d7eb771
But it will take a while.
from streampack.
hmm. That's going to be tricky.
Could you remove RTMP protocol dependency there:
StreamPack/demos/camera/build.gradle
Line 54 in 908f7f0
It is just for a test.
Do you need both RTMP and SRT?
RTMP and SRT are both shipped with a version of libssl/libcrypto and I suspect that gradle picked one that is missing API.
from streampack.
Thanks for the reply.
I'm just doing some exploration at the moment so I'm not sure if I'll be using RTMP or SRT, I think either is suitable.
I've tried removing the RTMP dependency, and I find it still has the same error.
If I put back the RTMP dependency and remove the SRT dependency I get another error, which looks similar, but is from librtmp this time:
16:14:12.787 E createStreamer failed
java.lang.UnsatisfiedLinkError: dlopen failed: cannot locate symbol "DH_get0_pub_key" referenced by "/data/app/io.github.thibaultbee.streampack.sample-qXWgmifSgqUjLEmSW0FTSQ==/base.apk!/lib/armeabi-v7a/librtmp.so"...
at java.lang.Runtime.loadLibrary0(Runtime.java:1016)
at java.lang.System.loadLibrary(System.java:1669)
at video.api.rtmpdroid.RtmpNativeLoader.(RtmpNativeLoader.kt:9)
at video.api.rtmpdroid.Rtmp.(Rtmp.kt:19)
at io.github.thibaultbee.streampack.ext.rtmp.internal.endpoints.RtmpProducer.(RtmpProducer.kt:33)
at io.github.thibaultbee.streampack.ext.rtmp.internal.endpoints.RtmpProducer.(RtmpProducer.kt:28)
at io.github.thibaultbee.streampack.ext.rtmp.streamers.CameraRtmpLiveStreamer.(CameraRtmpLiveStreamer.kt:43)
at io.github.thibaultbee.streampack.ext.rtmp.streamers.CameraRtmpLiveStreamer.(CameraRtmpLiveStreamer.kt:34)
at io.github.thibaultbee.streampack.app.utils.StreamerFactory.createStreamer(StreamerFactory.kt:99)
at io.github.thibaultbee.streampack.app.utils.StreamerFactory.build(StreamerFactory.kt:132)
at io.github.thibaultbee.streampack.app.utils.StreamerManager.rebuildStreamer(StreamerManager.kt:89)
at io.github.thibaultbee.streampack.app.ui.main.PreviewViewModel$createStreamer$1.invokeSuspend(PreviewViewModel.kt:86)
at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33)
at kotlinx.coroutines.internal.DispatchedContinuationKt.resumeCancellableWith(DispatchedContinuation.kt:367)
at kotlinx.coroutines.intrinsics.CancellableKt.startCoroutineCancellable(Cancellable.kt:30)
at kotlinx.coroutines.intrinsics.CancellableKt.startCoroutineCancellable$default(Cancellable.kt:25)
at kotlinx.coroutines.CoroutineStart.invoke(CoroutineStart.kt:110)
at kotlinx.coroutines.AbstractCoroutine.start(AbstractCoroutine.kt:126)
at kotlinx.coroutines.BuildersKt__Builders_commonKt.launch(Builders.common.kt:56)
at kotlinx.coroutines.BuildersKt.launch(Unknown Source:1)
at kotlinx.coroutines.BuildersKt__Builders_commonKt.launch$default(Builders.common.kt:47)
at kotlinx.coroutines.BuildersKt.launch$default(Unknown Source:1)
at io.github.thibaultbee.streampack.app.ui.main.PreviewViewModel.createStreamer(PreviewViewModel.kt:84)
at io.github.thibaultbee.streampack.app.ui.main.PreviewFragment.createStreamer(PreviewFragment.kt:178)
at io.github.thibaultbee.streampack.app.ui.main.PreviewFragment.requestCameraAndMicrophonePermissions(PreviewFragment.kt:147)
at io.github.thibaultbee.streampack.app.ui.main.PreviewFragment.onStart(PreviewFragment.kt:137)
at androidx.fragment.app.Fragment.performStart(Fragment.java:3021)
at androidx.fragment.app.FragmentStateManager.start(FragmentStateManager.java:589)
at androidx.fragment.app.FragmentStateManager.moveToExpectedState(FragmentStateManager.java:300)
at androidx.fragment.app.FragmentStore.moveToExpectedState(FragmentStore.java:112)
at androidx.fragment.app.FragmentManager.moveToState(FragmentManager.java:1647)
at androidx.fragment.app.FragmentManager.dispatchStateChange(FragmentManager.java:3128)
at androidx.fragment.app.FragmentManager.dispatchStart(FragmentManager.java:3079)
at androidx.fragment.app.FragmentController.dispatchStart(FragmentController.java:262)
at androidx.fragment.app.FragmentActivity.onStart(FragmentActivity.java:510)
at androidx.appcompat.app.AppCompatActivity.onStart(AppCompatActivity.java:251)
at android.app.Instrumentation.callActivityOnStart(Instrumentation.java:1391)
at android.app.Activity.performStart(Activity.java:7195)
at android.app.ActivityThread.handleStartActivity(ActivityThread.java:2968)
at android.app.servertransaction.TransactionExecutor.performLifecycleSequence(TransactionExecutor.java:180)
at android.app.servertransaction.TransactionExecutor.cycleToPath(TransactionExecutor.java:165)
at android.app.servertransaction.TransactionExecutor.executeLifecycleState(TransactionExecutor.java:142)
16:14:12.787 E at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:70)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1836)
at android.os.Handler.dispatchMessage(Handler.java:106)
at android.os.Looper.loop(Looper.java:193)
at android.app.ActivityThread.main(ActivityThread.java:6702)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:493)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:931)
from streampack.
I don't have a clue why this is happening 🤔
Might be because you are using a custom phone and something is missing in the implementation.
I made a test where I enforce loadLibrary
of ssl and crypto: https://github.com/ThibaultBee/StreamPack/tree/test/openssl
Could you test it?
Hopefully it will be called before loading rtmpdroid
and srtdroid
.
from streampack.
For RTMP, you could try something like that the dependencies:
implementation("video.api:rtmpdroid:1.2.1-packed")
implementation project(':extension-rtmp') {
exclude group: 'video.api', module: 'rtmpdroid'
// exclude the transitive dependency to use packed version to avoid conflict with libssl.so and libcrypto.so
}
from streampack.
Also found this relevant info: https://developer.android.com/training/articles/perf-jni.html#native-libraries
from streampack.
I've tried the test/openssl branch you created, and that fixes the problem for me, thank you!
I suspect you are correct that it is something missing on the device, and it's not a general issue. It's currently beyond my understanding, but if I work out what is happening I'll let you know.
from streampack.
Related Issues (20)
- Socket Exception while connect with encrypted srt server HOT 8
- Is it possible to use a dns to broadcast the streaming, say no-ip or others? HOT 2
- Connection Error HOT 2
- [Bug]: SrtProducer.connect(url) always throws "unknown host" when onConnectionListener is null HOT 2
- [Feat]: Get current bitrate of the stream HOT 3
- Video Capture Mirroring HOT 8
- [Feat]: Support for devices whose MountAngle is not general HOT 7
- [Feat]: Background RTMP Streaming HOT 4
- [Feat]: Lock resolution to starting orientation HOT 10
- [Feat]: Add SRTLA (SRT transport proxy with link aggregation for connection bonding) HOT 1
- [Bug]: Streaming the SRT video has a lot of lag HOT 2
- [Bug]: App crashes with "eglMakeCurrent failed" error HOT 2
- [Bug]: app crashes when start running HOT 2
- [Feat]: High latency when using the RTMP HOT 2
- [Bug]: When using SRT to push 1080P video, the latency is severe, about 7 seconds! HOT 3
- [Bug]: There are severe mosaics at higher bit rates(>2Mb/s). HOT 5
- [Bug]: tap to focus while zoomed out causes crash HOT 7
- [Bug]: MP4 File appears to have time duration 00:01 in video player HOT 3
- [Bug]: When the higher video bit rate is used for SRT streaming, the video will frequently appear green screen or mosaic HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from streampack.