Definition of

Codec

Laptop and video camera

The name "codec" is an acronym for "encoder" and "decoder."

A codec is a device or computer file that enables the encoding and decoding of data . The term is not part of the dictionary of the Royal Spanish Academy ( RAE ), although it is included in various technological glossaries.

The name

A codec, in short, combines an encoder with a decoder : in fact, the notion of codec arises from the acronym of (co)coder and (dec)coder . Currently, codec is often referred to as the system that enables the encoding and decoding of audio and video files .

It is important to mention that the Urgent Spanish Foundation ( Fundéu BBVA ) indicates which codec should be written with an accent . Therefore, in our language , writing "codec" constitutes a spelling mistake. The plural of codec, on the other hand, is codecs .

Codec Features

These codecs convert digital data so that it is intelligible to a human being . Each type of multimedia file can work with numerous codecs, since these codes perform specific functions.

The codec can also be responsible for compressing the information . By making the multimedia file less heavy, it adapts it to different storage media, although it usually loses quality.

The intervention of the codec takes place when software or the operating system demands its action. If the user has the necessary codec installed on their computer, they do not notice this participation because the codec is responsible for converting the digital signal into a reproducible format.

In the case of video, the most popular codecs include MPEG-1 , MPEG-4 , RealVideo and Xvid . Regarding audio codecs, they can be named MP3 , WMA , Ogg and AAC .

FFmpeg

When talking about codecs, the name FFmpeg usually appears frequently, given its wide usefulness and compatibility. It is a set of free software (that is, its source code can be studied, modified and used without restrictions) that offers the possibility of recording, transcoding and performing live transmissions ( streaming ) of both audio and video. Although its development is carried out in GNU/Linux, it is possible to compile it in almost all current operating systems, Windows included.

One of the most interesting features of FFmpeg is that it can be used by people with varying degrees of knowledge: a user who needs it to run a program simply has to download and install an executable package , while an expert can purchase one. version possible to modify and recompile to fit your specific needs.

Broadly speaking, some of the components of this project are the following:

* ffmpeg - a tool for audio and video conversion ;

* ffserver - a live streaming server;

* ffplay - a media player;

* libavcodec – A codec library developed in the C language.

Some of the video codecs it contains are the following: MPEG-4, H.264, WMV, MJPEG, Theora, VP3 / VP5 / VP6 and WebM . Audio: Apple Lossless, AAC LC, FLAC, MP3, Vorbis, WavPack and WMA .

FFmpeg command line

A command to reduce the size of a video with FFmpeg

Using FFmpeg

As we mentioned above, codecs have various uses. With the FFmpeg set, we have at our disposal a series of tools that centralize all of them, adding great compatibility with the most popular programs of the moment.

One of the most common situations is having a video whose size is excessive , for example, for uploading to a server on the Internet. To do this, using the most appropriate codec (such as H264 or x264), we can reduce it without putting its quality at risk. This task, which at first may seem complex, FFmpeg offers us by simply writing a command line in our operating system, specifying data such as the file name, the desired bit rate and the chosen codec.