LinuxQuestions.org
Visit the LQ Articles and Editorials section
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
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.

Notices

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

Rep: Reputation: 50
Simultaneous arecord instances


Hi,

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
Code:
/usr/bin/arecord -f S16_LE -c1 -r22050 -d 7195 | lame -h - /home/server/recordings/$(date +%m-%d_%H.%M).mp3
15min arecord
Code:
/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, 07:59 PM   #2
kbp
Senior Member
 
Registered: Aug 2009
Posts: 3,758

Rep: Reputation: 644Reputation: 644Reputation: 644Reputation: 644Reputation: 644Reputation: 644
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, 08:25 AM   #3
ctkroeker
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!
 
  


Reply

Tags
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 11:51 AM
arecord has underruns no matter what I do moob8 Linux - Software 2 02-17-2009 06:16 PM
arecord: recording in left-channel only soccja Linux - Software 3 03-05-2006 02:09 AM
Can't record with 'arecord' in FC4 Gregory Deal Linux - Software 0 07-29-2005 09:51 PM
Wavrecord and arecord not recording J_Szucs Linux - Software 5 01-13-2004 09:41 PM


All times are GMT -5. The time now is 07:10 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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration