LightCompressor_iOS
LightCompressor_iOS copied to clipboard
Got crash while compression multiple file in loop, more than 4 media file
** Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: '*** -[AVAssetReader startReading] cannot be called again after reading has already started' *** First throw call stack: (0x19c817298 0x1b0571480 0x1a3c92638 0x100ac49d0 0x100ac4e48 0x10060cf04 0x1a3cb3834 0x1026b7ae8 0x1026b932c 0x1026c038c 0x1026c1010 0x1026cc820 0x1e4d3d5bc 0x1e4d4086c) libc++abi: terminating with uncaught exception of type NSException *** Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: '*** -[AVAssetReader startReading] cannot be called again after reading has already started' terminating with uncaught exception of type NSException
crash on audioReader?.startReading()
I got the same crash issue. At audioReader?.startReading()
If i check in the console the audioReader status is already reading.
so i changed the code like this.
after that I got crash at audioWriterInput.requestMediaDataWhenReady(on: processingQueue, using: {() -> Void in stating you cannot requestMediaData again
Hello any one find solution for crash when multiple file compression in loop thanks
yes, I did by doing 3 compression at a time. that fixed my crash
I'd appriciate anyone's contribution to build multiple video compression, i don't have access to a Mac at the moment. I have added the feature to Android .. you can use it as a referenece. https://github.com/AbedElazizShe/LightCompressor/commit/8d8a35d9733b78724cd4466608075ca01742a78e
yes, I did by doing 3 compression at a time. that fixed my crash
No, I also tried compressing three videos at a time. But the issue still exists. Can someone suggest any alternate library for video compression with multiple files at a time in swift ios
if audioReader?.status == .unknown{ }
Please add this line and check
I hope issue will be fix