I need to compress files to fit 5mb cap. It doesn't matter which compression methods are used, I just need the easiest way of compressing file to a certain size in JavaScript.
Asked
Active
Viewed 4,517 times
3
-
It should go without saying that there definitely exist files that cannot be compressed to some arbitrary size. Also video is *already* compressed. I doubt it's possible to get better than 5% to 10% smaller. – Pointy Nov 18 '19 at 14:44
-
Messenger is able to compress video from 10mb to 5mb. This is exactly what I'm looking for – Gieted Nov 18 '19 at 14:49
-
Generally "compression" refers to reducing the storage size without altering the source. – Pointy Nov 18 '19 at 14:51
-
1You meant lossless compression. I clearly need lossy compression, because 5mb is very small – Gieted Nov 18 '19 at 14:56
-
Right. Getting an hour-long video down to 5 megabytes is a lot of loss. – Pointy Nov 18 '19 at 14:58
-
What do you mean by “in JavaScript” does that mean in a browser, or in node.js? – szatmary Nov 18 '19 at 17:31
-
node.js ----------------- – Gieted Nov 19 '19 at 19:25
-
Does anyone foud the solution? – Jayna Tanawala Dec 04 '20 at 06:24
-
This might be too late but try using ffmpeg. It's used to handle video file encodings – Default Dec 10 '20 at 05:39