shahen94 / react-native-video-processing

Native Video editing/trimming/compressing :movie_camera: library for React-Native
https://shahen94.github.io/react-native-video-processing/
MIT License
1.25k stars 326 forks source link

Reduce the library size , after generating apk size to much larger than expected #360

Open kapilmyakal opened 2 years ago

kapilmyakal commented 2 years ago

Dear @shahen94 , the package size is too lare because of this apk size increasing can you reduce the size , please revert me with best solution Thank you...

software version
react-native-video-processing 2.0.0
react-native 0.64
node 17.4.0

Source Code: const origin = await ProcessingManager.getVideoInfo(image.path);

        const compressionOptions = {
            width: origin.size && origin.size.width / 3,
            height: origin.size && origin.size.height / 3,
            bitrateMultiplier: 7,
            minimumBitrate: 300000,
        };

        await ProcessingManager.compress(image.path, compressionOptions)
        .then((data) => {
            if(data)
                file.uri = data.source
            else
                file.uri = image.path
        }).catch(error => {
            console.log('compression error', error);
        });
pierroo commented 2 years ago

I just realized this package is indeed 103Mb (we can see it here: https://www.npmjs.com/package/react-native-video-processing) => That is completely insane; quite unfortunate.

@kapilmyakal did you come up with a solution since; or potentially another library that you tested and works for you?

fluxgenic commented 2 years ago

I am facing same issue after install and generate the apk. app size increased from 85mb to 270 mb. may i know what is the issue? how this can be reduced to use this package? kindly help on this.