codecs001007.jpg
codecs001006.jpg codecs001005.jpg codecs001004.jpg codecs001001.jpg codecs001002.jpg codecs001003.jpg
Greetings!
I warmly welcome you to VideoLifestyle's Practical Technology Section.
The Practical Technology Section will feature all sorts of technology related to video and we ensure the information is kept pure & simple for both you and me.Do look out for upcoming topics covering Myths and Truths of Video, Video Resolution, Editing Softwares, Recording Formats, Compression Formats etc. In this article my focus is on the video codec and what it means. Hope you enjoy reading it.

C.O.D.E.C.S (an article written by Alvin Ang Aka Supashooter & Derek Yeo Aka VideoCobra October 2005)

What does codec mean? When can you use it? Which is the better one?
These are the 3 most asked questions when a user comes to this stage regarding video.
1) Lossy / The more a media file is compressed in file size, resolution also suffers. The Resolution will continue to drop as many times as the file is re-encoded or rendered.
2) Lossless / This means that no matter how much a file is compressed, the resolution and image quality will always remain the same as the original media file.
Typically, the quality of video is judged by the amount of bit rate, resolution and amount of artifacts / pixels, color representation and frame rate.
The more common codecs are installed on your system via the mainstream media players such as Windows Media Player and Quicktime.
Codecs are used in the following circumstances:

1) Playing media files
2) Capturing media files
3) Encoding/ Rendering media files

For example: DV-AVI for video, MPEG audio layer-3 (MP3) for audio

Therefore, if your computer cannot playback a specific media file, it may mean that you do not have the necessary codec that is required to support the video/audio stream.
Generally, I shall summarise what are codecs...

Codec stands for: ※Compressor - Decompressor§ or ※Coder-Decoder§
Codecs are what your computer uses to play back both audio & video files. They are also instrumental in determining the format of your captured video file and final edited video.
Codecs enable the use of digital compression for media files.
In practice, there are 2 main types of digital compression.
Therefore, in short :
Lossy Compression is also known as Intraframe/Spatial Compression = Reducing Spatial Redundancy = Using Image Compression techniques

Lossless Compression is also known as Interframe/Temporal Compression = Reducing Temporal Redunancy = Using Motion Compensation techniques.

When do I need to compress/ encode my videos?
Simply, you are already using digital compression for your videos when you are doing the following:

Capturing Video
Editing Video and Rendering Video
Burning your Video on a DVD / VCD
Converting a DVD to a VCD
Changing the file type of a video (Eg. from a .avi to .mov)
Using Codecs to your advantage

When converting video files, you will definitely be faced with the question of ※Which Codec to use?§

Typically, you need to have an understanding of where your source video/ original video file is coming from and what types of codecs they use. Here are some typical scenarios:

Capturing footage from a DV Tape:
Most video editing platforms will allow you to capture footage from DV tapes using a plethora of video codecs. The default however will usually be DV- AVI. This codec is high in quality and is usually the optimum resolution for television and DVD.

Extracting media files from a DVD camcorder or DVD:
Most DVD camcorders and DVDs will have the video and audio files in either .VOB or MPEG-2 formats. These are often good in resolution but are compressed files and are only good for playback but not good for non-linear editing at all. Usually, these are the file types you will get after rendering your video to a DVD.

Media files from digital still cameras:

Technology has enabled digital still cameras and some brands of mobile phones to shoot small sized video files. However, these forms of video files exist as MPEG-4 video clips. MPEG-4 is a heavily compressed file format. Image quality and resolution comes in various sizes, ranging from 640x480 to 160x120. These files are most optimized for email and PC playback.
The output process:

Firstly you need to decide on what form of video you will ultimately be rendering.
Usually these are the most common scenarios:
Rendering video for :
1) DVD
2) VCD
3) Internet/ Email

Codec knowledge:

Secondly, you will need to know what sort of codecs to use, listed below are the more common codecs you will find on your system.
AVI (optimized for non-linear editing)
Uncompressed AVI 每 has the largest file size as it is not compressed at all
DV-AVI 每 the default most optimized for video output to television and DVD. Do take note that certain video software and hardware will have their own extension of the DV- AVI format. For example, Matrox-AVI, for the Matrox line of hardware video-processing cards or Pinnacle-AVI, for Pinnacle*s range of video editing software & hardware.
Cinepak 每 an older codec developed by Quicktime
Intel Indeo Video 每 There are many versions to this format depending on the software your system uses.
DivX 每 a third party popular format among many users as this codec delivers high quality image resolutions but has a small file size

