What is the best codec for video encoding?

I am trying to use ffmpeg to encode the .avi files after my render is completed so that I can send them to people without sending the avi raw file. as we all know, raw avi files can get rather large, and can be difficult to send to people, and I’m wondering what codec works best for 3d models.

I don’t think it matters about the content of the images much these days. The best codecs are really any of the mpeg-4 bsed ones if you are weighing up file size to quality. So DivX, XVid or x264/h264.

Personally, I still like mpeg-1. It’s the most compatible codec around and it will play in anyone’s browser without them installing a plugin. It takes about double the size for the same quality as mpeg-4 but you tend to not get blocky artifacts with mpeg-1 like you do with divx or xvid. H264 is great but it is slow to encode.

I would try mpeg-1 first and if the file size/quality isn’t good enough, I’d go with divx. The other good thing about mpeg-1 is that it decodes fast so you can scrub through the movie quite quickly. This is handy for CG animations.

I should add that for mpeg, you should multipplex the audio and video together but there are plenty of programs to help you.

here’s my probem, as we all know, 3d animations tend to have a lot of sharp edges, and well defined corners, while live video doesn’t, what kinds of settings can I set that will allow me to not get that blocky effect.

Personally I use XviD Codec:
I use mencoder for video conversions:

For starters. Bevel your edges, then you need not worry about the blocky effect.

For high-quality “near DVD” quality videos, I use DIVX or XVID. I assume that the people I send the videos have those codecs already installed. This will show-off your Blender project.

(For Windows Users)
For general purpose, and sending to people who have slow computers OR no specific codec installed, then I would use a High Quality WMV format. This is really a fairly good option.

(For MAC)
I am not sure, but you are stuck with QuickTime (mov) and the compression ratio is not that great for the quality. Possibly the above solutions will work for MACs too.

What mencoder settings do you use?

I would personally prefer XVid Because it is

  1. Open Source. Don’t have to worry about it not being available in the future.
  2. Cross-Platform. People on Linux can watch your video w/o much hassle. Yes, I know they have DivX codecs available for linux. . . but I never was able to get them to work.
  3. Higher quality than DivX.

If you want to distribute things over the Internet (for example) you’ll probably want acceptable quality while not consuming a huge amount of diskspace. In such case, you should encode it using a lossy codec (such as DivX or XviD). AFAIK XviD is slightly better than DivX according to benchmarks, and it’s also Open Source.

You may want to look into avidemux if you’re using Linux and want something similar to VirtualDub.

Quicktime mov isn’t a compression format. It’s just a container format. You can put any encoding you want into a .mov whether it’s divx, wmv, mpeg or whatever - VLC actually supports the quicktime container. With Quicktime 7, you can encode h264 in a standard mp4 container (which was derived from the .mov container) and that’s the best quality compression available at the moment. I posted a link in another thread with a side by side comparison with XVid and the quality of H264 is noticeably better. But like I say, it’s slow to encode so XVid is likely the better option at the moment. WMV is good quality but it’s just too proprietary for my liking.