Codecs and containers

来自 Arch Linux 中文维基

自维基百科Wikipedia, "编解码器(英语:codec)指的是一个能够对一个信号或者一个数据流进行编解码操作的设备或者程序。."


这篇文章只关于编解码器及程式后端;见List of applications/Multimedia 以列举音视频播放器的选择如(MPlayer, mpvVLC)

Requirements[编辑 | 编辑源代码]


  • 一个播放器
  • 一个编解码器

并非永远需求安装编解码器如果你安装了一个媒体播放器.例如, MPlayer 提供了一个天文数字般的编解码器用于依赖并内建。

List of codecs[编辑 | 编辑源代码]

Audio[编辑 | 编辑源代码]

Wikipedia:Comparison of audio coding formats.

Lossless audio codecs[编辑 | 编辑源代码]

  • Apple Lossless (ALAC) — 由苹果公司开发的无损音频压缩编解码器,部署在其所有的平台和设备上。 || alac-gitAUR
  • FLAC — 自由的音频编解码器 || flac || wavpack

Lossy audio codecs[编辑 | 编辑源代码]

Format Encode Decode
ATSC A/52 aftenAUR a52dec
MPEG-1   libmad
MP3 lame
Musepack (MPC) 1 libmpcdec
Opus opus
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. || celtAUR
  • LAME — MP3 encoder and graphical frame analyzer. || lame
  • liba52 — Free library for decoding ATSC A/52 (Dolby Digital) streams (lossy). || a52dec
  • libdca — Free library for decoding DTS Coherent Acoustics streams. || libdca
  • MAD — High-quality MPEG audio decoder. || libmad || libmpcdec
  • opencore-amr — Open source implementation of the Adaptive Multi Rate (AMR) speech codec. || opencore-amr
  • Opus — Open, royalty-free, lossy audio codec, designed for speech and general audio coding and low latency. || opus
  • Speex — Patent-free, lossy audio compression format designed for speech. || speex
  • Vorbis — Open, patent-free, lossy audio codec. || 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. || faac
  • FAAD2 — ISO AAC audio decoder. || faad2
  • Fraunhofer FDK AAC — OpenCORE Framework implementation Advanced Audio Coding (AAC) encoder. Modified library of Fraunhofer AAC decoder and encoder. || libfdk-aac (codec library) fdkaac (CLI frontend for libfdk-aac)
  • Nero AAC — Nero AAC reference quality MPEG-4 and 3GPP audio codec. (deprecated) || neroaac-binAUR

Image codecs[编辑 | 编辑源代码]

  • JasPer — Software-based implementation of the codec specified in the emerging JPEG-2000 Part-1 standard. || jasper
  • OpenJPEG — Open source JPEG 2000 codec. || openjpegAUR
  • WebP — An image format employing both lossy and lossless compression. It is currently developed by Google. || libwebp || libavif || libheif

Video codecs[编辑 | 编辑源代码]

See also Wikipedia:Comparison of video codecs.

Format Codec Libraries
AV1 aom, dav1d (decode), rav1e (encode), svt-av1
AVS2 davs2AUR (decode)
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-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. Most benchmark show better performances with svt-av1 than rav1e. || aom, dav1d, rav1e, svt-av1
  • Daala — Research video codec under development by the Xiph.Org Foundation and sponsored by the Mozilla Foundation. 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. || daala-gitAUR
  • libde265 — Open source implementation of the h.265 video codec. || libde265
  • libdv — The Quasar DV codec (libdv) is a software codec for DV video. || libdv
  • libmpeg2 — Library for decoding MPEG-1 and MPEG-2 video streams. || 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. || schroedinger
  • Theora — Open video codec developed by the || libtheora
  • VP9 — High-quality, open video format for the web that's freely available to everyone. Improved version of earlier VP8 codec. || libvpx
  • x264 — Free library for encoding H264/AVC video streams. || x264
  • x265 — Open-source project and free application library for encoding video streams into the H.265/High Efficiency Video Coding (HEVC) format. || x265
  • Xvid — Open source MPEG-4 video codec. || xvidcore

Container format tools[编辑 | 编辑源代码]

See also Wikipedia:Comparison of video container formats.

  • MKVToolNix — Set of tools to create, edit and inspect Matroska files. || mkvtoolnix-cli, mkvtoolnix-gui
  • MP4Joiner — A collection of GUI tools to manipulate MP4 files (MP4Joiner, MP4Splitter). || mp4joinerAUR
  • OGMtools — Information, extraction or creation for OGG media streams. || ogmtools

Backends[编辑 | 编辑源代码]

GStreamer[编辑 | 编辑源代码]


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[编辑 | 编辑源代码]


xine is a free multimedia player. It plays back CDs, DVDs, BluRays and VCDs. It also decodes multimedia files like AVI, MOV, WMV, and MP3 from local disk drives, and displays multimedia streamed over the Internet.

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[编辑 | 编辑源代码]

No H264, mpg4 or Musepack (.mpc) in Totem Player[编辑 | 编辑源代码]

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

No H264 in Parole Player[编辑 | 编辑源代码]

If you see the "Parole needs H.264 decoder to play this file" warning with Parole media player, 安装 gst-libav.