audio types

Version 2 (modified by rogerdpack, 7 years ago) (diff)

note how to store 32 bit in a wave file

Raw audio in FFmpeg can take several different "forms"

for instance:

  • pcm_s16le PCM means "traditional wave like format" (raw bytes, basically). 16 means 16 bits per sample, le means "little endian", s means "signed"
  • pcm_s32le same but 32 bits per sample.

You can see a list, like:

$ ffmpeg -formats | grep PCM
ffmpeg version N-44123-g5d55830 Copyright (c) 2000-2012 the FFmpeg developers
 DE alaw            PCM A-law
 DE f32be           PCM 32-bit floating-point big-endian
 DE f32le           PCM 32-bit floating-point little-endian
 DE f64be           PCM 64-bit floating-point big-endian
 DE f64le           PCM 64-bit floating-point little-endian
 DE mulaw           PCM mu-law
 DE s16be           PCM signed 16-bit big-endian
 DE s16le           PCM signed 16-bit little-endian
 DE s24be           PCM signed 24-bit big-endian
 DE s24le           PCM signed 24-bit little-endian
 DE s32be           PCM signed 32-bit big-endian
 DE s32le           PCM signed 32-bit little-endian
 DE s8              PCM signed 8-bit
 DE u16be           PCM unsigned 16-bit big-endian
 DE u16le           PCM unsigned 16-bit little-endian
 DE u24be           PCM unsigned 24-bit big-endian
 DE u24le           PCM unsigned 24-bit little-endian
 DE u32be           PCM unsigned 32-bit big-endian
 DE u32le           PCM unsigned 32-bit little-endian
 DE u8              PCM unsigned 8-bit

Basically these represent raw audio types.

Other types include

  • pcm_bluray, which can be at least 24 bit, possibly other bit rates.

The default for .wav files is to use pcm_s16le, you can change it like:

ffmpeg -i input -acodec pcm_s32le yo.wav

and thus store other types of wave formats in there.