Search code examples
androidandroid-mediarecorder

how do I capture a video square like instagram and vine using Mediarecorder


I have tried by setting the videosize(width,height) for mediarecorder, but this has device compatibility issue, on few devices its crashing at mediarecorder.start();


Solution

  • If the device happens to support a square video size, you are welcome to use it. Most will not.

    Vine, based on the last reports that I heard, does not use MediaRecorder. Instead, they use preview frames from the camera, which they crop to be square and assemble into a video. I do not know what Instagram does.

    You are also welcome to record a non-square video, then post-process the video yourself to crop it to be square.