Changes between Version 2 and Version 3 of audio types


Ignore:
Timestamp:
Jun 10, 2015, 11:43:24 PM (4 years ago)
Author:
rogerdpack
Comment:

wow that is confusing...

Legend:

Unmodified
Added
Removed
Modified
  • audio types

    v2 v3  
    33for instance:
    44
    5 * pcm_s16le PCM means "traditional wave like format" (raw bytes, basically).  16 means 16 bits per sample, le means "little endian", s means "signed"
    6 * pcm_s32le same but 32 bits per sample.
     5* pcm_s16le PCM means "traditional wave like format" (raw bytes, basically).  16 means 16 bits per sample, "le" means "little endian", s means "signed", u would mean "unsigned"
    76
    8 You can see a list, like:
     7You can see a list, by running a command like this on your own local box:
    98
    109{{{
     
    3332}}}
    3433
    35 Basically these represent raw audio types.
     34Basically these represent all the raw audio type combination possibilities.
    3635
    37 Other types include
     36FFmpeg can take input of raw audio types by specifying the type on the command line.  For instance, to convert a "raw" audio type to a ".wav" file:
    3837
    39 * pcm_bluray, which can be at least 24 bit, possibly other bit rates.
     38{{{ ffmpeg -f pcm_s32le input_filename.raw output.wav }}}
    4039
    41 The default for .wav files is to use pcm_s16le, you can change it like:
     40You can specify number of channels, etc. as well, ex:
    4241
    43 {{{ ffmpeg -i input -acodec pcm_s32le yo.wav }}}
     42{{{ ffmpeg -f u16le -ar 44100 -ac 1 -i input.raw output.wav }}}
    4443
    45 and thus store other types of wave formats in there.
     44The default for encoding .wav files it uses is pcm_s16le, you can change it by specifying an "acodec" and using the .wav file extension:
     45
     46{{{ ffmpeg -i input -acodec pcm_s32le yo.wav }}}
     47
     48Which will create a .wav file containing audio with that codec (not a raw file) (there are also other containers that can contain raw audio packets, like pcm_bluray).  If you want to create a raw file, don't use the ".wav" ending:
     49
     50{{{ ffmpeg -i input -acodec pcm_s32le yo.raw }}}