for my Android app I need to generate square videos for social media. Ideally in 1080x1080, but I have some flexibility on the resolution. For the framerate Ideal would be 60fps, but I can deal with 30, as long as it looks stable.
I have explored using a custom resolution camera object, however you can only ask the camera for pre-supported resolutions, and most cameras won't support a square aspect ratio.
I have had some success using this library https://github.com/CrazyOrr/FFmpegRecorder The library captures each frame, crops it with ffmpeg, at the end the frames are encoded together. However the resulting video always turns out choppy. I have tried tweaking the quality settings and the resolution but I haven't been able to remove the choppiness completely.
For my requirements it's not an option to record regular video and crop it into a square afterwards, since the experience needs to be seamless and cropping the video as a whole is too slow.
On the iOS incarnation of the app we were able to use this library https://github.com/Yummypets/YPImagePicker which basically does everything, is there no such thing for android?
Any advice on how to fix ffmpeg recorder is welcome, or if there's a different library that I could try, Ultimately what I need is the square video, I'm not particularly attached to any approach.