AbedElazizShe / LightCompressor

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

Native recording video selection, compression returns success, but the file is empty and not found, changed the other way, Copy the other file, direct compression failed. #201

Open liuxuesong001 opened 3 months ago

liuxuesong001 commented 3 months ago

image

liuxuesong001 commented 3 months ago

Android 9 、10、11 、12 They all have the same problem. Android 13 、14 No problem.

liuxuesong001 commented 3 months ago

image

liuxuesong001 commented 3 months ago

2dc4fb4cde30ee653aca6e1a974eee6 The compression succeeded and generated another file of 28B size, and it still can't be opened, tested several mobile phones with the same result. phoneType:Huawei Nove 6 se

liuxuesong001 commented 2 months ago

image

iori57 commented 2 months ago

I think I'm encountering the same issue on my Huawei P20 which is running Android 12. It calls the onSuccess callback but the file is 28B in size and not playable. Tested different types of video files from camera or from other apps none are working.

Tried copying the file to app's cache directory before compressing, but still the same.

On the other hand, the same video file compresses fine on my Samsung phone using the same code.

vikashrathore081 commented 2 months ago

facing same issue

rezafaraji93 commented 2 months ago

same