LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 02-17-2009, 10:33 AM   #1
moob8
Member
 
Registered: Sep 2006
Distribution: slackware
Posts: 132

Rep: Reputation: 15
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.
 
Old 02-17-2009, 11:04 AM   #2
AwesomeMachine
LQ Guru
 
Registered: Jan 2005
Location: USA and Italy
Distribution: Debian testing/sid; OpenSuSE; Fedora; Mint
Posts: 5,524

Rep: Reputation: 1015Reputation: 1015Reputation: 1015Reputation: 1015Reputation: 1015Reputation: 1015Reputation: 1015Reputation: 1015
See this: http://www.linuxquestions.org/questi...-sound-502007/
 
Old 02-17-2009, 06:16 PM   #3
moob8
Member
 
Registered: Sep 2006
Distribution: slackware
Posts: 132

Original Poster
Rep: Reputation: 15
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.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
arecord issue with usb mic ? frenchn00b Linux - General 0 11-04-2008 05:00 PM
Can't record with 'arecord' in FC4 Gregory Deal Linux - Software 0 07-29-2005 09:51 PM
Burning Linux Problems with Buffer underruns Rawr101 Linux - Software 1 10-31-2004 12:38 AM
Alsa capturing buffer underruns don_pingu Programming 3 09-16-2004 11:00 AM
Wavrecord and arecord not recording J_Szucs Linux - Software 5 01-13-2004 09:41 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 02:32 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration