LinuxQuestions.org
Visit Jeremy's Blog.
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 12-09-2021, 09:22 AM   #1
inkscape
Member
 
Registered: Dec 2011
Distribution: Slackware 14.1
Posts: 63

Rep: Reputation: Disabled
how to record audio output from browser


I listen to music through my browser, it adds reverberation and other effects to it from the browser add-on.
And now how to record other changed music to mp3 / ogg with my favorite settings.
How to record "what comes out of the browser when it comes to audio"
 
Old 12-09-2021, 09:48 AM   #2
teckk
LQ Guru
 
Registered: Oct 2004
Distribution: Arch
Posts: 5,412
Blog Entries: 7

Rep: Reputation: 1954Reputation: 1954Reputation: 1954Reputation: 1954Reputation: 1954Reputation: 1954Reputation: 1954Reputation: 1954Reputation: 1954Reputation: 1954Reputation: 1954
You can dump what is coming through the sound card to file. Some sound hardware will allow that. ffmpeg will do that for example.

Other sound devices will need you to make a virtual sound loopback device in alsa or pulse, and dump that steam to file.

Better solution is to find the source/url/rtsp/HLS playlist/mp3 of the sound stream and dump that to file.

Look at:
ffmpeg
ffplay
mplayer
mpv
aucadicy
vlc
etc.

Do you have a particular stream the you wish to dump?
 
Old 12-09-2021, 10:23 AM   #3
inkscape
Member
 
Registered: Dec 2011
Distribution: Slackware 14.1
Posts: 63

Original Poster
Rep: Reputation: Disabled
How to do this virtual loopback for alsa?
I don't have a specific stream.
I just listen to music, or via YouTube or bandcamp, turn on the browser plug
https://chrome.google.com/webstore/d...jbpfpiepjdpnpp
and now I need to rip it to disk to be able to listen to such effects and settings on another device, i.e. what comes out of the browser + plugin.

I have tried various players for the desktop or phone, but in my opinion none of them has such a nice sound that suits me.
So I'm looking for help on the forum
 
Old 12-09-2021, 10:39 AM   #4
teckk
LQ Guru
 
Registered: Oct 2004
Distribution: Arch
Posts: 5,412
Blog Entries: 7

Rep: Reputation: 1954Reputation: 1954Reputation: 1954Reputation: 1954Reputation: 1954Reputation: 1954Reputation: 1954Reputation: 1954Reputation: 1954Reputation: 1954Reputation: 1954
Quote:
Features:
- Volume control (up to 400% boost).
- Bass boost level
- Audio Limiter / Compressor.
- Equalizer 32hz-16khz
- Stereo / Mono toggle.
- Stereo / Mono Pan.
- Save your own presets
ffmpeg, ffplay. mplayer, mpv will do all of that.

Quote:
How to do this virtual loopback for alsa?
Do a search for alsa virtual loopback device.

Examples:
https://unix.stackexchange.com/quest...sa-loop-device
https://stackoverflow.com/questions/...card-with-alsa
https://linux.die.net/man/1/alsaloop
https://sysplay.in/blog/linux/2019/0...pback-devices/
https://bbs.archlinux.org/viewtopic.php?id=181922

I never do that. I find the source of the audio and download that.
 
Old 12-09-2021, 01:29 PM   #5
inkscape
Member
 
Registered: Dec 2011
Distribution: Slackware 14.1
Posts: 63

Original Poster
Rep: Reputation: Disabled
I can't apply it. I would need step by step instructions.
 
Old 12-09-2021, 03:23 PM   #6
computersavvy
Senior Member
 
Registered: Aug 2016
Posts: 3,345

Rep: Reputation: 1486Reputation: 1486Reputation: 1486Reputation: 1486Reputation: 1486Reputation: 1486Reputation: 1486Reputation: 1486Reputation: 1486Reputation: 1486
Quote:
Originally Posted by inkscape View Post
I can't apply it. I would need step by step instructions.
Try a little bit of experimentation, and reading the man or info pages as well as searching for tutorials. You may learn something.
This is how I learn to do everything I do as an admin.
 
Old 12-09-2021, 08:42 PM   #7
frankbell
LQ Guru
 
Registered: Jan 2006
Location: Virginia, USA
Distribution: Slackware, Ubuntu MATE, Mageia, and whatever VMs I happen to be playing with
Posts: 19,891
Blog Entries: 28

Rep: Reputation: 6347Reputation: 6347Reputation: 6347Reputation: 6347Reputation: 6347Reputation: 6347Reputation: 6347Reputation: 6347Reputation: 6347Reputation: 6347Reputation: 6347
You might want to take a look at jack.
 
Old 12-10-2021, 06:28 AM   #8
ondoho
LQ Addict
 
Registered: Dec 2013
Posts: 19,872
Blog Entries: 12

Rep: Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053
Quote:
Originally Posted by inkscape View Post
I listen to music through my browser, it adds reverberation and other effects to it from the browser add-on.
(...)
How to record "what comes out of the browser when it comes to audio"
This should be possible with pulseaudio:
https://askubuntu.com/questions/6083...ith-pulseaudio

With ALSA only it is going to be very painful.

Let me just add my personal opinion: I think this is a bad idea. The audio quality won't be very good, you won't be able to change the effects you applied later etc. Much better to actually download the audio stream (check out yt-dlp), and apply effects during playback.
 
Old 12-13-2021, 11:09 AM   #9
inkscape
Member
 
Registered: Dec 2011
Distribution: Slackware 14.1
Posts: 63

Original Poster
Rep: Reputation: Disabled
.asoundrc

Code:
pcm.!default {
  type asym
  playback.pcm "LoopAndReal"
  capture.pcm "hw:0,0"
}
pcm.LoopAndReal {
  type plug
  slave.pcm mdev
  route_policy "duplicate"
}
pcm.mdev {
  type multi
  slaves.a.pcm pcm.MixReale
  slaves.a.channels 2
  slaves.b.pcm pcm.MixLoopback
  slaves.b.channels 2
  bindings.0.slave a
  bindings.0.channel 0
  bindings.1.slave a
  bindings.1.channel 1
  bindings.2.slave b
  bindings.2.channel 0
  bindings.3.slave b
  bindings.3.channel 1
}
pcm.MixReale {
  type dmix
  ipc_key 1024
  slave {
    pcm "hw:0,0"
    rate 48000
    #rate 44100
    periods 128
    period_time 0
    period_size 1024 # must be power of 2
    buffer_size 8192
  }
}
pcm.MixLoopback {
  type dmix
  ipc_key 1025
  slave {
    pcm "hw:Loopback,0,0"
    rate 48000
    #rate 44100
    periods 128
    period_time 0
    period_size 1024 # must be power of 2
    buffer_size 8192
  }
}
reboot

Code:
sudo modprobe snd-aloop
and works

rec via terminal or audacity

thanks for guidance pointers
 
  


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
Record audio output / audio that is played in a web browser glupa4e Slackware 11 05-21-2013 12:08 AM
Record audio from several audio cards in MP3 / 30 minutes chunks alfredoyong Linux - General 2 08-30-2011 03:44 AM
ubuntu studio record jack audio output librano Ubuntu 2 01-25-2007 01:23 PM

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

All times are GMT -5. The time now is 12:27 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
Open Source Consulting | Domain Registration