I need to allow users to upload large files and it can take a long time especially on mobile devices with slower connections. I'm curious to know if there are production-ready options for compressing the files on the client side prior to uploading. The files will be primarily mp4, mov, and 3gp. Also, if this is even possible, is it safe and what would I need to do on the server side (php) to safely uncompress them.
Asked
Active
Viewed 1,232 times
1 Answers
0
The file formats that you are naming are already heavily compressed, compressing them more won't be a real option. You can see for yourself by just zipping a .mp4 file, the result won't be much smaller.
If you still want to try:
- compressjs is a javascript compression library using LZJB, but i don't know if there are any PHP functions that do that.
- jszip uses plain old zip which is surely somehow available to PHP

bmurauer
- 989
- 8
- 24
-
Yup. I tested with .zip compression and there's not change in size for an MOV file. Seems like the only option would be to actually resize the video file somehow, like "recompress" the video or somehow downsample them. Seems unlikely with javascript, but what do you think? – emersonthis Aug 01 '13 at 14:12
-
i fear so... additionally, i wouldn't recommend converting videos on client side, your clients would get angry if their CPU usage was entirely consumed by your script. – bmurauer Aug 01 '13 at 17:43
-
Are you saying converting videos on the client side is possible? How? – emersonthis Aug 01 '13 at 17:45