Homepage › Forums › Articles › Operating Systems › Linux › Linux Codecs
This topic was published by DevynCJohnson and viewed 1690 times since "". The last page revision was "".
- Topics - 437
All operating systems use codecs to allow users to view a video file or listen to an audio file. Linux has various codecs that it uses when multimedia are played on a Linux system. A codec is a piece of software that encodes and decodes a media file. This allows the video player (such as VLC) to display the media stream.
To better understand codecs, it may help to first learn some terms an concepts. A transcoding is the conversion of data from one encoding to another. Lossy compression is a type of data compression where some data (and quality) is lost. Lossless compression is compression that does not harm the data or quality. The pixelation seen in JPEG images is an example of lossy compression and a PNG is an example of lossless compression. An encoder converts data from one form to another. A multiplexer is a form of encoder that combines multiple inputs or streams of data. A decoder is the opposite of an encoder. This means data is decoded, thus getting the original data. A decompresser (or uncompressor) is an example of a decoder.
FFmpeg (https://www.ffmpeg.org/) is a collection of libraries and programs that provide over 100 codecs. The "ffmpeg" command is used to transcode (convert) various media formats, such as audio and video files. "ffserver" is a streaming server that supports HTTP and RTSP. FFmpeg supports many media formats and contains many other components.
Libav (https://libav.org/) is a fork of FFmpeg. Therefore, Libav is also a collection of software. Some Linux systems and software are switching from FFmpeg to Libav. "avconv" is a media converter. "avserver" is a streaming media server. "avplay" is a media player that uses SDL. Information on media streams can be read with "avprobe". The codecs are in the "libavcodec" library file. Libav has many other components including encrypters and decrypters (such as "rc4" and "aes"). Libav supports many file formats, codecs, and network protocols (for streaming).
LAME (http://lame.sourceforge.net/) is a popular lossy MP3 codec. LAME is cross-platform and licensed under the LGPL license.
"libvorbis" (http://www.xiph.org/downloads/) is a codec for the *.ogg and *.oga files.
"libspeex" (http://www.xiph.org/downloads/) contains codecs for VoIP, speech input, and podcasts. This is seen in *.spx files. However, "libopus" has succeeded libspeex. "libopus" has more and better capabilities than libspeex. Opus files use the *.opus file extension.
"libmpeg2" (http://libmpeg2.sourceforge.net/) is a codec library for decoding MPEG 1 and 2.
"libdvdcss" (http://www.videolan.org/developers/libdvdcss.html) is a library used to access encrypted DVDs. "libdvdcss" and "libdvdcss2" are two names for the same software.
"libdvdnav" is a library needed to navigate the menus commonly seen on various DVD movies.
"libdvdread" is a library that provides basic abilities needed for DVD movies.
"lsdvd" is a utility used to list the contents of a DVD. Although this is not a codec, many video players need this utility when the user wishes to view a DVD movie.
GStreamer (http://gstreamer.freedesktop.org/) is a multimedia framework. GStreamer is capable of using FFmpeg and/or Libav for codecs. This framework can be used to create applications that edit, play, and record video and audio. The "good" GStreamer plugins are high-quality and licensed under LGPL. The "bad" plugins are of low quality. The "ugly" plugins are proprietary.
xine-lib (http://www.xine-project.org/) is a multimedia library used to create media players. Such media players may use codecs such as FFmpeg, Libav, or others. "Xine-UI" is a video player that uses xine-lib. xine-lib can also act as an alternative to GStreamer.
The commands below may help provide missing codecs on RPM Linux systems (such as CentOS, Fedora, and RedHat).
yum localinstall --nogpgcheck http://download1.rpmfusion.org/free/fedora/rpmfusion-free-release-$(rpm -E %fedora).noarch.rpm http://download1.rpmfusion.org/nonfree/fedora/rpmfusion-nonfree-release-$(rpm -E %fedora).noarch.rpm rpm -Uvh http://rpm.livna.org/livna-release.rpm yum install mencoder libdvdnav gstreamer-plugins-bad gstreamer1-plugins-good-extras ffmpeg2theora gstreamer-plugins-bad-free-extras gstreamer1-libav gstreamer1-plugins-base lsdvd ffmpeg gstreamer1-plugins-bad-freeworld gstreamer-ffmpeg gstreamer1-plugins-ugly gstreamer1-plugins-base-tools gstreamer1 mplayer gstreamer-plugins-ugly libdvdcss gstreamer1-plugins-good libdvdcss2 libdvdread gstreamer1-plugins-bad-free gstreamer1-plugins-bad-free-extras gstreamer-plugins-bad-nonfree
On Ubuntu, running
apt-get install ubuntu-restricted-extraswith Root privileges can provide some proprietary codecs.
- List of Codecs - https://en.wikipedia.org/wiki/List_of_codecs
- Codecs (Arch Linux Wiki) - https://wiki.archlinux.org/index.php/codecs