Unix Technical Forum

capturing sound

This is a discussion on capturing sound within the Slackware Linux Support forums, part of the Unix Operating Systems category; --> Hello, I'm running Slackware 12.0 and have an Asus P4P800-e motherboard with built in sound. I want to capture ...


Go Back   Unix Technical Forum > Unix Operating Systems > Slackware Linux Support

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 02-21-2008, 05:42 AM
klee12
 
Posts: n/a
Default capturing sound

Hello,

I'm running Slackware 12.0 and have an Asus P4P800-e motherboard with
built in sound. I want to capture sound from the network.

I connected to the sound source on the net with Firefox. Then I
disconnected the line out jack from the speakers and plugged it into
the line in jack in the computer. I gave the command

rec -d /dev/sound/audio cpt.wav

as root and I got the error message

ALSA lib pcm.c:2144snd_pcm_open_noupdate) Unknown PCM /dev/sound/
audio
sox: Failed reading /dev/sound/audio: cannot open audio device

/dev/sound/audio does exist, by the way.

What did I do wrong, or is the attempt fatally flawed. Thanks in
advance.

klee12
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2 (permalink)  
Old 02-21-2008, 05:42 AM
Richard James
 
Posts: n/a
Default Re: capturing sound

klee12 wrote:

> Hello,
>
> I'm running Slackware 12.0 and have an Asus P4P800-e motherboard with
> built in sound. I want to capture sound from the network.
>
> I connected to the sound source on the net with Firefox. Then I
> disconnected the line out jack from the speakers and plugged it into
> the line in jack in the computer. I gave the command
>
> rec -d /dev/sound/audio cpt.wav
>
> as root and I got the error message
>
> ALSA lib pcm.c:2144snd_pcm_open_noupdate) Unknown PCM /dev/sound/
> audio
> sox: Failed reading /dev/sound/audio: cannot open audio device
>
> /dev/sound/audio does exist, by the way.
>
> What did I do wrong, or is the attempt fatally flawed. Thanks in
> advance.


Did you try?
rec cpt.wav

Also if you are getting the source off the Internet there are ways of
capturing the sound inside your system. mplayer can use the -dumpstream
option. You can even capture real media video if you know how it works. But
for most streaming media you can try diverting it to disk instead via a
media player, not all players have such an option.

With some of the more complicated streaming media the media program first
downloads a file that tells it where the stream actually is. To capture
video in this method I used a script that accepts the url to that file from
firefox. it then reads that file and gets the stream uri from inside it.
Then it sends that to mplayer with the -dumpstream option.

Richard James
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #3 (permalink)  
Old 02-21-2008, 05:42 AM
klee12
 
Posts: n/a
Default Re: capturing sound

Thanks for your reply Richard James.

On Dec 5, 11:33 pm, Richard James <IWillGetOne@here> wrote:


>Did you try?
> rec cpt.wav
>


Yes. I got my stream going and could hear it on the speaker. Then I
issued the above command. When I played the wav file I got silence. I
tried again, this time after the I got stream going, I disconnected
the line to the speaker and connected it to line in on the computer
and , issued the rec command. Again I got only silence.


> Also if you are getting the source off the Internet there are ways of
> capturing the sound inside your system. mplayer can use the -dumpstream
> option. You can even capture real media video if you know how it works. But
> for most streaming media you can try diverting it to disk instead via a
> media player, not all players have such an option.
>


I looked at the page source, and found the url for the stream. Then I
did


mplayer http://www.wsw.com/webcast/wa47/rt2/

just to see I could get sound before trying to capture it. I got the
error messages

Playing http://www.wsw.com/webcast/wa47/rt2/.
Resolving www.wsw.com for AF_INET6...
Couldn't resolve name for AF_INET6: www.wsw.com
Resolving www.wsw.com for AF_INET...
Connecting to server www.wsw.com[66.246.249.49]: 80...
Cache size set to 320 KBytes
Cache fill: 0.25% (815 bytes)
Win32 LoadLibrary failed to load: avisynth.dll, /usr/lib/codecs/
avisynth.dll, /usr/lib/win32/avisynth.dll, /usr/local/lib/win32/
avisynth.dll

Evidently I'm missing avisynth.dll. Does anyone knows where I can get
this codec? I googled avisynth and couldn't find what I think I want.
Most of the references seemed to be for an avisynth scripting
language.

Thanks in advance for any help

klee12



Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #4 (permalink)  
Old 02-21-2008, 05:42 AM
Tom N
 
Posts: n/a
Default Re: capturing sound

On 2007-12-06, klee12 <klee12@alum.mit.edu> wrote:


