As a Moderator for Renderosity's Animation community, I watch over the Animation Forum and Animation Outlet (our animation gallery). Members often wonder what codec they should use for web-based videos. There are different tools that help you encode videos on different formats. Besides that, most video-editing apps already include the capability to encode to different video formats.
Regardless of the many available formats, most of the videos you will find on the internet will be in either AVI, WMV, or MOV formats. AVI can be the most problematic format because there are a lot of different codecs for it (such as DivX, Xvid, Indeo, and so on). Luckily, people have reached a point where they choose to go for the "standard codecs", so it is very unlikely that you will find yourself unable to watch certain video. Above all this, video upload services, such as YouTube or Google Video, try to keep it easy for the users so they offer their own video-streaming service based on the Flash Video format.
Keep in mind this article is not meant to tell you which codec to use, but rather tell you which codecs are most widely used so you can decide for yourself. Neither will I give you a tech review of every codec, because I believe that the final result is what matters, not the algorithm that is used to encode your videos. I know there are a lot of members that really are into the technical side of the codecs, but the rest of us just want to create animations that will look good, and won't take forever to download.
When it comes to AVI video, the most common codecs are Xvid or DivX. They are both based on the same technology, however they work different and are not at all compatible. The major difference is, obviously, that the DivX encoder is a commercial program while the Xvid codec is still free. When running my tests, I found that at the same bitrate DivX created a smaller size video, although the video quality looks pretty much the same in both cases.
I then made a Quicktime version of the same video. Quicktime offers different "formats", such as sorenson, mpeg4, jpg, and so on. While some yield very nice results, the rest look simply horrible, especially for web-based video. For this test I used sorenson 3 because it's the one that offers the best video quality. The output video had better image quality than the AVI counterparts, but the video was way bigger at the same bitrate (3mb compared to 200kb... it's really hard to decide which one to use, right?), so Quicktime is pretty much out of my list.
Windows Media Video is the Windows' video codec, as you may have already guessed. The video quality is better than that of the DivX or Xvid codecs, but the filesize is slightly bigger, although it's not as big as the Quicktime video. The downside is that you need the Windows Media Player to playback WMV files. This may not be a problem for Windows users, but MAC and Linux users have to find alternate ways to watch those files. Using this codec may actually work against you, because the lack of compatible players will prevent some people from watching your creations.
All these different choices can sometimes be rather frustrating. Sometimes you may download an animation that some guy made, and you realize you can't watch it because that guy used some strange codec that nobody has heard of. Luckily enough, a not-so-new format has been released that makes things easier for us. If you visit YouTube, you will see that the videos play on a Flash console. There are tools now that let you create Flash Video Files that you can put into Flash movies, so that they play in any web browser. This is actually a relief because you can be sure that almost anybody will be able to watch your movie, as almost everybody has a Flash-enabled web browser.
So far, the only application I know that can make a Flash Video File for you (including the playback controls and all that fancy stuff), is Macromedia Studio 8, which I don't have, so I won't be able to run a test. This video format seems to be especially useful for larger movies, because they download really quickly. If you visit YouTube you will notice that movies running for 5 to 10 minutes download really quickly (a 3:26 minute video sample with audio, I found, is 7mb). This video format looks really promising, and I am sure that more apps that support it will be released soon (if they are not already available).
Creating animations has become a painful proccess thanks to all these available codecs. Most of the time, not everybody will be able to watch your animations, so some will offer the same animation in different formats. I don't see this will change in the near future, because more and more people are releasing their own codecs (if you have heard of the "XXX codec pack", you will know what I mean). Also, we have to keep in mind that sometimes our audience will not be willing to download some codec just because of our animation (sometimes in the past, I've even skipped video files just because I don't have Quicktime 7. But don't worry, I do watch all the animations in the Animation Outlet, lol). So until we have a "universal codec" that everybody will use, I think the best option will always be to have our creations in different formats, even if that means more work.
copied, or reproduced in any manner without written permission from the artist.
Animation Alley is a regular featured column with Renderosity Staff Columnist Sergio Rosa [nemirc].
Sergio discusses on computer graphics software, animation techniques, and technology. He also hosts interviews with professionals in the animation and cinematography fields.
In addition to those listed, MPEG 1 is still a universally playable video format. Also, the efficiency of different compression algorithms is based on what they are compressing (just like JPG compresses some images better than GIF format and GIF compressed some images better than JPG). Therefore there is no universal way to say that one codec is always better than others. Try different ones on your animations; that's the only way to be sure that you've got the best size/quality trade off for that particular animation/video.
Couple of years back i was into video editing. blame academy projects for that. It was a huge thing for me... what LOOKS the best. XVID i favoured far above DivX (think it was 5 then). This opinion was based mainly on a scene i rendered with volumetrics. Xvid retained the sharpness and quality of its detail far better than the divx encude who seemed to mash tones together. Excessive colour/tonal bleeding I guess one could call it. Then archiving files... RGB avi is way too big... so i started using huvyuv (i never spell it right). Basically im curious to see what others think. Which looks better. XVID or DIVX... and filesize wise... that comes more apprent with lots of motion in a scene and colours.
Thanks for the excellent discussion! On a side note: when I first saw the title (A Codec Moment), I thought "How clever!" A play on the advertising slogan "A Kodak Moment" for Kodak film and cameras. But then I thought, "Wait! Renderosity is an international community. I wonder how many people from non-English-speaking countries understood the intended pun." But it was cute, nonetheless.
You missed out a crucial criterion: time to begin playing. AVI requires the WHOLE video to be loaded before playing.... Ergo, a 1-minute video (however well compressed) takes forever to see. Your decision to scrap QuickTime is ill-advised, and does your readers a dis-service. See my web site for a 2-minute, 12 MB file (yes, 12 MB) which will begin playing in less than a second for hi-speed. (http://www.djfilms.ca/creativescreens/tearsInRain.html) I challenge you to display such a file in AVI or WMV with such a low start-up time. Proof = pudding.
You might want to check out another way to get Flash video/animation for the web. There's a program called SWiSHvideo2 that does pretty much the same thing as Macromedia Studio 8. It's not as powerful as Macromedia Studio 8 when it comes to scripting, but it does an excellent job to convert Quicktime, AVI, MPEG and WMF files into a streaming Flash Video. And, for under $50, a great bargin. You can download it for a free 15 day trial. I've been pleased with the resulting videos that I've been able to put on the web.
Great, very clear article....I personally stick with quality and damn the dl times....LOL...but I'm old and cranky and want it my way,heh heh heh..mostly Ive started doing uncompressed frame sequences and putting them together in other apps and finr that also a lot of fun in that you can drop out stuff and mix stuff up, and generally just go nuys in a paint program ...like that...am going to try the Divx route as it seems the best trade off when thinking cheep web publishing...thanx again