I am trying to record the video in 1:1 ratio (square) and i cant get it to work,
if i set custom resolution in media recorder instance i get an error on media recorder start.>
You can take a look at https://github.com/boxme/SquareCamera. It's used to crop a image, but the idea can be used to crop a video. The main idea is to add a black cover top and bottom(or left and right)to make it seemed like a square.
FFmpeg can be used, of course, though it is a little complicated.