AbedElazizShe / LightCompressor

A powerful and easy-to-use video compression library for android uses MediaCodec API.
Apache License 2.0
518 stars 117 forks source link

Getting Run time exception #82

Closed Darshan10395 closed 3 years ago

Darshan10395 commented 3 years ago

java.lang.RuntimeException: setDataSource failed: status = 0xFFFFFFEA at android.media.MediaMetadataRetriever._setDataSource(Native Method) at android.media.MediaMetadataRetriever.setDataSource(MediaMetadataRetriever.java:282) at android.media.MediaMetadataRetriever.setDataSource(MediaMetadataRetriever.java:246) at com.abedelazizshe.lightcompressorlibrary.Compressor.compressVideo(Compressor.kt:74) at com.abedelazizshe.lightcompressorlibrary.VideoCompressor$startCompression$2.invokeSuspend(VideoCompressor.kt:112) at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33) at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:106) at kotlinx.coroutines.scheduling.CoroutineScheduler.runSafely(CoroutineScheduler.kt:571) at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.executeTask(CoroutineScheduler.kt:750) at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.runWorker(CoroutineScheduler.kt:678) at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.run(CoroutineScheduler.kt:665)

Note: It's working fine till Android 10 but getting runtime exception on Android 11

OS: Android Android Version: 11 Device: Samsung A31

AbedElazizShe commented 3 years ago

@Darshan10395 Thank you for opening the issue. Please try the sample apk, and have a look at the example app for a potential solution. I am testing on Android 11 and it is all fine. If the sample apk crashes, please share the error message with me.

Thank you.

AbedElazizShe commented 3 years ago

@Darshan10395 I will close this issue assuming that you found a way to run the library. Feel free to re-open if there is any issue. Thank you