WWW FAQs: Why are my video files so big?

2005-08-05: Let's say your video camera has a 720x480 pixel resolution. That's 345,600 pixels. Just one raw "frame" from your camera will use about one and a half bytes for every pixel, or 691,200 bytes. That's more than half a megabyte for just one frame of video.

Now, it's usually not quite that bad. A typical mini-DV handheld camera shoots video in a compressed format closely related to the JPEG format used for still photography. And that compresses the data by a ratio of about 5:1, or about 140,000 bytes per frame.

But how many frames are there per second? For decent video, about 30 frames. And that works out to over four megabytes per second. Even on cable modem or DSL, most website visitors won't be able to handle that kind of speed and still play the video as they download it. What's worse, if you did have multiple users doing that, you would go way, way past your alloted bandwidth and be charged extra by your web hosting company. Ouch.

So what can you do about it? Get realistic about the video formats you use. See "How do I add video to my website?" for detailed information on how to convert your video to formats that are practical for use on the web. And consider free video hosting services and BitTorrent, both of which are covered in that article.

Legal Note: yes, you may use sample HTML, Javascript, PHP and other code presented above in your own projects. You may not reproduce large portions of the text of the article without our express permission.

Got a LiveJournal account? Keep up with the latest articles in this FAQ by adding our syndicated feed to your friends list!