LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
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 04-01-2007, 05:17 PM   #1
mismacku
LQ Newbie
 
Registered: Oct 2002
Location: California
Distribution: Debian Testing
Posts: 24

Rep: Reputation: 15
record audio & make available online


Hello all, thanks in advance for your help. Here is what I have for ya.

I'm trying to constantly record audio from the mic jack of my sound card and also make the current or "live" audio available on a tcp port of my choice.

I'm using this to monitor and hopefully record audio from a VHF marine band radio. I'm currently using the following command to make the audio available over port 41410.

netcat -l-p 41410 -e /usr/bin/radio.sh

The following is contained in a script "radio.sh"
--CUT--
arecord -q -t wav -f cd | lame --quiet -b 24 -mm - -
--CUT--

This has been working wonderfully but, as I said above I would also like to record the audio at the same time. I tried using "tee" to send the audio to a file and also to a named pipe, then reading from that pipe when I connect through netcat but, (as you probably guessed) when the pipe is full (64k) the regular file also stops at 64k.

I hope that spells it out well enough. Any ideas?
 
Old 04-02-2007, 11:46 PM   #2
ncsuapex
Member
 
Registered: Dec 2004
Location: Raleigh, NC
Distribution: CentOS 2.6.18-53.1.4.el5
Posts: 770

Rep: Reputation: 44
You could try sox.

I use it to record from a line in and send the output to my shoutcast server so I can listen to it and also have a copy saved.



sox -t ossdsp -w -s -r 44100 -c 2 /dev/dsp -t raw - | lame -x -m s - /path/to/shoutcast.mp3


I'm not sure how you would rework it for your setup. maybe change the /dev/dsp to your mic in file...
 
Old 04-04-2007, 12:15 AM   #3
mismacku
LQ Newbie
 
Registered: Oct 2002
Location: California
Distribution: Debian Testing
Posts: 24

Original Poster
Rep: Reputation: 15
Thanks for the idea but, my problem is that I need to record 24/7 (read archive) and occasionally listen in on the live audio. You probably record your audio then play it back from the beginning, whereas I want to play it from the end (if that makes any sense). If I record 48 hours worth of audio, I don't want to have to seek all the way to the end of the approx. 500MB file to get to the live or most current portion. If I'm seeing it correctly I believe the command you posted is essentially the same with the exception of sending the audio to a file instead of STDOUT. But, if I were wrong, it wouldn't be the first time.
 
Old 04-05-2007, 09:31 PM   #4
ncsuapex
Member
 
Registered: Dec 2004
Location: Raleigh, NC
Distribution: CentOS 2.6.18-53.1.4.el5
Posts: 770

Rep: Reputation: 44
Hmm, yeah I use it to record something that I want to listen at work that doesn't have web broadcast but is available on the AM/FM radio. The command I posted saves it to a file then I use that mp3 in shoutcast to listen to it live as well. The draw back is you have to listen to it from the start of the recording to truly get it live. If you start listening 30 minutes into it then it starts from the beginning of the record time, so you're 30 mins behind.
 
  


Reply



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
Record Online Music arindom Linux - Newbie 4 01-28-2007 11:00 AM
make screen capture movies with audio & transmit continously to a central recorder radionits Linux - Software 2 01-12-2006 02:45 PM
How to record online A/V streams? moiaussi Linux - Newbie 2 01-26-2005 09:27 PM
How to record audio AndreTapxure Linux - General 1 08-10-2004 02:50 AM

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

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