Latest LQ Deal: Linux Power User Bundle
Go Back > Forums > Linux Forums > Linux - General
User Name
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.


  Search this Thread
Old 09-12-2011, 08:42 AM   #1
Senior Member
Registered: May 2005
Location: Paraguay
Posts: 1,565
Blog Entries: 1

Rep: Reputation: 50
Simultaneous arecord instances


I have a server running an arecord every two hours via cron, basically it logs audio 24/7 in two-hour blocks. What I want to do, on the same server, have a separate arecord script doing short 15 minute recordings at a specific time.

My problem is that the arecord is already running when the 15min arecord starts, and fails. What would be a viable way of getting this to work?

Two-hour arecord
/usr/bin/arecord -f S16_LE -c1 -r22050 -d 7195 | lame -h - /home/server/recordings/$(date +%m-%d_%H.%M).mp3
15min arecord
/usr/bin/arecord -f S16_LE -c1 -r22050 -d 900 | lame -h - /home/server/podcast/"noticias-"`date +"%d-%m-%Y"`.mp3
Server is running Ubuntu 8.04LTS. Thanks!
Old 09-13-2011, 06:59 PM   #2
Senior Member
Registered: Aug 2009
Posts: 3,790

Rep: Reputation: 651Reputation: 651Reputation: 651Reputation: 651Reputation: 651Reputation: 651
I'm guessing you can't have simultaneous access to the same audio device, you may need to set up another device and use the '-D' argument on the 2hr and 15m jobs to ensure they use different devices.
Old 09-14-2011, 07:25 AM   #3
Senior Member
Registered: May 2005
Location: Paraguay
Posts: 1,565
Blog Entries: 1

Original Poster
Rep: Reputation: 50
I guess that would be possible... But really to much work. So I just use cutmp3 in a script to copy those 15min. and save them in a seperate file. works great. Thanks for your help!


arecord, audio, cron

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 On
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
sendmail-2: Wrong number of instances of process sendmail:, expected instances equal maxymaxymaxymaxymaxy Linux - Newbie 1 06-15-2011 10:51 AM
arecord has underruns no matter what I do moob8 Linux - Software 2 02-17-2009 05:16 PM
arecord: recording in left-channel only soccja Linux - Software 3 03-05-2006 01:09 AM
Can't record with 'arecord' in FC4 Gregory Deal Linux - Software 0 07-29-2005 08:51 PM
Wavrecord and arecord not recording J_Szucs Linux - Software 5 01-13-2004 08:41 PM > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 09:56 AM.

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