Monday, March 9, 2009

YouTube Uploading Update (March 9, 2009)

OK, I think I've got things figured out for the moment. There are three basic types of videos on YouTube: normal quality, high quality, and high definition. For normal and high quality, YouTube processes your video differently based on its content. For high definition it processes the video based on its settings. Thankfully, all the videos now use Advanced Video Coding with Advanced Audio Codec, with different bitrates and resolutions. This is a big improvement, and really improves the quality of the videos without just increasing the bitrate. Remember, if the bitrate is too high, your internet connection won't be able to handle it and you'll have to wait for it to buffer and load. Now you get more quality at the same bitrate.

Normal Quality.
There are a few types of normal quality videos. The common thread is the sound, which is 64kbps 22050Hz AAC. As for the video, the maximum bitrate is about 260kbps. I've encountered several resolutions. For widescreen, it could be 640x360, 480x270, or 320x180. For 4:3, it could be 640x480, 480x360, or 320x240. Those are just the common possibilities; odd sizes may pop up depending on your exact video. Which one will your video get? There's not really a magic setting you can tweak, YouTube seems to be making those decisions based on the content of your video; specifically how compressible it is. I'll be doing a lesson on compressibility in the future, but basically the more complex your video is, the less compressible it is. A video of a still image is far more compressible than sports footage filmed without a tripod.

Motion is probably the biggest factor in compressibility. Here's a rule of thumb: the faster your video moves, the lower the resolution it will get. I think this is a wise decision. Since the bitrate is limited to around 260kbps, a fast moving video will look yucky at the full player resolution of 640x360. Reducing the size to 480x270 or 320x180 cuts down on those issues, at the expense of reduced sharpness and clarity. Hopefully the amount of motion will make the reduced clarity less noticeable. In many cases it does.

High Quality.
Videos with the HQ button are pretty rare now. The only time I've gotten the HQ button is with videos with an insane amount of motion. Basically if there's a really good reason for your video to have a higher bitrate, you'll get the HQ button, but they're not giving it to just any video. Here are the improvements: the audio will be up to 128kbps. I think that's the max; it's hard to tell for certain since it's a variable bitrate rather than a fixed one. The sampling rate is 44100Hz instead of 22050Hz. Musicians will favor this greatly. As for the video, you'll get the native resolution of the player (640x360 or 480x360) with improved clarity. The video bitrate can be up to around 660kbps, for a total datarate of 800kbps, about 2.5 times that of the normal quality videos. Remember, that will be an issue for people with slower connections.

High Definition.
To get the HD button, in most cases you won't have to worry about the content of the video. The decision to give the button is based more on the settings of your video. I recommend using the size 1280x720, since that is the size of the video YouTube will create. Using that size should get you the link.

Occasionally, framerate and bitrate can be a factor. If you shot the footage on a camcorder, it should be fine. The only time this would happen is with a video of a still image, or something like screen capture with pretty much only the mouse pointer moving. I wouldn't worry about that stuff unless you already uploaded a video and you're having problems getting the HD button. First wait an hour or two because it sometimes takes time for the link to appear. Then if you still need help, continue reading. If you screen captured your footage, be sure the framerate is at least 24. Anything under that and you won't get the link. As for the bitrate, work on getting it over 1000kbps. PLEASE NOTE: even if you set the bitrate at 10,000 kbps, if your video is really compressible, it may in reality end up being under 1000kbps. The requirement isn't exactly 1000kbps, but it's pretty safe to assume if it is 1000 or higher you'll get the button. If you're having problems, see my entry on Screen Capturing for YouTube. Scroll to the section on purposely increasing the bitrate.

Recommendations.
Now that you have an idea of how YouTube handles your videos, I have some suggestions. Try to make your video more compressible. Avoid unnecessary motion by using a tripod. Light well so the picture isn't noisy. If you have interlaced footage, deinterlace it. For text, don't use fine print, and use fonts without those extra tails on the end (use Sans or Arial for example). It's tricky to do with a video camera, but see if you can get your background a little out of focus, so the quality is directed to the foreground instead. After you have a great looking video, you can add a noise filter to help out even more.

For the best sound quality, avoid MP3's. Use either uncompressed audio, or losslessly compressed audio (like an Apple lossless AAC). If you need to force high quality to get 128k 44100Hz, try making a video that moves around a lot. Or if you're going for HD, use a 1280x720 still image and increase the bitrate on purpose if necessary. If you're really concerned about getting decent sound and don't want to deal with these video issues, you can always urge your viewers/listeners to add &fmt=18 to the end of the video's URL for sure fire higher quality audio. You can even put the &fmt=18 link in an annotation that says "Click here for high quality."

Use a square pixel size. This means you shouldn't upload a 720x480 video; use 640x480 instead. For widescreen, try 640x360, 852x480, or 1280x720 for HD.

8 comments:

GoodiesGuy said...

Their Needs To Be A "Watch In Blu-Ray" Setting Cos Blu-Ray Is By Far Better Than High Definition.


My YouTube: http://www.youtube.com/cenatv

My Blog: goodieguy.blogspot.com

Derek said...

Blu-Ray is HD, in most cases.

Jamie said...

Derek, You are doing us a great favor, thanks for the time you spent getting this info together.
My question is how do I make changes to the settings of my video, I use Vista, Windows Movie Maker and cant seem to find how to change the framerate, size, etc.
What should I do?

My YouTube: http://www.youtube.com/user/53531640

Anonymous said...

Derek thank you so much for keeping everyone updated. I've been using this information for a long time and check your blog first every time there is some new confusing thing. I've been really frustrated not being able to get the 'watch in HQ' option on my standard def. videos.

I wish Youtube would be more upfront about the inner workings of everything. They assume everyone is an idiot.

Derek said...

I just can't deal with the way Windows Movie Maker hides the settings under the hood. If it was me, I'd get a cheap version of Sony Vegas at the very least. But there's a guy on YouTube who knows WMM better than me - he's even used it for widescreen videos, so ask him: http://www.youtube.com/taofledermaus

Anonymous said...

I must say, great that somebody is working to get all this right.
thx, Derek.

I don't know if all people already know this, but if you use Mozilla Firefox you can get an extension and a script that "force" youtube to put in the best quality setting (&fmt=18, &fmt=22, &fmt=35) automaticly in the URL. And fixes some other stuff like disable "autoplay". Go check it out if you already haven't.
Here's the link: http://userscripts.org/scripts/show/31864

If you want some help with the script you can always ask.

Sorry for my bad english.

/Zolidus

http://www.youtube.com/user/zolidus00

Graham Griffiths said...

Thanks for your Virtualdubmod tutorial - brilliant! My clip is encoded X.264, bitrate 5Mbps, 18fps. However Youtube doesn't want to play it properly in HQ!http://www.youtube.com/watch?v=9xAlzArG3bA
or when adding &fmt=18 It plays fast or green screen at start and always has the buffering circle blinking in the centre.
Can you advise?

Thanks

Kennel said...

I don´t get why HD still is so slow to load on YouTube (I live in Spain) when sites like Vimeo or Dailymotion do it without buffering (after clicking play), so I really prefer HQ.
Anyway I hate uploading anything above 50 mb because it can take over 1 hour blocking everyones internet in the house.
Is there any high compression codec that can lower the file sizes?