React JS File/Video compressor

6.2k views Asked by At

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.

2

There are 2 answers

0
Ahmad ul hoq Nadim On

I think You should try this one: https://github.com/ffmpegwasm/ffmpeg.wasm

1
mani-hash On

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