Reputation: 53
Is there any library available for File or Video compressor in react JS or javascript? If unavailable, suggest an alternative way to resize file size or video size before upload.
Upvotes: 2
Views: 8852
Reputation: 804
I am not sure if there is any java-script library to compress videos client side (however there is one for image compression: https://medium.com/front-end-weekly/image-compression-in-reactjs-a07ec0066b24)
You can try ffmpeg to compress videos server side (for example by using NodeJS to run the shell commands to compress the uploaded video). However this would require full access to the hosting server because you need to install ffmpeg in it.
You can also use something like this https://mediamachine.io/
Google "video transcoding pipelines" for more information regarding the above
Upvotes: 3
Reputation: 378
I think You should try this one: https://github.com/ffmpegwasm/ffmpeg.wasm
Upvotes: 3