AbedElazizShe / LightCompressor

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

Compressor not working After API 29 and above #141

Closed Chizuon closed 1 year ago

Chizuon commented 2 years ago

hello, i am facing an issue file compressing on android API 31 and newer the process fails with this error.

java.io.FileNotFoundException: : open failed: ENOENT (No such file or directory)

Amberon-voldi commented 2 years ago

hello @Chizuon i've faced the same issue with this package and found the cause, with newer version of android their is scoped storage to access file outside of it's own directory. before API 30 we needed to add android:requestLegacyExternalStorage="true" flag to access file in external storage but After Android 11, Android just ignores android:requestLegacyExternalStorage="true" and android:requestLegacyExternalStorage="true" flags and i assume this package is not yet compatible with scoped storage for flutter a workaround can be compressing the video in the internal directory then storing it in the external dir with other packages which does support scoped storage

Chizuon commented 2 years ago

i see, so does the video compress package for flutter is compatible with scoped storage?

Amberon-voldi commented 2 years ago

i see, so does the video compress package for flutter is compatible with scoped storage?

dunno

AbedElazizShe commented 1 year ago

Hi @Chizuon . Apologies for the late reply. I will release a new version soon with updated README to explain which permissions to declare.