> Playing http://www.wsw.com/webcast/wa47/rt2/.
> Resolving www.wsw.com for AF_INET6...
> Couldn't resolve name for AF_INET6: www.wsw.com
> Resolving www.wsw.com for AF_INET...
> Connecting to server www.wsw.com[66.246.249.49]: 80...
> Cache size set to 320 KBytes
> Cache fill: 0.25% (815 bytes)
> Win32 LoadLibrary failed to load: avisynth.dll, /usr/lib/codecs/
> avisynth.dll, /usr/lib/win32/avisynth.dll, /usr/local/lib/win32/
> avisynth.dll
>
> Evidently I'm missing avisynth.dll. Does anyone knows where I can get
> this codec? I googled avisynth and couldn't find what I think I want.
> Most of the references seemed to be for an avisynth scripting
> language.


Aren't dll's for windows? I don't have any on my Slack 12.0, And there
are none in the .../slackware/l/ directory.

In order to pretend that I am being helpful here, I will suggest
that you google for those libs. That's how I find them.

Sorry,

Tom

--
simpleman.s43
That would be at gee male

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #5 (permalink)  
Old 02-21-2008, 05:42 AM
jessbody@gmail.com
 
Posts: n/a
Default Re: capturing sound

It appears that your sound-IN is not verified to be configured
correctly for the alsa driver.

I had a similar board ASUS P4P800-MX. Sound was OK on Slack 10 (both
IN and OUT). But on Slack 12 no sound. I had to recompile alsa-
driver-1.0.15rc with the mod that the "patch_ad1888" in <pci/ac97/
ac97_codec.c> had to be disabled, i.e., replacing the line (~111)

{ 0x41445368, 0xffffffff, "AD1888", patch_ad1888, NULL },
by
{ 0x41445368, 0xffffffff, "AD1888", NULL, NULL },

This made the sound OUT work, but on the wrong connector.

Later playing with the patch_ad1888, I was able to make sound-IN work,
but this got mapped on to the same connector as sound-OUT. I did not
spend enough time to get both sound IN and OUT right at the same time.

On Dec 5, 1:56 pm, klee12 <kle...@alum.mit.edu> wrote:
> Hello,
>
> I'm running Slackware 12.0 and have an Asus P4P800-e motherboard with
> built in sound. I want to capture sound from the network.
>
> I connected to the sound source on the net with Firefox. Then I
> disconnected the line out jack from the speakers and plugged it into
> the line in jack in the computer. I gave the command
>
> rec -d /dev/sound/audio cpt.wav
>
> as root and I got the error message
>
> ALSA lib pcm.c:2144snd_pcm_open_noupdate) Unknown PCM /dev/sound/
> audio
> sox: Failed reading /dev/sound/audio: cannot open audio device
>
> /dev/sound/audio does exist, by the way.
>
> What did I do wrong, or is the attempt fatally flawed. Thanks in
> advance.
>
> klee12


Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #6 (permalink)  
Old 02-21-2008, 05:42 AM
jessbody@gmail.com
 
Posts: n/a
Default Re: capturing sound

On Dec 6, 2:33 am, Richard James <IWillGetOne@here> wrote:
> klee12 wrote:
> > Hello,

>
> > I'm running Slackware 12.0 and have an Asus P4P800-e motherboard with
> > built in sound. I want to capture sound from the network.

>
> > I connected to the sound source on the net with Firefox. Then I
> > disconnected the line out jack from the speakers and plugged it into
> > the line in jack in the computer. I gave the command

>
> > rec -d /dev/sound/audio cpt.wav

>
> > as root and I got the error message

>
> > ALSA lib pcm.c:2144snd_pcm_open_noupdate) Unknown PCM /dev/sound/
> > audio
> > sox: Failed reading /dev/sound/audio: cannot open audio device

>
> > /dev/sound/audio does exist, by the way.

>
> > What did I do wrong, or is the attempt fatally flawed. Thanks in
> > advance.

>
> Did you try?
> rec cpt.wav
>
> Also if you are getting the source off the Internet there are ways of
> capturing the sound inside your system. mplayer can use the -dumpstream
> option. You can even capture real media video if you know how it works. But
> for most streaming media you can try diverting it to disk instead via a
> media player, not all players have such an option.
>
> With some of the more complicated streaming media the media program first
> downloads a file that tells it where the stream actually is. To capture
> video in this method I used a script that accepts the url to that file from
> firefox. it then reads that file and gets the stream uri from inside it.
> Then it sends that to mplayer with the -dumpstream option.
>
> Richard James


