I recently captured some audio from the SDR and the output was in 44.1k sample rate, wav format. I wanted to run some offline processing on it using some tools that took only 48k S16LE mono raw input.

First, I converted it to 48k sampling rate.

ffmpeg -i foo.wav -ar 48000 foo-48k.wav

Now, this wav file contained two channels, but both having the same audio samples, so I took one channel of it and wrote into a raw S16LE file.

ffmpeg -i foo-48k.wav -ac 1 -f s16le -ar 48000 foo-48k.raw

Now, after some processing, I wanted to get back to wav files, so that it can be played with audio players.

 ffmpeg -f s16le -ac 1 -i foo-48k-processed.raw -ar 48000 foo-48k-processed.wav

Took me some manpage reading to figure it out. ffmpeg has a gazillion options, so it is easy to get lost in the options, so writing it down here for future self.