Closed ishaan1607 closed 2 years ago
@ishaan1607 thank you for opening thid issue. The library does not support multiple compression at the moment, i may add the support in the near future.
Thank you.
I am also facing the same issue.
I really need this parallel compression feature
for parallel compression you need to crate multiple instances of MediaExtractor.
I added support for multiple video compression in v1.1.1. Please try it out and let me know if you face any issues.
There are lots of breaking changes in this version, please see what's new in v1.1.1 section in README before updating.
Thank you.
I am using a cases when there is a list of video uris and I trying to compress those by putting a loop and compressing each file. But VideoCompressor.start() throughs an IOException.
java.io.IOException: Failed to instantiate extractor. at android.media.MediaExtractor.nativeSetDataSource(Native Method) at android.media.MediaExtractor.setDataSource(MediaExtractor.java:203) at com.abedelazizshe.lightcompressorlibrary.compressor.Compressor.compressVideo(Compressor.kt:103) at com.abedelazizshe.lightcompressorlibrary.VideoCompressor$startCompression$2.invokeSuspend(VideoCompressor.kt:114) 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)
Here is the crash occurred.