Search code examples
javascriptnode.jsnpmimage-compressionvideo-compression

Compress Video files in NodeJS


I am improving the performance of my application.

I want to compress images and videos to minimum size without any quality loss i.e. lossless compression.

For images, i've used imagemin package. It works well with png format, but for jpeg, its very inefficient.

For videos, i can't find any way to minimize video size without scaling down the resolution and without any quality loss.


Solution

  • I developed a compression service in our work. Using FFMPEG nodejs ffmpeg Its the most common lib, but you need to make sure to install ffmpeg on the machine. I decreased around 60% off the videos. for example from 20MB to 9MB. Good luck, its not easy to understand and not so easy to implement.