This script will help you calculate the optimal width and height for video footage you wish to reencode. Never mess up any aspect ratio again.