isn't it possible to do the mapping (pcm-out to capture) in kmix?
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #7 (permalink)  
Old 02-21-2008, 05:42 AM
jessbody@gmail.com
 
Posts: n/a
Default Re: capturing sound

On Dec 6, 3:34 am, klee12 <kle...@alum.mit.edu> wrote:
> Thanks for your reply Richard James.
>
> On Dec 5, 11:33 pm, Richard James <IWillGetOne@here> wrote:
>
> >Did you try?
> > rec cpt.wav

>
> Yes. I got my stream going and could hear it on the speaker. Then I
> issued the above command. When I played the wav file I got silence. I
> tried again, this time after the I got stream going, I disconnected
> the line to the speaker and connected it to line in on the computer
> and , issued the rec command. Again I got only silence.
>
> > Also if you are getting the source off the Internet there are ways of
> > capturing the sound inside your system. mplayer can use the -dumpstream
> > option. You can even capture real media video if you know how it works. But
> > for most streaming media you can try diverting it to disk instead via a
> > media player, not all players have such an option.

>
> I looked at the page source, and found the url for the stream. Then I
> did
>
> mplayerhttp://www.wsw.com/webcast/wa47/rt2/
>
> just to see I could get sound before trying to capture it. I got the
> error messages
>
> Playinghttp://www.wsw.com/webcast/wa47/rt2/.
> Resolvingwww.wsw.comfor AF_INET6...
> Couldn't resolve name for AF_INET6:www.wsw.com
> Resolvingwww.wsw.comfor AF_INET...
> Connecting to serverwww.wsw.com[66.246.249.49]: 80...
> Cache size set to 320 KBytes
> Cache fill: 0.25% (815 bytes)
> Win32 LoadLibrary failed to load: avisynth.dll, /usr/lib/codecs/
> avisynth.dll, /usr/lib/win32/avisynth.dll, /usr/local/lib/win32/
> avisynth.dll
>
> Evidently I'm missing avisynth.dll. Does anyone knows where I can get
> this codec? I googled avisynth and couldn't find what I think I want.
> Most of the references seemed to be for an avisynth scripting
> language.
>
> Thanks in advance for any help
>
> klee12


This is a generic mplayer error it throws out when it cannot handle a
media (or the address does not really point to a media file). It does
not need this dll.

For firefox you need to get some kind of plugin (mozdev) which will
allow mplayer to be activated. Then on the FireFox context menu (right-
click) "view info" you can get the correct address of the media file.
This correct address can be fed to mplayer on the command line (or
some other media player).
--
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #8 (permalink)  
Old 02-21-2008, 05:42 AM
Thomas Overgaard
 
Posts: n/a
Default Re: capturing sound


klee wrote :

> mplayer http://www.wsw.com/webcast/wa47/rt2/
>

MPlayer can only play files, not web-addresses. If you open the site in
a browser youll see a login site.

When you come up with the correct URL to the file then you can use the
'-dumpstream' option and MPlayer will dump the stream to ./stream.dump

> just to see I could get sound before trying to capture it. I got the
> error messages
>

They are just bogus messages telling you that MPlayer cant find the
file.
--
Thomas O.

This area is designed to become quite warm during normal operation.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #9 (permalink)  
Old 02-21-2008, 05:42 AM
Mark South
 
Posts: n/a
Default Re: capturing sound

On Thu, 06 Dec 2007 18:51:23 +0100, Thomas Overgaard wrote:

> klee wrote :
>
>> mplayer http://www.wsw.com/webcast/wa47/rt2/
>>

> MPlayer can only play files, not web-addresses. If you open the site in
> a browser youll see a login site.


Has anybody mentioned streamtuner? That can play streams from the
net and can record a stream with a mouse click or two.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #10 (permalink)  
Old 02-21-2008, 05:42 AM
Thomas Overgaard
 
Posts: n/a
Default Re: capturing sound


klee wrote :

> mplayer -dumpstream -dumpfile rt1.wav http://66.246.249.37/wa47.rt1.wma
>
> That works, more or less. However I can only play the captured file
> with mplayer; when I tried with audacious or play, I got various error
> messages.


I'm pretty sure thats because MPlayer doesn't convert the file from wma to
wav this way, use the file command to check. If you want a wav file then
you can get one this way:
mplayer rt1.wav -ao pcm:file=rt1-new.wav

Maybe you'll have to rename the downloaded file to rt1.wma first.
--
Thomas O.

This area is designed to become quite warm during normal operation.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump


All times are GMT. The time now is 05:06 PM.


Powered by vBulletin® Version 3.6.5
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.2.0
www.UnixAdminTalk.com