LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices

Reply
 
Search this Thread
Old 03-09-2008, 07:54 PM   #1
MooseMagnet
Member
 
Registered: Oct 2007
Location: U.S.
Distribution: Ubuntu 14.04
Posts: 179
Blog Entries: 1

Rep: Reputation: 15
How to Capture Streaming Audio


I've tried streamripper, XMMS, streamtuner. Can't figure out how to grab an audio stream. If the dang thing goes through my processor and sound card, I should be able to grab it.

How do I capture and audio stream?

Thanks, and sorry to re-post, but the question morphed.
 
Old 03-09-2008, 08:02 PM   #2
ncsuapex
Member
 
Registered: Dec 2004
Location: Raleigh, NC
Distribution: CentOS 2.6.18-53.1.4.el5
Posts: 770

Rep: Reputation: 43
capture from line in

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



record from internet stream

mplayer -dumpstream -dumpfile ~/filename.mp3 mms://location/to/stream
 
Old 03-09-2008, 09:13 PM   #3
MooseMagnet
Member
 
Registered: Oct 2007
Location: U.S.
Distribution: Ubuntu 14.04
Posts: 179
Blog Entries: 1

Original Poster
Rep: Reputation: 15
Got that. Now, how do I find the location of the stream?

Not to sound ungrateful, but the reason I post to the Newbie thread, is because I am a Newbie. I don't understand most of what you tell me. If you can be more specific, I will greatly appreciate it. Please don't take offense from my frustration.
 
Old 03-10-2008, 03:28 PM   #4
MooseMagnet
Member
 
Registered: Oct 2007
Location: U.S.
Distribution: Ubuntu 14.04
Posts: 179
Blog Entries: 1

Original Poster
Rep: Reputation: 15
Figured out part of it

I've been able to capture some streams with streamripper. YEA!!
But I must know the URL 12.123.23.45.... Doesn't seem to be a single simple way of seeing the url on all sites.

Advice?

Thanks
 
Old 03-10-2008, 03:30 PM   #5
ncsuapex
Member
 
Registered: Dec 2004
Location: Raleigh, NC
Distribution: CentOS 2.6.18-53.1.4.el5
Posts: 770

Rep: Reputation: 43
I can't remember how exactly I got the mms.. but i *think* you just do a wget on the page where the stream is then browse the file for mms or anything else that resembles a URL. Then copy/paste it in a browser or use "mplayer url" to make sure the stream plays and it's not a pre-recorded ad.
 
Old 03-10-2008, 03:56 PM   #6
glidermike
Member
 
Registered: Nov 2005
Location: Toronto Canada
Distribution: Debian
Posts: 90

Rep: Reputation: 15
record from stream

If you are using streamtuner you can easily rip to your hd using streamripper. If you want to rip random streams from within a browser you can install the downloadhelper extension in firefox and it will rip almost anything including video! I have also used KRec recording tool (kde) it works really well.
 
Old 03-10-2008, 05:49 PM   #7
matthewg42
Senior Member
 
Registered: Oct 2003
Location: UK
Distribution: Kubuntu 12.10 (using awesome wm though)
Posts: 3,530

Rep: Reputation: 63
If your audio application is playing using the ALSA driver, you can simple enable the capture input in alsamixer, and then use and ALSA recording program to capture whatever you are playing. I tend to use arecord (the command line ALSA utility) for this, but you could also use a GUI app which can use the ALSA driver.
 
Old 03-10-2008, 06:37 PM   #8
MooseMagnet
Member
 
Registered: Oct 2007
Location: U.S.
Distribution: Ubuntu 14.04
Posts: 179
Blog Entries: 1

Original Poster
Rep: Reputation: 15
Okay. Matthew, your suggestion seems the simplest. I've tried it a few different ways, but can't get anything to record.

Are you saying I should right-click the speaker icon and change it from Master to Capture? I've done that, and some other things. Then I used SoundRecorder. It records, but no sound is heard when I play it back.

I understand some of what you're suggesting, but not enough to be successful.
 
Old 03-10-2008, 06:39 PM   #9
matthewg42
Senior Member
 
Registered: Oct 2003
Location: UK
Distribution: Kubuntu 12.10 (using awesome wm though)
Posts: 3,530

Rep: Reputation: 63
I wrote it up for recoding skype conversations, here:

http://porpoisehead.net/hi/?q=node/23

It might be a little out of date with version numbers and the like, but the process should still be much the same.
 
Old 03-10-2008, 08:18 PM   #10
Ryptyde
Member
 
Registered: Jun 2004
Location: Tragic City,Michigan,USA
Distribution: Fedora 18 Fedora 17
Posts: 242

