Cropping video to a square like vine and instagram in xcode

While working on a project I found the benefits of having a square video resolution (e.g. 600 x 600) very useful for things such as file size, upload speed and buffering. This is probably why video apps such as vine and instgram use similar resolutions. However for something seemly simple I could not find very