Codecs and containers (简体中文)

From ArchWiki
The printable version is no longer supported and may have rendering errors. Please update your browser bookmarks and please use the default browser print function instead.
翻译状态:本文是 Codecs翻译。上次翻译日期:2017-12-04。如果英文版本有所更改,则您可以帮助同步翻译。

Tango-preferences-desktop-locale-modified.png这篇文章或章节的翻译不反映原文。Tango-preferences-desktop-locale-modified.png

原因:Last updated in 2017 (500964), out of sync with English page(在 Talk:Codecs and containers (简体中文)# 中讨论)

来自 wikipedia:

编解码器(codec)指的是一个能够对一个信号或者一个数据流进行变换的设备或者程序。

通常来说,编解码器被多媒体应用程序用来编码或解码音频视频流。为了播放编码过的流媒体,用户必须确保安装了合适的编解码器。

本文仅仅关心解码器和应用程序后端。这里包含媒体播放器的列表。MPlayerVLC 是常用的选择。

需求条件

播放多媒体内容需要两个组件:

  • 一个合适的媒体播放器
  • 合适的解码器

如果你安装了一个媒体播放器,通常不需要特意的安装解码器。如 MPlayer 包含了大量的解码器作为依赖,同时也内嵌了一些解码器。

常用编解码器

  • ALAC — Data compression method which reduces the size of audio files with no loss of information.
https://macosforge.github.io/alac/ || alac-gitAUR
  • CELT — Compression algorithm for audio. Like MP3, Vorbis, and AAC it is suitable for transmitting music with high quality. Unlike these formats CELT imposes very little delay on the signal, even less than is typical for speech centric formats like Speex, GSM, or G.729.
https://gitlab.xiph.org/xiph/celt || celt
  • 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
  • FAAC — Proprietary AAC audio encoder.
http://faac.sourceforge.net/ || faac
  • FAAD2 — ISO AAC audio decoder.
http://faac.sourceforge.net/ || faad2
  • FLAC — Free Lossless Audio Codec.
https://xiph.org/flac/ || flac
  • Fraunhofer FDK AAC — Complete, high-quality audio solution to Android (and Linux) users.
https://www.iis.fraunhofer.de/en/bf/amm/implementierungen/fdkaaccodec.html || libfdk-aac
  • JasPer — Software-based implementation of the codec specified in the emerging JPEG-2000 Part-1 standard.
https://www.ece.uvic.ca/~frodo/jasper/ || jasper
  • LAME — MP3 encoder and graphical frame analyzer.
http://lame.sourceforge.net/ || lame
  • liba52 — Free library for decoding ATSC A/52 streams.
http://liba52.sourceforge.net/ || a52dec
  • libdca — Free library for decoding DTS Coherent Acoustics streams.
https://www.videolan.org/developers/libdca.html || libdca
  • 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
  • MAD — High-quality MPEG audio decoder.
https://www.underbit.com/products/mad/ || libmad
  • Musepack — Audio compression format with a strong emphasis on high quality. It's not lossless, but it is designed for transparency, so that you will not be able to hear differences between the original wave file and the much smaller MPC file. It is based on the MPEG-1 Layer-2 / MP2 algorithms, but since 1997 it has rapidly developed and vastly improved and is now at an advanced stage in which it contains heavily optimized and patentless code.
https://musepack.net/ || libmpcdec
  • Nero AAC — AAC audio codec (decode/encode/tag) all-in-one.
https://www.nero.com/eng/company/about-nero/nero-aac-codec.php || neroaacAUR[损坏的链接:package not found]
  • opencore-amr — Open source implementation of the Adaptive Multi Rate (AMR) speech codec.
https://sourceforge.net/projects/opencore-amr/ || opencore-amr
  • Opus — Totally open, royalty-free, highly versatile audio codec. Opus is unmatched for interactive speech and music transmission over the Internet, but is also intended for storage and streaming applications. It is standardized by the Internet Engineering Task Force (IETF) as RFC 6716 which incorporated technology from Skype's SILK codec and Xiph.Org's CELT codec.
https://www.opus-codec.org/ || opus opus-gitAUR
  • 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
  • Speex — Patent-free audio compression format designed for speech.
https://www.speex.org/ || speex
  • Theora — Open video codec developed by the Xiph.org.
https://www.theora.org/ || libtheora
  • Vorbis — Completely open, patent-free, professional audio encoding and streaming technology.
http://www.vorbis.com/ || libvorbis
  • VP8 — High-quality, open video format for the web that's freely available to everyone.
https://www.webmproject.org || libvpx libvpx-gitAUR
  • WavPack — Audio compression format with lossless, lossy, and hybrid compression modes.
https://www.wavpack.com/ || wavpack
  • 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/[失效链接 2021-11-07 ⓘ] || x265 x265-hgAUR
  • Xvid — Open source MPEG-4 video codec.
http://www.xvid.org/ || xvidcore

后端

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 https://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[损坏的链接:package not found] 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.