Codecs and containers - ArchWiki

# Codecs and containers

From ArchWiki
Jump to navigation Jump to search

Related articles

- Optical disc drive#Playback
- GStreamer
- ffmpeg

From Wikipedia, "a codec is a device or computer program capable of encoding and/or decoding a digital data stream or signal."

In general, codecs are utilized by multimedia applications to encode or decode audio or video streams. In order to play encoded streams, users must ensure an appropriate codec is installed.

This article deals only with codecs and application backends; see List of applications/Multimedia for a list of media players (MPlayer, mpv and VLC are popular choices).

## Requirements

Playing multimedia content requires two components:

- A capable media player
- The appropriate codec

It is not always necessary to explicitly install codecs if you have installed a media player. For example, MPlayer pulls in a large number of codecs as dependencies, and also has codecs built in.

## List of codecs

### Audio

See also Wikipedia:Comparison of audio coding formats.

#### Lossless audio codecs

- Apple Lossless (ALAC) — A lossless audio compression codec developed by Apple and deployed on all of its platforms and devices.

  https://alac.macosforge.org/ || alac-gitAUR

- FLAC — Free Lossless Audio Codec.

  https://xiph.org/flac/ || flac

- WavPack — Lossless audio compression format that also has a lossy hybrid mode.

  http://www.wavpack.com/ || wavpack

#### Lossy audio codecs

Codec | Encode | Decode
--- | --- | ---
AAC | #AAC
ATSC A/52 | aftenAUR | a52dec
CELT | celt
MPEG-1 |  |  | libmad
MP3 | lame
Musepack (MPC) | – 1 | libmpcdec
Opus | opus, opus-gitAUR
Vorbis | libvorbis
Speech codecs
AMR | opencore-amr
Speex | speex

1. mppenc is not packaged.

- CELT — Open, royalty-free lossy audio codec, optimized for low latency.

  http://www.celt-codec.org/ || celt

- LAME — MP3 encoder and graphical frame analyzer.

  http://lame.sourceforge.net/ || lame

- liba52 — Free library for decoding ATSC A/52 (Dolby Digital) streams (lossy).

  http://liba52.sourceforge.net/ || a52dec

- libdca — Free library for decoding DTS Coherent Acoustics streams.

  https://www.videolan.org/developers/libdca.html || libdca

- MAD — High-quality MPEG audio decoder.

  https://www.underbit.com/products/mad/ || libmad

- Musepack (MPC) — Open source lossy audio codec, designed for transparency.

  https://musepack.net/ || libmpcdec

- opencore-amr — Open source implementation of the Adaptive Multi Rate (AMR) speech codec.

  https://sourceforge.net/projects/opencore-amr/ || opencore-amr

- Opus — Open, royalty-free, lossy audio codec, designed for speech and general audio coding and low latency.

  https://www.opus-codec.org/ || opus, opus-gitAUR

- Speex — Patent-free, lossy audio compression format designed for speech.

  https://www.speex.org/ || speex

- Vorbis — Open, patent-free, lossy audio codec.

  https://xiph.org/vorbis/ || libvorbis

##### AAC

From Wikipedia:

  Advanced Audio Coding (AAC) is a proprietary audio coding standard for lossy digital audio compression. Designed to be the successor of the MP3 format, AAC generally achieves better sound quality than MP3 at the same bit rate.

- FAAC — Proprietary AAC audio encoder.

  https://www.audiocoding.com/faac.html || faac

- FAAD2 — ISO AAC audio decoder.

  http://www.audiocoding.com/faad2.html || faad2

- Fraunhofer FDK AAC — Complete, high-quality audio solution to Android (and Linux) users.

  http://www.iis.fraunhofer.de/en/bf/amm/implementierungen/fdkaaccodec.html || libfdk-aac

- Nero AAC — Nero AAC reference quality MPEG-4 and 3GPP audio codec. (deprecated)

  https://www.nero.com/ || neroaac-binAUR

### Image codecs

- JasPer — Software-based implementation of the codec specified in the emerging JPEG-2000 Part-1 standard.

  http://www.ece.uvic.ca/~frodo/jasper/ || jasper

- OpenJPEG — Open source JPEG 2000 codec.

  http://www.openjpeg.org/ || openjpeg

### Video codecs

This article or section needs expansion.

