LightCompressor_iOS icon indicating copy to clipboard operation
LightCompressor_iOS copied to clipboard

Got crash while compression multiple file in loop, more than 4 media file

Open ghimireprashant opened this issue 3 years ago • 7 comments

** 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

ghimireprashant avatar Jun 18 '21 06:06 ghimireprashant

crash on audioReader?.startReading()

ghimireprashant avatar Jun 18 '21 06:06 ghimireprashant

Screen Shot 2021-07-09 at 15 49 30 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. Screen Shot 2021-07-09 at 15 54 07 after that I got crash at audioWriterInput.requestMediaDataWhenReady(on: processingQueue, using: {() -> Void in stating you cannot requestMediaData again

harikrishnabista7 avatar Jul 09 '21 10:07 harikrishnabista7

Hello any one find solution for crash when multiple file compression in loop thanks

kirtirc avatar Aug 12 '21 14:08 kirtirc

yes, I did by doing 3 compression at a time. that fixed my crash

ghimireprashant avatar Aug 14 '21 04:08 ghimireprashant

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

AbedElazizShe avatar Jan 30 '22 03:01 AbedElazizShe

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

Ayyarappan avatar Dec 15 '23 09:12 Ayyarappan

if audioReader?.status == .unknown{ }

Please add this line and check

I hope issue will be fix

laxman-iroid avatar Mar 28 '24 14:03 laxman-iroid