Website Helpers.com

  Articles, tips, and resources for webmasters


a project by Michael Bluejay | email


 
Put video on your website with YouTube

The Pros & Cons, and Recommended Quality Settings

Updated September 2009


To put Flash video on your website, you have two choices:  use an online service like YouTube or Google Video, or run standalone software on your computer like Riva FLV Encoder (Windows) or ffmpegX (Mac). The advantages of using an online service are that it's easy, they host the video for you, and your video will have a wider audience. The advantage of using standalone software are that you can pick which video player you want to use (more control), and you won't have to have links in the video player that can take visitors away from your site.  If you're using YouTube, then people can easily click off your video from your site and on over to YouTube's site, which is what YouTube wants, which is why they're willing to help you get that video onto your site in the first place.  You get free video for your visitors, and YouTube gets free advertising.

Since YouTube is the most popular online service, I have this special page about it.  A big advantage of using YouTube vs. a competing site is that YouTube is incredibly popular, so it can give your video a large audience.  This article as about YouTube, so that's what I'm going to cover. But the concepts are the same as with the other online video services: You upload your video to them, and they convert it and host it, showing it on their site, and letting you embed it into your own site.

Here's how going the YouTube route works:

  • You register for a free account. (Non-registered users can watch videos but not upload them.)
  • You upload your video to them via their website (in just about any format -- .wmv, .avi, .mov, .mpg).
  • They'll convert the file and give you the code to put on your website.
  • You put the code on your site and ta-da! -- your visitors can now see the video.

YouTube is actually hosting the video; the code on your page just calls on YouTube's server to show the player and provide the video to your site users.

If you do go with YouTube, then remember to give YouTube a very high quality video to work with. Don't compress it first, because YouTube is going to compress it, and if you send them a compressed version then it'll just be double-compressed, and look like crap. YouTube doesn't give much guidance on the settings you should use, recommending only H.264, MPEG-4, or MPEG-2 format, and 640x80 or higher resolution, and not giving specific recommendations for framerate or bitrate. So combining their recommendations for the former and mine to supply the bits they left out, we have the following:

Recommended settings for uploading videos to YouTube


Standard & HQ
High Definition

Video format

H.264, MPEG-4, or MPEG-2

Framerate

29.97 or 30 fps

Video size

320x240 min.; 640x480 max
1280x720 max

Video bitrate

1000-4080 Kbps
4000-8000 Kbps

Audio

AAC or MP3
Music:  44.1 kHz Stereo, 256 kbps
Speech: 22.05 kHz, Mono, 192 kbps

YouTube does a have limit of 2Gb per file, but that will be plenty. A 10-minute video (YouTube's limit) at the maximum quality listed above of 8000 Kbps for video and 44.1 kHz stereo for audio takes up only about 0.6 Gb.

Of course, no matter how good the video you send them is, YouTube is going to apply some pretty heavy compression to it, so it won't look as good as what you could do yourself with a different Flash player, because you can choose less drastic compression if you like. YouTube will compress the standard/HQ video down to about 250-500 Kbps, and HD to about 2000 Kbps.

Also, note that the less movement and the less detail in your videos, the less they'll suffer from the effects of compression. Make your videos without lots of motion (use a tripod) and with plain backgrounds, and they'll look better once they're on YouTube.

 

My other web video articles

Basics of web video. Which format to use, and how to ensure a small filesize plus compatibility with all browsers.

Website Helpers.com

  Articles, tips, and resources for webmasters


a project by Michael Bluejay | email