LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (http://www.linuxquestions.org/questions/linux-software-2/)
-   -   arecord has underruns no matter what I do (http://www.linuxquestions.org/questions/linux-software-2/arecord-has-underruns-no-matter-what-i-do-705371/)

moob8 02-17-2009 09:33 AM

arecord has underruns no matter what I do
 
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:

Code:

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.

AwesomeMachine 02-17-2009 10:04 AM

See this: http://www.linuxquestions.org/questi...-sound-502007/

moob8 02-17-2009 05:16 PM

Wow: I'd forgotten about making that old thread. What is very revealing is that I'd posted that some time ago ... yet in all this time, no one made a reply with a solution that worked. Only one conclusion can be reached ... alsarecord cannot be used for long recording sessions.


All times are GMT -5. The time now is 07:08 PM.