Reason: Add davs2AUR. (Discuss in Talk:Codecs and containers#)

See also Wikipedia:Comparison of video codecs.

Codec | Libraries
--- | ---
AV1 | aom, dav1d (decode), rav1e-gitAUR (encode)
Daala | daala-gitAUR
Dirac | schroedinger
DV | libdv
H.265 | x265, x265-hgAUR
libde265, libde265-gitAUR
H.264 | x264, x264-gitAUR
MPEG-1 | libmpeg2 (decode)
MPEG-2
MPEG-4 | Xvid (xvidcore)
Theora | libtheora
VP8, VP9 | libvpx, libvpx-gitAUR

- AV1 — AOMedia Video 1 (AV1) is successor codec to Google's VP9, Mozilla's Daala, Cisco's Thor. aom is the reference implementation of both encoding and decoding. dav1d is the performance focused decoder. rav1e is performance focused encoder.

  https://aomediacodec.github.io/av1-spec/ || aom

- Daala — New video compression technology. The effort is a collaboration between Mozilla Foundation, Xiph.Org Foundation and other contributors. The goal of the project is to provide a free to implement, use and distribute digital media format and reference implementation with technical performance superior to h.265.

  https://www.xiph.org/daala/ || daala-gitAUR

- libde265 — Open source implementation of the h.265 video codec.

  https://github.com/strukturag/libde265 || libde265, libde265-gitAUR

- libdv — The Quasar DV codec (libdv) is a software codec for DV video.

  http://libdv.sourceforge.net/ || libdv

- libmpeg2 — Library for decoding MPEG-1 and MPEG-2 video streams.

  http://libmpeg2.sourceforge.net/ || libmpeg2

- Schrödinger — Advanced royalty-free video compression format designed for a wide range of uses, from delivering low-resolution web content to broadcasting HD and beyond, to near-lossless studio editing.

  http://diracvideo.org/ || schroedinger

- Theora — Open video codec developed by the Xiph.org.

  https://www.theora.org/ || libtheora

- VP9 — High-quality, open video format for the web that's freely available to everyone. Improved version of earlier VP8 codec.

  https://www.webmproject.org || libvpx, libvpx-gitAUR

- x264 — Free library for encoding H264/AVC video streams.

  https://www.videolan.org/developers/x264.html || x264, x264-gitAUR

- x265 — Open-source project and free application library for encoding video streams into the H.265/High Efficiency Video Coding (HEVC) format.

  http://x265.org/ || x265 x265-hgAUR

- Xvid — Open source MPEG-4 video codec.

  https://www.xvid.org/ || xvidcore

## Container format tools

See also Wikipedia:Comparison of video container formats.

- MKVToolNix — Set of tools to create, edit and inspect Matroska files.

  https://mkvtoolnix.download/ || mkvtoolnix-cli, mkvtoolnix-gui

- OGMtools — Information, extraction or creation for OGG media streams.

  http://www.bunkus.org/videotools/ogmtools || ogmtools

## Backends

### GStreamer

From http://www.gstreamer.net/:

  GStreamer is a library for constructing graphs of media-handling components. The applications it supports range from simple Ogg/Vorbis playback, audio/video streaming to complex audio (mixing) and video (non-linear editing) processing.

Simply, GStreamer is a backend or framework utilized by many media applications. See GStreamer article.

### xine

From http://www.xine-project.org/about:

  xine is a free (gpl-licensed) high-performance, portable and reusable multimedia playback engine. xine itself is a shared library with an easy to use, yet powerful API which is used by many applications for smooth video playback and video processing purposes.

As an alternative to GStreamer, many media players can be configured to utilize the xine backend provided by xine-lib.

Note that the xine project itself provides a capable video player, xine-ui.

### libavcodec

libavcodec is part of the FFmpeg project. It includes a large number of video and audio codecs. The libavcodec codecs are included with media players such as MPlayer and VLC, so you may not need to install the ffmpeg package itself.

## Tips and tricks

### Install MPlayer binary codecs

This article or section is a candidate for moving to MPlayer.

Notes: Belongs there. (Discuss in Talk:Codecs and containers#)

As an ultimate solution, you can try to install MPlayer binary codecs.

If you are not able to play some files go to http://www.mplayerhq.hu/design7/dload.html, read the instructions and install the codec you need to play your files.

They can also be found in the codecsAUR and codecs64AUR packages.

### No H264, mpg4 or Musepack (.mpc) in Totem Player

If you see the "The H264 plugin is missing" warning with Totem media player, install gst-libav.

Category:

- Multimedia

Hidden categories:

- Pages or sections flagged with Template:Expansion
- Pages or sections flagged with Template:Move