Doc / audio-codecs


Doc / audio-codecs
2015-10-24 (土) 07:56:58更新
カテゴリ:未訳
原文:http://www.mplayerhq.hu/DOCS/HTML/en/audio-codecs.html

7.2. オーディオ・コデック

The most important audio codecs above all:

  • MPEG layer 1/2/3 (MP1/2/3) audio (native code, with MMX/SSE/3DNow! optimization)
  • Windows Media Audio 7 and 8 (AKA WMAv1 and WMAv2) (native code, with libavcodec)
  • Windows Media Audio 9 (WMAv3) (using DMO DLL)
  • AC3 Dolby audio (native code, with MMX/SSE/3DNow! optimization)
  • AC3 passing through sound card hardware
  • AAC
  • Ogg Vorbis audio codec (native library)
  • RealAudio: DNET (low bitrate AC3), Cook, Sipro and ATRAC3
  • QuickTime: Qualcomm and QDesign audio codecs
  • VIVO audio (g723, Vivo Siren)
  • Voxware audio (using DirectShow DLL)
  • alaw and ulaw, various gsm, adpcm and pcm formats and other simple old audio codecs

7.2.1. Software AC3 decoding

This is the default decoder used for files with AC3 audio.

The AC3 decoder can create audio output mixes for 2, 4, or 6 speakers. When configured for 6 speakers, this decoder provides separate output of all the AC3 channels to the sound driver, allowing for full "surround sound" experience without the external AC3 decoder required to use the hwac3 codec.

Use the -channels option to select the number of output channels. Use -channels 2 for a stereo downmix. For a 4 channel downmix (Left Front, Right Front, Left Surround and Right Surround outputs), use -channels 4. In this case, any center channel will be mixed equally to the front channels. -channels 6 will output all the AC3 channels as they are encoded - in the order Left, Right, Left Surround, Right Surround, Center and LFE.

The default number of output channels is 2.

To use more than 2 output channels, you will need to use OSS, and have a sound card that supports the appropriate number of output channels via the SNDCTL_DSP_CHANNELS ioctl. An example of a suitable driver is emu10k1 (used by Soundblaster Live! cards) from August 2001 or newer (ALSA CVS is also supposed to work).


7.2.2. Hardware AC3 decoding

You need an AC3 capable sound card, with digital out (S/PDIF). The card's driver must properly support the AFMT_AC3 format (C-Media does). Connect your AC3 decoder to the S/PDIF output, and use the -ac hwac3 option. It is experimental but known to work with C-Media cards and Soundblaster Live! + ALSA (but not OSS) drivers and DXR3/Hollywood+ MPEG decoder cards.


7.2.3. libmad support

libmadはマルチプラットフォーム、整数精度のみ(内部的には24bit PCM)のMPEGオーディオ・デコード・ライブラリです。壊れたファイルをウマく扱うことはできませんし、シークで問題が有ることもありますが、FPUの無いプラットフォーム(例えば ARM)ではmp3libよりもパフォーマンスが良いです。

サポートをイネーブルにするには、configureオプションで--enable-madを指定した上でコンパイルします。


7.2.4. Hardware MPEG audio codec

This codec (selected by -ac hwmpa) passes through MPEG audio packets to hardware decoders, such as the ones found in full-featured DVB cards and DXR2 adapters. Don't use it in combination with any other audio output device (such as OSS and ALSA) that isn't able to decode it (you will hear only white noise).


7.2.5. VIVO audio

The audio codec used in VIVO files depends on whether it is a VIVO/1.0 or VIVO/2.0 file. VIVO/1.0 files have g.723 audio, and VIVO/2.0 files have Vivo Siren audio. Both are supported.

7.2.6. RealAudio

MPlayer supports decoding nearly all versions of RealAudio:

  • RealAudio DNET - decoding supported by liba52
  • RealAudio Cook/Sipro/ATRAC3 - decoding supported by RealPlayer libraries

Instructions on how to install the RealPlayer libraries are in the RealVideo section.

7.2.7. QDesign codecs

QDesign audio streams (fourcc:QDMC, QDM2) are found in MOV/QT files. Both versions of this codec can be decoded with QuickTime libraries. For installation instructions please see the Sorenson video codec section.

7.2.8. Qualcomm codecs

Qualcomm audio streams (fourcc:Qclp) is found in MOV/QT files. It can be decoded with QuickTime libraries. For installation instructions please see the Sorenson video codec section.

7.2.9. AAC codec

AAC (Advanced Audio Coding) はMOVやMP4ファイルに入っていることがある音声コデックです。FAADと言う名前のオープンソースのデコーダが http://www.audiocoding.com で配布されています。MPlayer には libfaad 2.1 beta の CVS snapshot が入っていますので、別途入手する必要はありません。

gcc 3.2 を使っている(上記の internal FAAD をきちんとビルドできません)などの理由で external library を使いたい場合、 download page からlibraryをダウンロードして、configureで --enable-external-faad を指定して下さい。AACファイルをデコードするにはfaad2が全部必要というわけではありません。 libfaad だけで十分です。ビルドのやりかたは以下の通り:

cd faad2/
sh bootstrap
./configure
cd libfaad
make
make install

audiocoding.comではバイナリ配布をしていませんが、 (apt-)get Debian パッケージはChristian Marillat's homepageで、 Mandrake/Mandriva RPM は P.L.F で、 そして RedHat RPM は Grey Sectorで、それぞれ入手できます。