Creating XviD video files

Why use XviD?

Step by step: Creating an XviD movie

Creating XviD video files
Darren Yates explains how to use VirtualDub and the XviD compression tool to create great video files to watch on your PC.

If you want to watch videos in different ways - on your PC, over the Web or on your TV via a DVD player — you need to know how to convert video files. Here we'll show you to how to convert files into the best free format for viewing video on your PC, xViD. But before we go into the process, there are a range of specifications that we need to explain first.

* Video frame size. This the size of the video frame measured in pixels horizontally and vertically. There are four frame sizes allowed for under Australian TV/DVD video standard: 720 by 576 pixels, 704 by 576 pixels, 352 by 576 pixels, and 352 by 288 pixels. There are exceptions such as High Definition Digital TV broadcasts and non-standard Video CDs, but generally, video has to be one of those sizes to be viewed properly on a TV. There are fewer restrictions for PC playback. For example for DivX or XviD format videos, the only technical restriction is that the frame size must be wholly divisible by 4 and the vertical pixel resolution by 2. Also, PC monitors are generally capable of much higher screen resolutions than TVs: generally 1024 by 768 pixels or more.

* Frame rate. This refers to how fast the video is displayed and is measured in the number of frames per second (fps). The Australian standard for all TV broadcasts and DVD movies is 25fps. The US standard is 30fps. There are occasions when you may be able to away with less (to reduce the file size), but generally you should stick to 25fps for smooth, realistic video.

* Video compression. Raw video files are just so huge that even commercial DVD movies use compression. Video compression reduces the file size dramatically by encoding it in a way that reduces redundant data. This is done with the use of a codec, firstly by to encode the compression when converting the file, and then to decode "on the fly" when playing the file. Nearly all video codecs these days are some version of MPEG, with MPEG2 being the standard for DVD-Video discs. However, the latest version, MPEG4, is even more efficient. It's being used by relatively new video formats such DivX or XviD, and are ideal for PC use. That's because viewing software such as Windows Media Player can be easily updated with a new codec.

* Video bit rate. Digital video consists of a stream of video data. The rate at which that data is streamed by a codec determines the overall quality and size of the video file. Measured in kilobits or megabits per second (Kbps or Mbps), a higher bit rates gives you better video quality but larger file sizes (or less running time on a DVD disc). Lower bit rates the reverse. While older codecs such as MPEG1 generally only support one standard bit rate, new codecs allow you to vary the rate to suit your need. For example, DVDs using MPEG2 compression will support any bit rate up to 9.8Mps. But with MPEG4 being more efficient, you can set a lower bit rate with DivX or XviD files to achieve DVD quality.
You can also choose whether to keep the bit rate constant throughout your movie (a fixed bit rate), or to allow it to vary (variable). The latter drops the bit rate during frames where little in the shot changes and rising when the action heats up. Over time, the bit rate will average out to the value you specify within your video encoding/editing application. Variable bit rate is generally the better option as it gives you quality when you need it but takes longer to create.

* Audio compression. While video takes up plenty of disc space, so too can the audio, particularly if you start talking about multiple channels. DVD movies support five audio formats depending on the number of audio channels: LPCM (Linear Pulse-Coded Modulation), MPEG1 Layer II (MP2), MPEG2, DTS and Dolby Digital. LPCM uses no compression, providing the highest quality option and is basically the same as the Windows WAV file format; MPEG1 Layer II compression is very similar to MP3, while DTS and Dolby Digital are multi-channel compressed audio formats.
Again, the options are greater for PC video, with the new DivX and XviD video formats supporting common compressed audio formats such as MP3 and Ogg.

* Audio bit rate. This refers to the rate at which audio is streamed by a codec. Similarly to the video bit rate, the audio bit rate is a matter of balancing file size and audio quality, and it's measured in kilobits per second. The ideal settings are similar to those for compressed music file formats.

* Audio sampling rate. The rate at which audio is captured by a digital device, measured in kilohertz (kHz) for the sample rate, and "bits" for the depth of resolution of each sample. In both cases, more is better, but the rate is standard for Audio CDs (44.1kHz, 16-bit) and DVD movies (48 or 96kHz, 16-bit). DivX and XviD files allow more flexibility, but it's generally set automatically when you choose the audio bit rate.