MOV (optimized for non-linear editing)
None (Meaning uncompressed) 每 Similar to uncompressed AVI and has no compression, thus having the largest file size.

DV- AVI 每 Similar to the AVI codec, but uses Apple*s .mov extension for the movie file instead
Sorenson 3 每 A codec used by Apple*s Quicktime format. It is derived from the H.264 codec and produces superb image quality whilst maintaining a smaller file size. Most online movie trailers and short video clips are rendered using this codec.
MPEG (not optimized for non-linear editing)

MPEG-1 每 This is the quality that is mostly used for encoding VCDs, usually 352 x 288 (PAL) or 320 x 240 (NTSC) in resolution. However do remember that the bitrate for VCD is strictly compliant to 1,150 kbps.
MPEG-2 每 The quality of video is much better, mostly used for DVDs. Usually 720 x 576 (PAL) 720x 480 (NTSC) in resolution.
MPEG-4 每 This format allows rendering of a wide range of resolution sizes and image quality. In most cases, the editing/ rendering software will allow you to choose the size & resolution of your output file. This format of MPEG is best used for email and internet usage.

WMV / Windows Media Video (not optimized for non-linear editing)

WMV 9 每 an earlier version of Microsoft*s codec packs.

WMV 10 每 the current version of the WMV format of video compression, this allows you to render/ encode videos from a wide range of resolutions and delivers good image quality. This codec is mostly used for web/online videos and movie trailers.

HD WMV 每 the latest form of video compression, HD WMV is able to compress HDV data rates and resolution (usually 1440 x 1080i) to deliver high definition quality video for viewing.

RealVideo (.RM) (not optimized for non-linear editing)
RealVideo offers good compression formats in the .rm extension but since the development of MPEG-4, DivX and Quicktime formats, users are slowly switching their preferences for good compressed video towards the latter.
Customising your codecs
Some codecs allow the following to be customized:

1) Quality 每 Usually you can set from a range of specific values, for example (Lowest, Low, Medium, High, Highest, Excellent) or (1 每 10).
2) Color 每 You will usually see values such as Millions of colors +, Millions of colors, Thousands of colors, Color or greyscale. Millions of colors would definitely be the best choice as it provides the largest spectrum of colors to the rendered video. The + at the end of the ※Millions of colors§ option signifies an additional alpha channel to the rendered video.
3) Resolution 每 Sizes such as (720 x 576) (320 x 240), (160 x 120) will be displayed, selecting an option would determine the size of your rendered video.
4) Frames per sec 每 You can also set the amount of frames per second to a rendered video when presented with this option. PAL is 25 frames per second and NTSC is 29.97 frames per second or approximately 30 frames per second. For web video, you may want to select 10 每 15 frames if you don*t want to leave your video at the PAL/NTSC frames speed.

5) Data Rate 每 Digital video quality is also dependent on the amount of data rate, the higher the data rate, the better quality your rendered video will have. DVD quality utilizes a range of 5 每 8 mbps (megabytes per second). You can set your video to have either a constant data rate (same amount of data rate throughout) or a variable data rate (the computer will calculate the amounts of data rate automatically and will change progressively as the video is rendered).
Let us now go through some of the types of codecs you will most probably be using for various situations:

1) Capturing/ Editing Video:
AVI (Uncompressed AVI and/or DV-AVI)
MOV (None and/or DV-AVI)
2) Burning a DVD: Typically (PAL 720 x 576 / NTSC 720 x 480)MPEG-2
3) Burning a VCD: Typically (320 X 240)MPEG-1
4) Rendering a video file for playback on the computer (high quality compressed)
HD WMV
MPEG-4
DivX
WMV 10 (set for high resolution)
Sorenson 3 (set for high resolution)
5) Rendering a video file for playback on the computer
(low quality compressed, web/internet usage)
WMV 9 and/or 10 (set for low resolution)
Sorenson 3 (set for low resolution)
MPEG-4

Conclusion

At this stage, you will have already gone through what are codecs, why and how codecs are used, what codecs to use when working with video. However, there*s a vast number of types of codecs in the digital video arena today, not to mention the fast speedy improvements of each working codec that we are using now, therefore knowledge of how codecs work would be crucial when selecting one to work with your video. (Check if a codec is lossy or lossless, plus the available resolutions you will get and the amount of customization required for best/ most effective quality) I am sure after reading through this, you will no longer be unsure of which codec would work best and most effectively for each situation. Sure beats all the experimenting and rendering the same video file over and over again.



a videolifestyle.com article '2007'