LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
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 03-31-2005, 08:52 PM   #1
fwelland
LQ Newbie
 
Registered: Feb 2005
Posts: 7

Rep: Reputation: 0
Question capture/record all 'stuff' from ALSA driver to file


environment
---
Dell Latitude D600 running FC3 (2.6.9-Fred - stock kernel patched with alps touch pad driver)
Upgraded my ALSA drivers/lib/oss/utils to latest - 1.0.8
Card: Intel 82801DB-ICH4
Chip: SigmaTel STAC9750/51
---

Before the alsa upgrade (using stock alsa that came with FC3) I used to route pretty much everyting (xmms, gaim sounds, gnome event sounds etc) thru ESD. I also would 'capture/record' some stuff via "esdmon | lame -x -m s - output.mp3" - basically that took whatever was sent to ESD and lamed it and stored it to a file.

Now I have ditched ESD and just routed most/all sound stuff thru alsa/dmix directly. But how do I capture the mixed stream like I did with esdmon? Is there something like esdmon for alsa?

And no I'd like to avoid running esd, or jack or any other sound server.
 
Old 03-31-2005, 09:32 PM   #2
tsphan
Member
 
Registered: Jan 2005
Location: Clackamas, Oregon, US
Distribution: Slackware 10.2
Posts: 154

Rep: Reputation: 30
i suppose you can just use the regular recording options with the alsamixer. I don't know how to set it up with alsamixer, but with aumix, you just press the green button next to the Master Volume and use any sound recording program to record it. Pressing it selects the input source.

the alsamixer manual said to use the spacebar, I didn't find it to work.
 
Old 04-01-2005, 09:38 AM   #3
fwelland
LQ Newbie
 
Registered: Feb 2005
Posts: 7

Original Poster
Rep: Reputation: 0
well I don't reall want to record anything from one of the 'normal' alsa input sources such as 'Mic' or line - in. Reallly what I want to do is have a several programs that produce sound - do so...and then I capture this combined/mixed output. So the 'record' stuff in alsamixer (and arecord) doesn't really do this - or I don't know how to make it do that.

oh and I don't know too much about aumix - but it looks like a oss mixer and I am really not 'running' any oss stuff any more. I tried it - and get aumix: error opening mixer - maybe it is t wants to open /dev/dsp which doesn't exist when you are not using OSS. ...

still looking...


If anyone is really curious as to why I want to do this....

Here is the script if you are interested (this is the one using esd - note I commented out some stuff from an earlier rev of this script that just used OSS stuff & SOX - that had some problem that I don't recall - that caused me to switch to ESD).
--------------
#!/bin/sh
fname=`date +"interval-music-RP-%m-%d-%Y-%I_%m%p.mp3"`
begindate=`date +"%s"`
#sox -t ossdsp -w -s -r 44100 -c 2 /dev/dsp -t raw - | lame -x -m s - $fname &
esdmon | lame -x -m s - $fname &
#soxpid=`ps |grep sox | awk '{print $1}'`
soxpid=`ps |grep esdmon | awk '{print $1}'`
sleep 3
fsize=`ls -l $fname |awk '{print $5}'`
while [ $fsize -lt 384000000 ] ; do
sleep 297
sox /home/fwelland/Sounds/UtopiaExclamation.wav -c 1 -t ub - |esdcat -b -m
sleep 2
sox /home/fwelland/Sounds/UtopiaExclamation.wav -c 1 -t ub - |esdcat -b -m
sleep 57
sox /home/fwelland/Sounds/Musica/MusicaError.wav -c 1 -t ub - | esdcat -b -m
sleep 2
sox /home/fwelland/Sounds/Musica/MusicaError.wav -c 1 -t ub - | esdcat -b -m
fsize=`ls -l $fname |awk '{print $5}'`
done
kill $soxpid
enddate=`date +"%s"`
timediff=`expr $enddate - $begindate`
mins=`expr $timediff / 60`
secs=`expr $timediff % 60`
echo recording duration was $mins minutes and $secs seconds
newfname=`echo ${fname%.mp3}-${mins}m-${secs}s.mp3`
echo $newfname
mv $fname $newfname
----
If you read this far - maybe you are curious why I am doing this. I listen to an internet radio station via xmms and fire off this script. It inserts an 'alarm' after about 5 mins and then another one a minute later. I am an interval runner - run for 5 mins walk for 1.......copy to my iRiver....and away I go...
 
  


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
Sixpack 5.1 can not record with ALSA renard Linux - General 1 11-28-2005 08:24 PM
Unable to record or play a wav file using ALSA stephenwalter Programming 1 08-18-2005 03:08 PM
[ALSA] Noisy playback after I record from line in halfzware_shag Linux - Software 0 11-27-2004 09:49 AM
ALSA device stuff ( asoundrc file probably) Tomasfuego Linux - Hardware 1 02-12-2004 07:05 AM
Cannot record audio using ALSA with OSS emulation mhearn Linux - General 0 10-01-2003 09:14 AM

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

All times are GMT -5. The time now is 11:39 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