Audio Capturing
The topic provides examples for capturing an audio file.
The following code block shows the example in different scenarios.
- Capture audio from wm8960:
ffmpeg -f alsa -acodec pcm_s32le -i hw:0,1 output-alsa-wm8960.wav
- Capture audio from wm8960 with 16 K sample rate and 2
channels, 32-bit depth:
ffmpeg -f alsa -i hw:0,0 -ar 16000 -ac 2 -acodec pcm_s32le ff_wm8960_16k_32b_c2.wav
- Capture audio from
ac108:
ffmpeg -f alsa -acodec pcm_s32le -i hw:0,1 output-alsa-ac108.wav
- Capture audio from ac108 with 16 K sample rate and 2
channels, 32-bit depth:
ffmpeg -f alsa -ar 16000 -ac 2 -acodec pcm_s32le -i hw:0,0 ff_ac108_16k_32b_c2.wav
- Capture audio from TDM:
ffmpeg -f alsa -ar 32000 -ac 2 -acodec pcm_s32le -i hw:0,0 ff_tdm_32k_16b_c2.wav
- Capture audio from PDM:
ffmpeg -f alsa -i hw:0,0 -ar 16000 -ac 2 -acodec pcm_s32le ff_pdm_16k_32b_c2.wav