numandev1 / react-native-compressor

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

Video not compressing below 10 mb #26

Closed aamez closed 2 years ago

aamez commented 3 years ago

Hi, first of all I appreciate your effort for making this package. Gone through your excel for video compress, can you do the compression for video below 10 mb? or else can you refer some other package for the same?

numandev1 commented 3 years ago

@aamez you can remove this condition for android https://github.com/Shobbak/react-native-compressor/blob/dd5c106522461005acd89d6f679c0ef2f96fdd74/android/src/main/java/com/reactnativecompressor/Video/AutoVideoCompression/AutoVideoCompression.java#L38

and remove this condition for IOS to compress video which size is 16MB https://github.com/Shobbak/react-native-compressor/blob/dd5c106522461005acd89d6f679c0ef2f96fdd74/ios/Video/VideoCompressor.swift#L205

aamez commented 3 years ago

@aamez you can remove this condition for android https://github.com/Shobbak/react-native-compressor/blob/dd5c106522461005acd89d6f679c0ef2f96fdd74/android/src/main/java/com/reactnativecompressor/Video/AutoVideoCompression/AutoVideoCompression.java#L38

and remove this condition for IOS to compress video which size is 16MB https://github.com/Shobbak/react-native-compressor/blob/dd5c106522461005acd89d6f679c0ef2f96fdd74/ios/Video/VideoCompressor.swift#L205

Great man it worked, thanks :)

numandev1 commented 3 years ago

@aamez i will add prop for this

aamez commented 3 years ago

@aamez i will add prop for this

sure thanks @nomi9995 :)

daschaa commented 2 years ago

@nomi9995 Was this prop added? Any updates on it?

numandev1 commented 2 years ago

@joxw1 no, I did not add. I forgot. i will add it today

numandev1 commented 2 years ago

@joxw1 i have added minimumFileSizeForCompress for this purpose

https://github.com/Shobbak/react-native-compressor#minimumfilesizeforcompress-number-default-16

i will release today after fixing one or two more issue

daschaa commented 2 years ago

@nomi9995 Thanks! Great effort! 🎉

numandev1 commented 2 years ago

https://github.com/Shobbak/react-native-compressor#minimumfilesizeforcompress-number-default-16

just released 1.1.0 version of the compressor which has fixed this issue.

yarn add react-native-compressor@1.1.0