Difference between revisions of "Codecs"

From ArchWiki
Jump to: navigation, search
(rm expansion, it could use some more additions but it's a pretty good article now)
(Image codecs: add OpenJPEG)
 
(45 intermediate revisions by 18 users not shown)
Line 1: Line 1:
[[Category:Audio/Video]]
+
[[Category:Multimedia]]
 
[[cs:Codecs]]
 
[[cs:Codecs]]
 +
[[de:Codecs]]
 
[[el:Codecs]]
 
[[el:Codecs]]
 
[[es:Codecs]]
 
[[es:Codecs]]
 
[[fr:Codecs]]
 
[[fr:Codecs]]
 
[[it:Codecs]]
 
[[it:Codecs]]
[[ja:Codecs]]
+
[[ja:コーデック]]
 
[[ru:Codecs]]
 
[[ru:Codecs]]
[[tr:Kod_çözücüler]]
+
[[zh-hans:Codecs]]
[[zh-CN:Codecs]]
+
{{Related articles start}}
{{Article summary start}}
+
{{Related|Optical disc drive#Playback}}
{{Article summary text|An overview of codec packages available for Arch Linux.}}
+
{{Related|GStreamer}}
{{Article summary heading|Related}}
+
{{Related|MPlayer}}
{{Article summary wiki|DVD Playing}}
+
{{Related|VLC media player}}
{{Article summary wiki|GStreamer}}
+
{{Related articles end}}
{{Article summary wiki|MPlayer}}
+
From [[Wikipedia:Codec|Wikipedia]], "a codec is a device or computer program capable of encoding and/or decoding a digital data stream or signal."
{{Article summary wiki|VLC media player}}
 
{{Article summary end}}
 
 
 
From [[Wikipedia:Codec|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.
 
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 [[Common Applications#Multimedia|Common Applications]] for a list of media players ([[MPlayer]] and [[VLC media player|VLC]] are popular choices).
+
This article deals only with codecs and application backends; see [[List of applications#Multimedia|List of Applications]] for a list of media players ([[MPlayer]], [[mpv]] and [[VLC]] are popular choices).
  
==Requirements==
+
== Requirements ==
  
 
Playing multimedia content requires two components:
 
Playing multimedia content requires two components:
Line 35: Line 30:
 
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.
 
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.
  
==Common codecs==
+
== List of codecs ==
 +
 
 +
=== Audio codecs ===
 +
 
 +
* {{App|[[Wikipedia:CELT|CELT]]|Open, royalty-free lossy audio codec, optimized for low latency.|http://www.celt-codec.org/|{{Pkg|celt}}}}
 +
* {{App|[[Wikipedia:LAME|LAME]]|MP3 encoder and graphical frame analyzer.|http://lame.sourceforge.net/|{{Pkg|lame}}}}
 +
* {{App|liba52|Free library for decoding [[Wikipedia:ATSC A/52|ATSC A/52]] (Dolby Digital) streams (lossy).|http://liba52.sourceforge.net/|{{Pkg|a52dec}}}}
 +
* {{App|[[Wikipedia:libdca|libdca]]|Free library for decoding DTS Coherent Acoustics streams.|https://www.videolan.org/developers/libdca.html|{{Pkg|libdca}}}}
 +
* {{App|[[Wikipedia:libmad|MAD]]|High-quality MPEG audio decoder.|http://www.underbit.com/products/mad/|{{Pkg|libmad}}}}
 +
* {{App|[[Wikipedia:Musepack|Musepack]] (MPC)|Open source lossy audio codec, designed for [[Wikipedia:Transparency (data compression)|transparency]].|http://musepack.net/|{{Pkg|libmpcdec}}}}
 +
* {{App|[[Wikipedia:Adaptive Multi-Rate audio codec|opencore-amr]]|Open source implementation of the Adaptive Multi Rate (AMR) speech codec.|http://sourceforge.net/projects/opencore-amr/|{{Pkg|opencore-amr}}}}
 +
* {{App|[[Wikipedia:Opus (audio codec)|Opus]]|Open, royalty-free, lossy audio codec, designed for speech and general audio coding and low latency.|http://www.opus-codec.org/|{{Pkg|opus}} {{AUR|opus-git}}}}
 +
* {{App|[[Wikipedia:Speex|Speex]]|Patent-free, lossy audio compression format designed for speech.|http://www.speex.org/|{{Pkg|speex}}}}
 +
* {{App|[[Wikipedia:Vorbis|Vorbis]]|Open, patent-free, lossy audio codec.|http://www.vorbis.com/|{{Pkg|libvorbis}}}}
 +
 
 +
==== AAC ====
 +
 
 +
From [[Wikipedia:Advanced Audio Coding|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.
 +
 
 +
* {{App|[[Wikipedia:FAAC|FAAC]]|Proprietary AAC audio encoder.|http://www.audiocoding.com/faac.html|{{Pkg|faac}}}}
 +
* {{App|[[Wikipedia:FAAD2|FAAD2]]|ISO AAC audio decoder.|http://www.audiocoding.com/faad2.html|{{Pkg|faad2}}}}
 +
* {{App|[[Wikipedia: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|{{Pkg|libfdk-aac}}}}
 +
* {{App|[[Wikipedia:Advanced Audio Coding|Nero AAC]]|AAC audio codec (decode/encode/tag) all-in-one.|http://www.nero.com/eng/company/about-nero/nero-aac-codec.php|{{AUR|neroaac}}}}
 +
 
 +
==== Lossless ====
  
* {{pkg|a52dec}}: liba52 is a free library for decoding ATSC A/52 streams
+
* {{App|[[Wikipedia:Apple Lossless|Apple Lossless]] (ALAC)|A lossless audio compression codec developed by Apple and deployed on all of its platforms and devices.|https://alac.macosforge.org/|{{AUR|alac-git}}}}
* {{pkg|faac}}: FAAC is an AAC audio encoder
+
* {{App|[[Wikipedia:FLAC|FLAC]]|Free Lossless Audio Codec.|https://xiph.org/flac/|{{Pkg|flac}}}}
* {{pkg|faad2}}: ISO AAC audio decoder
+
* {{App|[[Wikipedia:WavPack|WavPack]]|Audio compression format with lossless, lossy, and hybrid compression modes.|http://www.wavpack.com/|{{Pkg|wavpack}}}}
* {{pkg|flac}}: Free Lossless Audio Codec
 
* {{pkg|jasper}}: A software-based implementation of the codec specified in the emerging JPEG-2000 Part-1 standard
 
* {{pkg|lame}}: An MP3 encoder and graphical frame analyzer
 
* {{pkg|libdca}}: Free library for decoding DTS Coherent Acoustics streams
 
* {{pkg|libdv}}: The Quasar DV codec (libdv) is a software codec for DV video
 
* {{pkg|libmad}}: A high-quality MPEG audio decoder
 
* {{pkg|libmpeg2}}: libmpeg2 is a library for decoding MPEG-1 and MPEG-2 video streams
 
* {{pkg|libtheora}}: An open video codec developed by the Xiph.org
 
* {{pkg|libvorbis}}: Vorbis codec library
 
* {{pkg|libxv}}: X11 Video extension library
 
* {{pkg|wavpack}}: Audio compression format with lossless, lossy, and hybrid compression modes
 
* {{pkg|x264}}: Free library for encoding H264/AVC video streams
 
* {{pkg|xvidcore}}: XviD is an open source MPEG-4 video codec
 
  
==Backends==
+
=== Image codecs ===
  
===GStreamer===
+
* {{App|[[Wikipedia:JasPer|JasPer]]|Software-based implementation of the codec specified in the emerging JPEG-2000 Part-1 standard.|http://www.ece.uvic.ca/~frodo/jasper/|}}{{Pkg|jasper}}
 +
* {{App|[[Wikipedia:OpenJPEG|OpenJPEG]]|Open source JPEG 2000 codec.|http://www.openjpeg.org/|{{Pkg|openjpeg}}}}
  
From http://www.gstreamer.net/:
+
=== Video codecs ===
  
:''[[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.''
+
* {{App|[[Wikipedia:Daala|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/|{{AUR|daala-git}}}}
 +
* {{App|libde265|Open source implementation of the h.265 video codec.|https://github.com/strukturag/libde265|{{AUR|libde265}} {{AUR|libde265-git}}}}
 +
* {{App|[[Wikipedia:DV|libdv]]|The Quasar DV codec (libdv) is a software codec for DV video.|http://libdv.sourceforge.net/|{{Pkg|libdv}}}}
 +
* {{App|[[Wikipedia:libmpeg2|libmpeg2]]|Library for decoding MPEG-1 and MPEG-2 video streams.|http://libmpeg2.sourceforge.net/|{{Pkg|libmpeg2}}}}
 +
* {{App|[[Wikipedia:Dirac (video compression format)|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/|{{Pkg|schroedinger}}}}
 +
* {{App|[[Wikipedia:Theora|Theora]]|Open video codec developed by the Xiph.org.|http://www.theora.org/|{{Pkg|libtheora}}}}
 +
* {{App|[[Wikipedia:VP8|VP8]]|High-quality, open video format for the web that's freely available to everyone.|http://www.webmproject.org|{{Pkg|libvpx}} {{AUR|libvpx-git}}}}
 +
* {{App|[[Wikipedia:x264|x264]]|Free library for encoding H264/AVC video streams.|https://www.videolan.org/developers/x264.html|{{Pkg|x264}} {{AUR|x264-git}}}}
 +
* {{App|[[Wikipedia:x265|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/|{{Pkg|x265}} {{AUR|x265-hg}}}}
 +
* {{App|[[Wikipedia:Xvid|Xvid]]|Open source MPEG-4 video codec.|http://www.xvid.org/|{{Pkg|xvidcore}}}}
  
Simply, GStreamer is a ''backend'' or ''framework'' utilized by many media players.
+
== Backends ==
  
GStreamer uses a plugin architecture which makes the most of GStreamer's functionality implemented as shared libraries. Since version 0.10 the plugins come grouped into three sets (named after the film The Good, the Bad and the Ugly).[http://en.wikipedia.org/wiki/GStreamer]
+
=== GStreamer ===
  
* {{Pkg|gstreamer0.10-base-plugins}}
+
From http://www.gstreamer.net/:
* {{Pkg|gstreamer0.10-good-plugins}}
 
* {{Pkg|gstreamer0.10-bad-plugins}}
 
* {{Pkg|gstreamer0.10-ugly-plugins}}
 
* {{Pkg|gstreamer0.10-ffmpeg}}
 
  
For the most complete solution:
+
:GStreamer is a library for constructing graphs of media-handling components. The applications supports range from simple Ogg/Vorbis playback, audio/video streaming to complex audio (mixing) and video (non-linear editing) processing.
  
# pacman -S gstreamer0.10-plugins
+
Simply, GStreamer is a ''backend'' or ''framework'' utilized by many media applications. See [[GStreamer]] article.
  
===xine===
+
=== xine ===
  
 
From http://www.xine-project.org/about:
 
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.''
+
: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:
+
As an alternative to GStreamer, many media players can be configured to utilize the xine backend provided by {{Pkg|xine-lib}}.
  
# pacman -S xine-lib
+
Note that the xine project itself provides a capable video player, {{Pkg|xine-ui}}.
  
Note that the xine project itself provides a capable video player, {{pkg|xine-ui}}.
+
=== libavcodec ===
  
===libavcodec===
+
[[FFmpeg|libavcodec]] is part of the [http://ffmpeg.org/ 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 {{Pkg|ffmpeg}} package itself.
  
libavcodec is part of the [http://ffmpeg.org/ 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 {{Pkg|ffmpeg}} package itself.
+
== Tips and tricks ==
  
==Tips and tricks==
+
=== Install MPlayer binary codecs ===
 
 
===Install MPlayer binary codecs===
 
  
 
As an ultimate solution, you can try to install MPlayer binary codecs.
 
As an ultimate solution, you can try to install MPlayer binary codecs.
Line 100: Line 112:
 
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.
 
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 AUR with the name {{AUR|codecs}}.
+
They can also be found in the {{AUR|codecs}} and {{AUR|codecs64}} packages.
 +
 
 +
=== No H264, mpg4 or Musepack (.mpc) in Totem Player ===
 +
 
 +
If you see the "The H264 plugin is missing" warning with Totem media player, just install the Gstreamer libav library to fix it install {{Pkg|gst-libav}}.

Latest revision as of 06:19, 18 June 2018

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 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 codecs

  • 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.
http://www.underbit.com/products/mad/ || libmad
http://musepack.net/ || libmpcdec
  • opencore-amr — Open source implementation of the Adaptive Multi Rate (AMR) speech codec.
http://sourceforge.net/projects/opencore-amr/ || opencore-amr
  • Opus — Open, royalty-free, lossy audio codec, designed for speech and general audio coding and low latency.
http://www.opus-codec.org/ || opus opus-gitAUR
  • Speex — Patent-free, lossy audio compression format designed for speech.
http://www.speex.org/ || speex
  • Vorbis — Open, patent-free, lossy audio codec.
http://www.vorbis.com/ || 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.
http://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 — AAC audio codec (decode/encode/tag) all-in-one.
http://www.nero.com/eng/company/about-nero/nero-aac-codec.php || neroaacAUR

Lossless

  • 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 — Audio compression format with lossless, lossy, and hybrid compression modes.
http://www.wavpack.com/ || wavpack

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

  • 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 || libde265AUR 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.
http://www.theora.org/ || libtheora
  • VP8 — High-quality, open video format for the web that's freely available to everyone.
http://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.
http://www.xvid.org/ || xvidcore

Backends

GStreamer

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

GStreamer is a library for constructing graphs of media-handling components. The applications 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

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, just install the Gstreamer libav library to fix it install gst-libav.