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

Exception The given long is not in the range of uint32 #50

Closed winstips closed 3 years ago

winstips commented 3 years ago

I tried running given demo code, got the exception below

java.lang.AssertionError: The given long is not in the range of uint32 (-3074) at com.coremedia.iso.IsoTypeWriter.writeUInt32(IsoTypeWriter.java:28) at com.coremedia.iso.boxes.TimeToSampleBox.getContent(TimeToSampleBox.java:75) at com.googlecode.mp4parser.AbstractBox.getBox(AbstractBox.java:142) at com.googlecode.mp4parser.BasicContainer.writeContainer(BasicContainer.java:216) at com.googlecode.mp4parser.AbstractContainerBox.getBox(AbstractContainerBox.java:88) at com.googlecode.mp4parser.BasicContainer.writeContainer(BasicContainer.java:216) at com.googlecode.mp4parser.AbstractContainerBox.getBox(AbstractContainerBox.java:88) at com.googlecode.mp4parser.BasicContainer.writeContainer(BasicContainer.java:216) at com.googlecode.mp4parser.AbstractContainerBox.getBox(AbstractContainerBox.java:88) at com.googlecode.mp4parser.BasicContainer.writeContainer(BasicContainer.java:216) at com.googlecode.mp4parser.AbstractContainerBox.getBox(AbstractContainerBox.java:88) at com.googlecode.mp4parser.BasicContainer.writeContainer(BasicContainer.java:216) at com.googlecode.mp4parser.AbstractContainerBox.getBox(AbstractContainerBox.java:88) at com.abedelazizshe.lightcompressorlibrary.MP4Builder.finishMovie(MP4Builder.java:151) at com.abedelazizshe.lightcompressorlibrary.Compressor.compressVideo(Compressor.kt:415) at com.abedelazizshe.lightcompressorlibrary.VideoCompressor$startCompression$2.invokeSuspend(VideoCompressor.kt:97) 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:738) at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.runWorker(CoroutineScheduler.kt:678) at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.run(CoroutineScheduler.kt:665)

AbedElazizShe commented 3 years ago

Thank you for opening the issue. Could you please specify which phone you're using for testing ? This issue is device specific and I am trying to reproduce the issue to ensure it is fixed. It was reported here on Xiaomi Max.

AbedElazizShe commented 3 years ago

@winstips Could you please try the latest version? I added an apk to README if you want to try the sample first. Please close the issue if the problem is fixed. Thank you