How to capture video in 1:1 ratio if the phone doesn't support that ratio like this 'Foodie' app.

As stated I’m building an app that needs to capture video in 1:1 ratio but not all phones support 1:1 ratio and I found this app

which does the same but I don’t know-how, I have tested it on my phone and it can capture videos and photos in 1:1 which my phone doesn’t support.

Thanks in advance