A codec is software that is used to compress or decompress a digital media file, such as a song or video.Â WindowsÂ Media Player and other programs use codecs to play and create digital media files.
A codec can consist of two components: an encoder and a decoder. The encoder performs the compression (encoding) function and the decoder performs the decompression (decoding) function. Some codecs include both of these components and some codecs only include one of them.
For example, when you rip a song from an audio CD to your computer, the Player uses theÂ WindowsÂ Media Audio codec by default to compress the song into a compact WMA file. When you play that WMA file (or any WMA file that might be streamed from a website), the Player uses theÂ WindowsÂ Media Audio codec to decompress the file so the music can be played through your speakers.