LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Slackware (http://www.linuxquestions.org/questions/slackware-14/)
-   -   Record audio output / audio that is played in a web browser (http://www.linuxquestions.org/questions/slackware-14/record-audio-output-audio-that-is-played-in-a-web-browser-4175462491/)

glupa4e 05-18-2013 12:43 PM

Record audio output / audio that is played in a web browser
 
Hello,
this is not a Slackware related issue but i decided to post it here because i didn't know where to post it actually. The moderators could move it to the relevant sub-forum.

I listen to streams (audio and video) that are played in a browser. I would like to record the audio in a local file. Either I have to somehow capture the output of the audio card / interface / device or capture the stream itself using another application. Does anyone have any idea how i could do this? To give you more information about the streams:
Audio Stream - http://www.538.nl/player/?player=rad...tion=nonstop40 . I could not get the stream URL from the page source actually.
Video Stream - http://www.538.nl/538tv/ . As far as i could understand from the source this is RTMP stream (rtmp://82.201.53.52:80/livestream). I want to record only the audio, not the video.
I tried to search for some solutions but i could not understand them. I have already installed rtmpdump, flvstreamer and VLC.
Every suggestion for a solution would be appreciated.

mrclisdue 05-18-2013 01:01 PM

I haven't tried this myself, but you piqued my curiosity, and this article somewhat reflects my initial thoughts:

http://ubuntuincident.wordpress.com/...ndcard-output/

cheers,

glupa4e 05-18-2013 01:57 PM

I do not have 'Capture Source'
 
Quote:

Originally Posted by mrclisdue (Post 4953831)
I haven't tried this myself, but you piqued my curiosity, and this article somewhat reflects my initial thoughts:

http://ubuntuincident.wordpress.com/...ndcard-output/

cheers,

Hello,
i tried this one. I do have a DELL machine but unfortunately i do not have a 'Capture Source'.
First, I added the .asoundrc file -->OK
I tried to run:
Code:

bash-4.2$ amixer contents
numid=11,iface=MIXER,name='Master Playback Switch'
  ; type=BOOLEAN,access=rw------,values=1
  : values=on
numid=10,iface=MIXER,name='Master Playback Volume'
  ; type=INTEGER,access=rw---R--,values=1,min=0,max=64,step=0
  : values=55
  | dBscale-min=-48.00dB,step=0.75dB,mute=1
numid=5,iface=MIXER,name='Headphone Playback Switch'
  ; type=BOOLEAN,access=rw------,values=2
  : values=on,on
numid=4,iface=MIXER,name='Headphone Playback Volume'
  ; type=INTEGER,access=rw---R--,values=2,min=0,max=64,step=0
  : values=55,55
  | dBscale-min=-48.00dB,step=0.75dB,mute=0
numid=17,iface=MIXER,name='PCM Playback Volume'
  ; type=INTEGER,access=rw---RW-,values=2,min=0,max=255,step=0
  : values=255,255
  | dBscale-min=-51.00dB,step=0.20dB,mute=0
numid=3,iface=MIXER,name='Mic Jack Mode'
  ; type=ENUMERATED,access=rw------,values=1,items=2
  ; Item #0 'Mic In'
  ; Item #1 'Line In'
  : values=1
numid=8,iface=MIXER,name='Mic Capture Volume'
  ; type=INTEGER,access=rw---R--,values=2,min=0,max=3,step=0
  : values=3,3
  | dBscale-min=0.00dB,step=10.00dB,mute=0
numid=7,iface=MIXER,name='Capture Switch'
  ; type=BOOLEAN,access=rw------,values=2
  : values=on,on
numid=6,iface=MIXER,name='Capture Volume'
  ; type=INTEGER,access=rw---R--,values=2,min=0,max=46,step=0
  : values=38,38
  | dBscale-min=-16.00dB,step=1.00dB,mute=0
numid=12,iface=MIXER,name='IEC958 Playback Con Mask'
  ; type=IEC958,access=r-------,values=1
  : values=[AES0=0x0f AES1=0xff AES2=0x00 AES3=0x00]
numid=13,iface=MIXER,name='IEC958 Playback Pro Mask'
  ; type=IEC958,access=r-------,values=1
  : values=[AES0=0x0f AES1=0x00 AES2=0x00 AES3=0x00]
numid=14,iface=MIXER,name='IEC958 Playback Default'
  ; type=IEC958,access=rw------,values=1
  : values=[AES0=0x04 AES1=0x00 AES2=0x00 AES3=0x00]
numid=15,iface=MIXER,name='IEC958 Playback Switch'
  ; type=BOOLEAN,access=rw------,values=1
  : values=on
numid=18,iface=MIXER,name='Digital Capture Volume'
  ; type=INTEGER,access=rw---RW-,values=2,min=0,max=120,step=0
  : values=60,60
  | dBscale-min=-30.00dB,step=0.50dB,mute=0
numid=9,iface=MIXER,name='Internal Mic Capture Volume'
  ; type=INTEGER,access=rw---R--,values=2,min=0,max=3,step=0
  : values=0,0
  | dBscale-min=0.00dB,step=10.00dB,mute=0
numid=2,iface=MIXER,name='Speaker Playback Switch'
  ; type=BOOLEAN,access=rw------,values=2
  : values=on,on
numid=1,iface=MIXER,name='Speaker Playback Volume'
  ; type=INTEGER,access=rw---R--,values=2,min=0,max=64,step=0
  : values=64,64
  | dBscale-min=-48.00dB,step=0.75dB,mute=0
numid=16,iface=PCM,name='ELD',device=3
  ; type=BYTES,access=r-------,values=0
  : values=

then i saw there was no 'Capture Source'. So my audio card does not support this kind of recording. ;-(

T3slider 05-18-2013 06:00 PM

Pulseaudio (or another jack-capable sound server) and jack (along with audacity or some other audio recording program) should work. Install jack, then build and install pulse, then build and install audacity. The following .asoundrc file would route all audio through pulse:
Code:

pcm.!default {
    type pulse
}
ctl.!default {
    type pulse
}

Then in jack (qjackctl is your best friend for this) you can route the audio from pulse to audacity and record whatever you are listening to. This shouldn't need hardware capture as far as I know. I can't stand pulse so when I did this in the past I would just run pulse when I needed to capture audio and not all the time (which required renaming the .asoundrc file to lose the pulse routing).

mrclisdue 05-18-2013 06:56 PM

I'm just thinking aloud here, but I'm wondering if one could use jack and bypass pulseaudio by directing jack's alsa_out to a file....

Hmmm, as I mentioned previously, this thread has me thinkin'

cheers,

jtsn 05-18-2013 07:18 PM

You can load snd-aloop, redirect your application to the new Loopback device using the ALSA_CARD environment variable. And then record the audio from there.

mrclisdue 05-18-2013 08:25 PM

Quote:

Originally Posted by jtsn (Post 4953989)
You can load snd-aloop, redirect your application to the new Loopback device using the ALSA_CARD environment variable. And then record the audio from there.

Nice, thank you.

cheers,

jlinkels 05-18-2013 11:16 PM

See this thread: http://ubuntuforums.org/archive/index.php/t-914405.html. The post by Buttons840. It worked for me. I am recording audio from Youtube all the time.

jlinkels

Woodsman 05-18-2013 11:49 PM

These streaming service providers like to hide the actual IP address.

I use streamripper to record music audio. I search for a related a winamp (pls) link for the URL.

For RTMP, I use rtmpdump. I wrote my own script wrapper based upon this how-to:

http://seperohacker.blogspot.com/201...-on-linux.html

Even with the script wrapper the process is manual but does find the true rtmp URL to download.

glupa4e 05-20-2013 08:19 AM

qjackctl configuration
 
Quote:

Originally Posted by T3slider (Post 4953961)
Pulseaudio (or another jack-capable sound server) and jack (along with audacity or some other audio recording program) should work. Install jack, then build and install pulse, then build and install audacity. The following .asoundrc file would route all audio through pulse:
Code:

pcm.!default {
    type pulse
}
ctl.!default {
    type pulse
}

Then in jack (qjackctl is your best friend for this) you can route the audio from pulse to audacity and record whatever you are listening to. This shouldn't need hardware capture as far as I know. I can't stand pulse so when I did this in the past I would just run pulse when I needed to capture audio and not all the time (which required renaming the .asoundrc file to lose the pulse routing).

hello,
i did the following so far:
1. installed jack-audio-connection-kit
2. run this command as explained in jack's readme: setcap cap_ipc_lock,cap_sys_nice=ep /usr/bin/qjackctl
3. installed qjackctl
4. installed pulseaudio
5. installed audacity
6. created .asoundrc with the content listed above
All the applications i installed with the default settings, no optional dependencies.

Please let me know how exactly i could redirect the audio from pulse to audacity in qjackctl?

jlinkels 05-20-2013 12:37 PM

Quote:

Originally Posted by glupa4e (Post 4954841)
Please let me know how exactly i could redirect the audio from pulse to audacity in qjackctl?

Did you read the link I posted for you?
If it doesn't work like that, jack might be in the way. I am not sure what it does, but pulse alone should be able to perform the task.

jlinkels

glupa4e 05-21-2013 01:08 AM

System sounds disappeared after installing jack/pulse
 
Hello,
now the system sounds disappeared after installing jack/pulse. Usually there is a startup sound when logging into KDE. Now this sound is gone and instead of that, there is a message reading that two of the devices have been removed. "Do you really want KDE to completely forget about them?". In addition to that, the sounds in Skype also disappeared and I cannot make audio calls any more.
Any idea how that could be fixed? Thanks!


All times are GMT -5. The time now is 07:59 PM.