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 |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
|
 |
|
03-09-2008, 06:54 PM
|
#1
|
Member
Registered: Oct 2007
Location: U.S.
Distribution: Ubuntu 14.04
Posts: 191
Rep:
|
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.
|
|
|
03-09-2008, 07:02 PM
|
#2
|
Member
Registered: Dec 2004
Location: Raleigh, NC
Distribution: CentOS 2.6.18-53.1.4.el5
Posts: 770
Rep:
|
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
|
|
|
03-09-2008, 08:13 PM
|
#3
|
Member
Registered: Oct 2007
Location: U.S.
Distribution: Ubuntu 14.04
Posts: 191
Original Poster
Rep:
|
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.
|
|
|
03-10-2008, 02:28 PM
|
#4
|
Member
Registered: Oct 2007
Location: U.S.
Distribution: Ubuntu 14.04
Posts: 191
Original Poster
Rep:
|
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
|
|
|
03-10-2008, 02:30 PM
|
#5
|
Member
Registered: Dec 2004
Location: Raleigh, NC
Distribution: CentOS 2.6.18-53.1.4.el5
Posts: 770
Rep:
|
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.
|
|
|
03-10-2008, 02:56 PM
|
#6
|
Member
Registered: Nov 2005
Location: Toronto Canada
Distribution: Debian
Posts: 90
Rep:
|
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.
|
|
|
03-10-2008, 04:49 PM
|
#7
|
Senior Member
Registered: Oct 2003
Location: UK
Distribution: Kubuntu 12.10 (using awesome wm though)
Posts: 3,530
Rep:
|
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.
|
|
|
03-10-2008, 05:37 PM
|
#8
|
Member
Registered: Oct 2007
Location: U.S.
Distribution: Ubuntu 14.04
Posts: 191
Original Poster
Rep:
|
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.
|
|
|
03-10-2008, 05:39 PM
|
#9
|
Senior Member
Registered: Oct 2003
Location: UK
Distribution: Kubuntu 12.10 (using awesome wm though)
Posts: 3,530
Rep:
|
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.
|
|
|
03-10-2008, 07:18 PM
|
#10
|
Member
Registered: Jun 2004
Location: Tragic City,Michigan,USA
Distribution: Fedora 23 Fedora 22
Posts: 244
Rep:
|
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".
|
|
|
03-11-2008, 06:15 AM
|
#11
|
Member
Registered: Dec 2004
Location: Raleigh, NC
Distribution: CentOS 2.6.18-53.1.4.el5
Posts: 770
Rep:
|
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.
|
|
|
03-11-2008, 05:07 PM
|
#12
|
Senior Member
Registered: Oct 2007
Distribution: Slackware
Posts: 1,387
|
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
|
|
|
03-11-2008, 06:49 PM
|
#13
|
Member
Registered: Feb 2008
Distribution: debian
Posts: 45
Rep:
|
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..
|
|
|
03-12-2008, 08:27 PM
|
#14
|
Member
Registered: Oct 2007
Location: U.S.
Distribution: Ubuntu 14.04
Posts: 191
Original Poster
Rep:
|
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.
|
|
|
03-12-2008, 09:17 PM
|
#15
|
Member
Registered: Dec 2004
Location: Raleigh, NC
Distribution: CentOS 2.6.18-53.1.4.el5
Posts: 770
Rep:
|
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.
|
|
|
All times are GMT -5. The time now is 10:04 PM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|