My site involves user-uploaded videos, but I want them all to be square, and low file size so they load quickly.
However the user won’t be skilled enough to do this. So I need to convert the videos they upload.
What’s the best way to do this? My site is built on React on Next.js using Firebase to store videos.
You can use FFMPEG for this. There is a Node package for FFMPEG that works on Firebase functions. Do note thay Firebase functions have a 9 minute timeout and you might want to increase the CPU and RAM for that function.
In addition to FFMPEG as justin2 mentioned, maybe you can use Avidemux, not sure which one will be faster. (Tutorial for Avidemux scripting: https://www.youtube.com/watch?v=pxMeIU-ghXY ).
AWS Elemental MediaConvert may be another option.