Digital Video Articles, Tutorials, Guides & Q & A

Video Basics, video formats

Don’t Understand what a Video Codec Is? Types of Codecs Explained with Examples

What does a video codec do?

Basically, it takes a big video file and squeezes it into a smaller  file size while keeping the original quality as much as possible.

Let’s say you have a HD quality video captured in your video camera and want to share it online but don’t want to contend with a huge file size. You just want normal clarity and a smaller file size for easy uploading and you want the video to be streamed to those with slower internet connections.

What you would do is you would want to squeeze it down to a much smaller file size while still maintaining its quality as far as possible.

So a codec is concerned with producing video quality with small small file sizes.

Where to Find a Codec?

You find it through a video converter or a video editor. When do you use a video converter and when do you use a video editor?

If you don’t need to add or remove anything from the original video file, you could use a video converter. With a video converter, you input a file and then convert it with the codec you want in the output settings.

If you would like to trim your video, add titles or effects, you would want to put it through a video editing program.

After you’ve edited the video , you could choose one of the many export settings provided in the video editor.

Video Capture Device

There is another method which is not very popular where codecs come into play.

This happens when you transfer video from your camcorder to your computer via a video capture card. Here you could choose the compression you need via one of the many preset codecs with the software that controls the video capture device.

Without a codec 1 second of uncompressed would require a space of 20MB to store it. That means one minute of uncompressed digital video requires over 1GB of storage space.

Also hard disk drives can’t handle a data transfer speed of 20MB per second.

So a  DV codec is employed and in most camcorders it compresses the raw video to 3.6MB per second which most computers could handle.

Most capture cards encode in DV but you could choose MPEG-1 if  you want to burn your video to VCD or MPEG-2 if you want to create a DVD out of it.

Two Types of Codecs

There are two types of codecs you need to be aware of. Lossless codecs and lossy codecs.

Lossless Codec

A lossless codec takes a video source file and compresses it without any quality loss. The only thing that changes in the compression process is the file size which is reduced. For example you may have a video file size of 100MB and by using a lossless codec you can get the size reduced to say 50MB or 40MB depending on the codec you use.

How is this done? A lossless codec ignores redundant information and retains only data which contributes to the video quality. Information that is repeated are combined into a whole unit instead of leaving them as a separate units which would take up more space.

Lossy Codecs

Lossy codecs are used when video quality is not of paramount importance but file size is. For example if you need to attach a video file to an email or stream video you would want the smallest size possible to save on upload time and download time.

An example of video where you want to use a lossy codec is a talking head video. For example a lecture, where what’s being said is more important than the image quality.

Notable Difference

With a lossless compression you could decompress it to the original file before it was compressed.

With a lossy compression, with much information removed, you can use it to recover the original uncompressed file. So, you should make it a point to retain the original video file if you forsee using it for a different purpose.

Here are some codecs popularly used :

MPEG ( Moving Picture Experts Group)

MPEG-1 typically used for VCD.

MPEG-2 is a higher quality compression associated with DVD.

MP3 (MPEG-1 Layer 3) a  standard is which  popular for audio compression at  128kbits per second, approximately 1/11th the size of a similar audio CD file.

MPEG-4 has superior compression ability and one popular codec associated with it is the the H.264 codec which could be employed for Blu-ray.

H.264’s compression flexibility must be noted. It allows for compression at higher and lower bit rates and resolutions from mobile phone video right up to videos with  broadcast quality.

Windows Media Video by Microsoft emerged as an answer to RealVideo  when ut was the top choice for Internet video streaming.

In the WMV family you should take note of WMV9. The Microsoft camp claims that the WMV9 has better compression abililtyt than MPEG2 or even MPEG4.

This codec is popularly used when capturing video from a mini-DV camcorder into your computer.

DV25 captures video at 25Mbps (Megabits per second). On a PC it will be captured into an AVI and in a Mac into a MOV file, both of which are container formats.

Which Codec(s) to Choose?

There is no one right answer. You choose a codec based on your video production need? There are two considerations here. First is the video quality you need. If you are going to share video over the Internet or social media networks, you wouldn’t need a lossless codec and would go for the smallest file size to help speed up uploading and streaming time.

Try a few codecs that come with your video editing program or video converter and check their file sizes and quality.

You’ll soon get a hang of which codec to use for which video project.

Free Video Workshop