Home > aplay > aplay -f

aplay(1) -f
command-line sound recorder and player for ALSA soundcard driver
-f --format=FORMAT
       Sample format
       Recognized  sample  formats  are:  S8  U8  S16_LE S16_BE U16_LE U16_BE S24_LE S24_BE U24_LE U24_BE
       S32_LE  S32_BE  U32_LE  U32_BE  FLOAT_LE   FLOAT_BE   FLOAT64_LE   FLOAT64_BE   IEC958_SUBFRAME_LE
       IEC958_SUBFRAME_BE MU_LAW A_LAW IMA_ADPCM MPEG GSM SPECIAL S24_3LE S24_3BE U24_3LE U24_3BE S20_3LE
       S20_3BE U20_3LE U20_3BE S18_3LE S18_3BE U18_3LE
       Some of these may not be available on selected hardware
       The available format shortcuts are:
       -f cd (16 bit little endian, 44100, stereo) [-f S16_LE -c2 -r44100]
       -f cdr (16 bit big endian, 44100, stereo) [-f S16_BE -c2 -f44100]
       -f dat (16 bit little endian, 48000, stereo) [-f S16_LE -c2 -r48000]
       If no format is given U8 is used.

Examples

aplay -c 1 -t raw -r 22050 -f mu_law foobar will play the raw file "foobar" as a 22050-Hz, mono, 8-bit, Mu-Law .au file.
arecord -d 10 -f cd -t wav -D copy foobar.wav will record foobar.wav as a 10-second, CD-quality wave file, using the PCM "copy" (which might be defined in the user's .asoundrc file as: pcm.copy { type plug slave { pcm hw } route_policy copy }
arecord -t wav -max-file_time 30 mon.wav Record from the default audio source in monaural, 8,000 samples per second, 8 bits per sample. Start a new file every 30 seconds. File names are mon-nn.wav, where nn increases from 01. The file after mon-99.wav is mon-100.wav.
arecord -f cd -t wav -max-file-time 3600 --use-strftime %Y/%m/%d/listen-%H-%M-%v.wav Record in stereo from the default audio source. Create a new file every hour. The files are placed in directories based on their start dates and have names which include their start times and file numbers.

Tips or Questions?


Powered by ExplainShell