Recording Audio on FreeBSD

For some reason I have been recording a lot of audio on my desktop recently. I also saw a conversation in irc about how to simply record audio from a microphone on FreeBSD.

I hoped I was going to find a super simple OpenBSD style solution to capturing samples, but I wasn't able to dig anything out. I did play with cat for a little while, but nothing useful came from it.

Audacity is the tool I have been using to record long sessions the most. Audacity is now probably the foss standard for doing audio editing/production and it has been really stable for me. On FreeBSD it has been rock solid so far if a little heavy weight.

ffmpeg is an audio and video swiss army knife and can be used to capture video from webcams and audio from capture devices. The only issue I have had with ffmpeg on FreeBSD is that lame support is not built into the default packages.

ffmpeg can be used to caputure audio from a source:

ffmpeg -f oss -i /dev/dsp -vn -ab 128k test.wav

Sox is the ultimate tool for handling audio, a long with the two front ends play and rec you can do most operations on an audio stream. Sox can built with codec support for a ton of formats. It is quite simple to use sox to convert different bit formats of sdr capture files with sox.

Rec can be used to caputure audio from a source:

rec -c 2 test.wav