Sunday, April 10, 2016

BSA 105: Containers/Wrappers and Codecs (Lossy and Lossless)

What Is a Codec?
A codec is an encoding tool that processes video and stores it in a stream of bytes. Codecs shrinks the size of the audio or video file, and then decompress it when needed. There are dozens of different types of codecs, and each uses a different technology in order to encode and shrink your video file for the intended application.

Popular Codecs

1.XviD/DivX
DivX is a commercially sold codec, while XviD is the commercial cousin of DivX and it is an open source utility meant to function as an alternative. Both codecs can decode the output of the other, as they are both built on the implementation of MPEG-4. While still widely used, it is often strictly for video encoding and in conjunction with one of the more popular packs mentioned below.

2.MPEG-4

MPEG-4 is the most common streaming format and it consists of many parts, of which only MPEG-4 Part II is used for video coding. MPEG-4 Part II calls on video encoders such as DivX or XviD in order to encode the video, while audio is typically carried in MP3 format. Modern updates to MPEG-4 are now using H.264 as well.

3.H.264
H.264 can utilize both lossy and lossless compression depending on the settings you choose when encoding, such as frame rate, quality, and target file size. H.264 relies on x264 for encoded video (as well as others, such as DivX or XviD), and audio is often encoded using AAC or MP3 audio codecs depending on the size and quality you’re targeting. H.264 is touted as 1.5 to 2 times as efficient as basic MPEG-4 compression, which leads to smaller file sizes and seamless playback on more devices.

_______________________________________________________________________

What is a Container?
A container exists solely for the purpose of bundling all of the audio, video, and codec files into one organized package. Like a box where you put all your treasured stuff into. In addition, the container often contains chapter information for DVD or Blu-ray movies, metadata, subtitles, and/or additional audio files such as different spoken languages. These include Flash Vide (.flv, .swf), MKV and MP4 file formats.
_______________________________________________________________________

Lossy Compression
When looking for manageable file sizes, lossy compression is the most viable method available. It reduces the data size for physical storage but the downside is it will lose quality when expanded. These compression types include jpg, mp3, mp4 and H.264.

Lossless Compression
Lossless compression works much like a ZIP or RAR file in that after compressing and decompressing, the file is essentially the same. The file doesn’t lose much quality, but it’s not an efficient way to store large files because there isn’t much compression that actually takes place.

It’s also important to note that codecs aren’t just for compression of audio and video files. Once a file 
has been encoded using a specific codec, that same codec must be used to decode the file in order for it to play on your device. Not using the correct codec is what leads to the majority of device compatibility or playback issues. This issue is becoming less common as modern containers often include the required audio and video codecs needed to play the file.


Information gathered from : All You Need to Know about Video Codecs, Containers, and Compression

No comments:

Post a Comment