YouTube and XviD

by Mike Levin SEO & Datamaster, 07/03/2006

It’s amazing the search trends you tap into when you start HitTailing. Putting up the demo video on YouTube for example, made me go on a hunt for free video tools to encode my Flash demo for YouTube upload. I had to jump through a lot of hoops, to ironically get from one Flash format back to another Flash format. But it had to be uploaded as AVI or MOV. Well, what I discovered is just by the casual mention of YouTube, XviD and DivX, I drove a lot of search traffic. YouTube is making the codec hunt a mainstream proposition. Who would have imagined!

Anyway, for the sake of anyone who finds THIS post as a result of me mentioning those hot topics, here’s the magic combo. This is ONLY for when your video capture tool CANNOT natively save in the correct size using the XviD codec.

  1. Save from your video editor package in native uncompressed format. This will avoid quality-loss from double-encoding on your end, and an eventual THIRD encoding pass on the YouTube end. Get it? If you let your video-capture tool encode and it’s not the right format for YouTube, you have to transcode, and lose control of quality. Also, capture at the correct pixel size of 320x200 or you will once again be trapped into transcoding and losing quality. None of the free tools in my experience scale video with acceptable quality in the transcoding process, so avoid it at all costs. Capture at 320 x 200, which is what YouTube recommends.

  2. OK, once you’ve saved in non-encoded raw format (hopefully you have enough drive space), the next thing you want to do is encode it with XviD. Forget DivX. Though it ONCE was the cool underground free in-crowd thing, it’s now a commercial package. It does have free components, but sorting it all out and keeping 30-day trial software off of your machine isn’t worth it. The Open Source XviD codec has replaced DivX in the cool free community circles. Check out sites like Doom9 to confirm. Anyway, the codec you’re looking for that’s capable of compressing at the time of this writing is XviD-1.1.0-30122005.exe. It will probably be revised by the time you read this, so just Google on XviD. XviD.org appears to have a Unix-lean. If you’re a PC person, go to Koepi.org.

  3. And lastly, you need a transcoding tool that USES the codec. For the uninitiated, the codec alone is not enough to do anything. It’s just sort of the plug in that other tools like media players and transcoders use to get their compression / decompression algorithms. The transcoder that I had success with is VirtualDub.exe. It’s another free, open source package, so you can get this entire thing done for free. I chose the one from sourceforge.

  4. That’s about it. You may have to experiment to get the VirtualDub settings correct. And be sure your source video is 320x200, or a multiple of 4 interval or else it will report that your source is corrupt! In general, you want your video and audio in full processing mode (though I’ve seen conflicting advice), and you need to go into the Video Compression options to actually select XviD, and the Audio Compression options to choose an MP3 format. Oh yeah, make sure you have an MP3 audio compression codec, which is separate from XviD. Google on Lame.

Well, that’s about it. That’s the magic formula for the top-quality, highly compressed video that you see on YouTube, and being sent around video sharing networks like BitTorrent. In fact, if you’re choosing which BitTorrent file to pull down, you should usually choose the one that uses XviD in the title. In fact, if it says HDTV and XviD, you’re probably on the trail of a VERY GOOD quality video file.