Client side H.264 (MP4) video compression/encoding

46 views Asked by At

I'm currently developing an app with a wide range of features, with one of the key features being customer video recording. Up until now, we haven't implemented any compression technique for the videos; they were simply recorded and sent directly to cloud storage. However, as we're expanding our business, this approach may not be sustainable, especially considering the increasing number of users uploading videos, which could lead to prohibitively high storage costs.

Therefore, I'm seeking advice from video programmers on how to address this issue.
Based on my research, one option is to integrate a paid video compression API.

Question:
I'm exploring a second option of (possible) client-side compression to alleviate the load on our servers. Is it feasible to implement compression on the front end of the app? I'd appreciate any insights or recommendations on how to proceed.

1

There are 1 answers

0
O. Jones On

You can get the browser MediaRecorder API to generate h.264 or VP8 compressed video boxed in webm. You can then stream it to a server, maybe with a websocket setup, to a server. But different browsers do this a bit differently.

And the resulting video won't be easily seekable.