Greetings. I would like to record audio for more than 45 minutes, continuous. To minimize cpu usage, I decided to use a command line program to record. Arecord comes with alsa (ie, it is in every distro) so I chose to use arecord.
Many passes over the man page for arecord and much consultation with my friends Trial and Error yeilded this command:
arecord --buffer-time=2000000 -D plughw:1,0 -t wav -c 2 -f S32_LE -r 44100 to_edit.wav
The above works (creates a 32 bit stereo wave file (the actual sound card is card is 24 bit) with actual audio in it) but I get random underruns when I try to record for long times. I have tried several things to eliminate underruns:
- google (since I am posting here, you can figure out the success/fail outcome on this one)
- increase the buffer time. if I understand the microseconds/milliseconds thing, the buffer should be currently either two seconds or twenty seconds. In either case, the hard drive is never busy for more than a quarter of a second, so that buffer "should" be enough?
- record to a non-journaling file system on its own partition
- have enough ram that linux does not hit the swap
- Don't have anything else running while recording
- have arecord record to stdin instead of a file and pipe that into another process that in turn writes the audio to a file. The thought here was that the "natural" tendency of linux to buffer things and to multitask would prevent underruns. (nope)
Please, how does one (in linux) record in excess of 45 minutes of audio, non-stop, without underruns? Can arecord do it with different settings? Is there a different program that is more suited for long recording times?
Thank you in advance.