LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - General (http://www.linuxquestions.org/questions/linux-general-1/)
-   -   Simultaneous arecord instances (http://www.linuxquestions.org/questions/linux-general-1/simultaneous-arecord-instances-902575/)

ctkroeker 09-12-2011 08:42 AM

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!

kbp 09-13-2011 06:59 PM

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.

ctkroeker 09-14-2011 07:25 AM

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!


All times are GMT -5. The time now is 11:32 PM.