Before YouTube, sharing video over the Internet was a pain. You either had to make people download the file, or embed it yourself in the Web page coding and hope they had the right plugin installed to play it back. That was hard on you, but even harder on your audience.

You want to make any media experience as easy as possible for the viewer. Here's a good example: the other day my (Michael's) really good friend George sent me a small video he'd shot on his cell phone. I tried to open it, and couldn't. It was in some weird proprietary MP4 variation.

Since he's a friend, I wrote him back and told him that. (People send me stuff like this all the time. If I don't know them, I simply delete it.) George replied with a link, saying, “You can download a player here.” I deleted that message and went on to the next 400 tasks on my plate.

If George had sent me a YouTube link, I would have clicked on it and watched his video. For several reasons. Main one is I know it will work. Second, I don't like to download programs to view something, especially if it's just a fun little time-waster. I really don't have time for anything that isn't connected to today's tasks. My personal motto is, He who dies with his art on the most hard drives . . . wins.

Look — I'm 43. Halfway through life if I'm lucky, so I have to GO GO GO GO. I don't have time to download stuff to view stuff that isn't stuff I need, and doesn't help make my stuff.

But there's a happy ending. My friend George finally got his cell-phone video converted to YouTube format, and it's pretty damn cool. Check it out:

Look Your Best: Encoding for YouTube

For the uninitiated, video conversion for YouTube smacks of black magic, but there are several proven recipes for making your movies look their best. Here's one from Alan fallofautumndistro Lastufka, the only guy I know who's actually making money on YouTube. The Emo video that he did (featuring voiceovers by my wife Debra Jean and me) has had close to half a million downloads as of this writing. [Ed. Note: Michael & Alan are working on a book of YouTube insider tips for O'Reilly, due out in Autumn 2008.] Check it out:

Note that we used a trick to embed that video here. YouTube recently started converting uploaded videos into multiple files with different resolutions. To force playback at the highest resolution, you add &ap=%2526fmt%3D18 to the end of the URLs in the embedding code. See the "High Res with One Click" sidebar for details.

As with many hacks, this one is a mix of science and voodoo. You may have noticed that the video above stopped occasionally or perhaps didn't even start. For comparison, here's the standard version, without the fmt18 attribute:

Hi-Res with One Click

YouTube now offers some videos in multiple resolutions. If you're watching a multiformat video on the YouTube site itself, you can call up different resolutions by adding a format code to the end of the URL. Adding "&fmt=6" bumps the resolution from 320x240 to 448x336 and doubles the audio sample rate from 22.05 to 44.1kHz. And adding "&fmt=18" (iPod mode) raises it to 480x360 with stereo sound. This mode also uses h.264 encoding for better video quality.

If you're signed in to YouTube, you can specify that it always serve you the highest-quality videos. But Tech Recipes offers another approach: drag this bookmarklet — YouTube Hi-Res — to your browser toolbar. Whenever you click it, the bookmarklet will add "&fmt=18" to the page's URL for you.

Wired explains how to add the format codes to the standard YouTube embedding code. Note that the hi-res videos take longer to load and are more prone to stalling during playback. —David Battino

Even the standard version looks better than most of the videos on YouTube. Here's how Alan encodes his work. He outputs from his video editing software (Sony Vegas) to 640x480 pixels, with the video quality slider set to 90% and the audio encoded as a 192kbps stereo MP3. He also specifies variable bit rate (VBR) encoding. That averages out to 1000kbps or about 10MB per minute of video at 640x480. He uses the WMV file format. If that's not an option on your encoder, he recommends AVI. "I haven't been able to find any decent size/quality settings for mov files yet," he reports.

"YouTube now offers a High Quality feature, which will play back your videos in stereo, so I now encode with stereo," he continues. "Previously, I encoded in mono to ensure what I was hearing while editing is what YouTube would play back." (For more on YouTube stereo, see the "YouTube Goes Hi-Fi" thread in the O'Reilly audio forum.)

Alan notes, "The High Quality feature is nice, and it's automatic if your video is encoded decently enough (meaning, not 320x240 mono). However, the High Quality setting applies [dynamic] compression to the audio, which can knock pre-mixed levels out of place."

Alan has experimented with a lot of different output formats, sizes, file types, and encoding rates, and he says this is the one to use. Looking at his videos (which look great), I agree. Here's a nice black and white one, called 50 Things:

Pages: 1, 2

Next Pagearrow