Simple Audio Recording
arecord --list-pcms arecord --format=S16_LE --rate=44100 --device="front:CARD=Headset" somewhere4.wav mpv --audio-device=help mpv --audio-device=alsa/default:CARD=Headset somewhere4.wav ffmpeg -i somewhere4.wav -filter:a "volumedetect" -f s16le -acodec pcm_s16le output.raw ffmpeg -i somewhere4.wav -filter:a "volume=13.4dB" -acodec aac somewhere.m4a
See also Desktop Capture with ffmpeg