You would need at least two extensions to record videos suitable for messaging.
- to record the video (joedevcamera)
- to encode/optimise the video (e.g resize) for messaging (ffmpegkit by vknow360)
Here is possibly a useful optimise command:
ffmpeg -i input.mp4 -c:v libx264 -crf 23 -preset medium -movflags +faststart -c:a aac -b:a 128k output.mp4
In my tests reduces file size 16 times (e.g. was 16mb, now 1mb)