Tuesday, February 27, 2007

Advanced Encoding Techniques with Windows Media 9 Series

Advanced Encoding Techniques with Windows Media 9 Series

Introduction:
Working with digital media is an art, not a science, so be prepared to practice, test, and tweak to achieve the highest quality. This document provides tips that you can follow to ensure that you start with the best-quality content possible before you begin encoding. It also provides information about techniques that you can apply in the encoding session to ensure that you end up with high-quality encoded content.

Capturing Quality Content:
This section outlines topics to keep in mind as you prepare to capture your audio and video content.
The following points are explained in detail throughout the rest of the section:
Capturing to an AVI File. For the best quality, avoid combining the capturing and encoding processes. Instead, capture to an AVI file first, and then encode.Comparing Audio and Video Sources. Keep in mind that some audio and video sources are better than others. For the best quality, capture SDI video and digital audio. Setting Proper Audio and Video Levels. Set your video and audio levels properly before you start capturing. Optimizing Your Computer. Check that your computer is optimized.
Capturing to Optimal Pixel Formats. Capture to a YUY2 pixel format to avoid color conversions during encoding. Capturing Optimal Resolutions. Capture video at either a resolution of 320×480 or 640×480.

Capturing to an AVI File:
To ensure the highest-quality results, it is recommended that you capture to an AVI file before encoding. Doing so has the following advantages:
*. Removes any issues related to the processor falling behind the capture process, and enables the encoder to optimize all calculations.
*. Enables the use of editing programs to perform steps such as trimming the start and end times of the file, or doing color correction.
*. Simplifies batch encoding when you source from an AVI file.

Comparing Audio and Video Sources:
It is important to start with the best-quality source. This section lists possible sources, in the order from best to worst:
Serial digital interface (SDI) video. Used for digital video cameras and camcorders. Because the content stays in a digital format throughout the capturing and encoding processes, this results in the least amount of data translations, and results in the best-quality video.
Component video. Used when sourcing from DVDs. With this source, the video signals are separated, for example, into the RGB or Y/R-y/B-y format. Results in good-quality video.
S-Video. Used for S-VHS, DVD, or Hi-8 camcorders. The video signal is divided into luminance and chrominance. Results in good-quality video.
DV video. Used with DV devices, such as MiniDV digital camcorders connected through an IEEE 1394 video port. Results in good-quality video.
Composite video. Used for analog cameras, camcorders, cable TV, and VCRs. Composite video should only be used as a source as a last resort. With composite video, luminance and chrominance components are mixed, which makes it difficult to get good-quality video.
Audio. If possible, capture digital audio. If you must capture audio from an analog source, balanced audio connections are better than RCA.

Setting Proper Audio and Video Levels:
To set audio and video levels properly:
*. Adjust your video monitor using SMPTE color bars, and then adjust your computer monitor to match, using a high-resolution bitmap of the SMPTE bars.
*. Adjust your video capture card levels (hue, saturation, and brightness), so that the picture matches the video monitor.
*. Check and normalize all audio levels in your system. Use a professional-grade audio card, such as the Echo Layla24 or the M-Audio Delta Series.
*. If possible, use a digital waveform monitor.

Optimizing Your Computer:
Before you start capturing, optimize your computer using the following steps:
1. Defragment your hard disk.
2. Turn off network and file sharing.
3. Close all other programs, especially if a program accesses the hard disk.
4. Monitor system resources, making sure that the computer is sufficiently powerful to keep pace with the data feed.
5. During the capture, watch for frame dropping. It should be possible to capture an entire movie with no dropped frames.
6. Watch for direct memory access (DMA) buffer conflicts between the capture card and the SCSI card, which can result in frame dropping. This is less likely to occur now than in the past. If conflicts occur, one solution is to use a dual PCI bus motherboard configuration, in which the capture card and the SCSI card are on different buses.

Capturing to Optimal Pixel Formats:
It is recommended that you capture to a YUY2 (4:2:2) pixel format, which enables you to avoid pixel format conversions during encoding. The Windows Media Video 9 Series codec is primarily a 4:2:0 pixel format, except that if you choose to maintain the interlacing in your content (a new feature with Windows Media Encoder 9 Series), then a 4:1:1 pixel format is used. Because the YUY2 format is a superset of both 4:2:0 and 4:1:1 pixel formats, the content can be converted to either format without any data loss.An important note is that if you capture to a 4:2:0 AVI file (for example I420, YV12, or IYUV), you will not be able to maintain the interlacing in your source video.Older capture devices may create AVI files that do not fully conform to published specifications, resulting in upside-down video with the YUY2 pixel format. To prevent this, you can either set the driver on your capture device to use a different pixel format, or you can "flip" the image if your driver provides such a feature. Finally, there is also an option to flip the video in the encoder.

Capturing Optimal Resolutions:
If you capture 320×240 to an AVI file, the capture card throws away one of the fields, which effectively deinterlaces the video. If your target audience plays the video at 320×240, this usually produces acceptable results. However, to ensure the highest quality, you should capture both fields, so that you can use Microsoft Windows Media Encoder to deinterlace the video or apply the inverse telecine feature. Deinterlacing and inverse telecine require both fields of a frame to be present in order to function properly. For this reason, it is recommended that you capture either at 320×480 or 640×480. After deinterlacing or the inverse telecine filter is applied in the encoder, output video encoded at 320x240 will have higher quality.

No comments: