numandev1 / react-native-compressor

🗜️Compress Image, Video, and Audio same like Whatsapp 🚀✨
MIT License
949 stars 93 forks source link

[Android] Large Videos (>900MB) cannot be compressed #273

Open kusche12 opened 8 months ago

kusche12 commented 8 months ago

Current behavior

Trying to compress a video that is 900MB on Android and getting an error before it tries beginning the compression: [Error: setDataSource failed: status = 0x80000000]

Smaller videos around 250MB work fine on Android, and I do not have this problem on iOS

Expected behavior

I should be able to compress large videos on Android

Platform

React Native Version

0.73.5

React Native Compressor Version

1.8.24

Reproducible Steps And Demo

Select a video with react-native-document-picker, save the source path, and use that source path as the param in compressor:

Video.compress(
      filePath,
      {
        compressionMethod: 'auto',
      });