Rep: Reputation: 37
I use streamtuner, streamripper and vlc enabled for the media player currently with Fedora 8 and previously with other Fedoras. When I have streamtuner running the gui has "Tune In,Record,Browse" in the top menu lit up "green" and while listening to audio I click on "Record" and streamripper begins recording to a directory in "home".
 
Old 03-11-2008, 07:15 AM   #11
ncsuapex
Member
 
Registered: Dec 2004
Location: Raleigh, NC
Distribution: CentOS 2.6.18-53.1.4.el5
Posts: 770

Rep: Reputation: 43
I like mplayer because I can SSH into my box from work/etc and set it up to record or can use cron to run a script that can record if I'm not around.
 
Old 03-11-2008, 06:07 PM   #12
andrew.46
Member
 
Registered: Oct 2007
Distribution: Slackware
Posts: 650

Rep: Reputation: 92
Hi,

Often an easy way to get around the problem of finding the exact location of the sound stream is to use the -playlist option of mplayer. Below is an example that uses my favourite radio broadcast on Australian radio and saves it to a file called ftgws.wav:

Code:
$ mplayer -playlist \
        http://www.abc.net.au/classic/ftgws/audio/ftgws_09032008.ram \
        -vc null -vo null -ao pcm:fast:waveheader:file=ftgws.wav
(For anyone reading this as an 'old post' bear in mind that this file will be active only for a month at this address.) And if you look closely at the actual ram file by using wget and opening the ram file with a text editor:

Code:
$ wget http://www.abc.net.au/classic/ftgws/audio/ftgws_09032008.ram
you will see that the real address of the stream is:

rtsp://media1.abc.net.au/classic/ftgws/ftgws_0903_2856ISDN2LAN1.rm

You can test this by opening this address directly with mplayer:

Code:
$ mplayer rtsp://media1.abc.net.au/classic/ftgws/ftgws_0903_2856ISDN2LAN1.rm
This does not work with all streams as some sites go to sickening lengths to shield the location of their precious files. Sigh .....

Andrew
 
Old 03-11-2008, 07:49 PM   #13
rosspy
Member
 
Registered: Feb 2008
Distribution: debian
Posts: 45

Rep: Reputation: 15
Try audacity for recording audio strems.
You just have to choose witch source to record (mix, aux, vol) but it worked out of the box for me.
After recording you just export the stream to whatever format you like, mp3, ogg, wav..
 
Old 03-12-2008, 09:27 PM   #14
MooseMagnet
Member
 
Registered: Oct 2007
Location: U.S.
Distribution: Ubuntu 14.04
Posts: 179
Blog Entries: 1

Original Poster
Rep: Reputation: 15
Wow. Thank you for all the suggestions.

I can't do it with Audicity or SoundRecorder. I've tried all the possible Capture, Capture Mux, IEC958, Front, etc. combinations. Audacity does nothing, and SoundRecorder "says" it's recording. But nothing plays back.

I poke around and find a possible URL, and use streamripper. Then get ad infinitum of this:

[re-connecting..] - [ 9kb]
[re-connecting..] - [ 9kb]
[re-connecting..] - [ 9kb]
[re-connecting..] - [ 9kb]

When I give up after more than 10 minutes and stop it, it writes an "incomplete" mp3 file in my home folder. That file won't play.

Andrew: "This does not work with all streams as some sites go to sickening lengths to shield the location of their precious files. Sigh ....."

Maybe that's what I'm up against. Not sure.

No luck with anything yet. How do the rest of you get Audacity and SoundRecorder to work? I'm using and HDAintelSTAC90 sound card. I'll keep trying. Thanks again for the help.
 
Old 03-12-2008, 10:17 PM   #15
ncsuapex
Member
 
Registered: Dec 2004
Location: Raleigh, NC
Distribution: CentOS 2.6.18-53.1.4.el5
Posts: 770

Rep: Reputation: 43
post the website you are trying to get the stream from or send it to me in a private message and I'll see if I can record from it.
 
  


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
How can I capture streaming videos from the net? WHat software can I use? neolithic_psyche Fedora 1 05-26-2007 01:34 AM
Linux Based Screen Capture Utility (streaming, not single image) fultron Linux - Newbie 2 02-16-2007 04:59 AM
audio cd works - mp3's, streaming audio, flash sound don't spoody_goon Linux - Software 7 07-08-2006 04:11 PM
How do I capture/record streaming audio? AlanQ Linux - Software 7 01-18-2006 04:40 PM
Cannot capture streaming with cron jimbobboy Linux - Software 0 04-04-2004 08:09 PM


All times are GMT -5. The time now is 05:53 PM.

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