Smallest size, or meeting an arbitrary size, isn't a particularly hard problem. The more interesting question is how to make the best quality video given the size constraints of the board you're posting on.