What is the best video size for let's say a 5 minute video. I want to host my own videos. So, I want to understand more.
What is an acceptable size?
Video Production Stack Exchange is a question and answer site for engineers, producers, editors, and enthusiasts spanning the fields of video, and media creation. It only takes a minute to sign up.Sign up to join this community
First off, why host your own videos? YouTube, Vimeo and many others have awesome embed tools, and unless you have a couple of GB to waste on your host, they're very practical.
But to your question, 1080x720 is perfectly fine, and creates a reasonable file size. 1920x1080 is pushing it a little, and 4K is just overkill.
I'm a web developer too, and when I have to host videos for a live background, featured video, etc, 1080x720 is my go to resolution, and I host things of larger size on YouTube since they'll take something like a 4K video, and give viewers the option of a resolution as low as 360p.
I would analyze how YouTube encodes videos, as described in this answer. It also helps you to understand the logic behind it.