How To Record Audio Stream?

Forum rules
Before you post read how to get help. Topics in this forum are automatically closed 6 months after creation.
Locked
User avatar
soundchaser59
Level 3
Level 3
Posts: 161
Joined: Tue Sep 20, 2016 1:36 am

How To Record Audio Stream?

Post by soundchaser59 »

I play in a band, and I record audio tracks from youtube to use when I practice at home, to learn the tunes. In Windows I used Sound Recorder. It would record whatever audio I could hear on the headphones, then save it as a wav file. I didn't have to tell it a source or anything , it just recorded any sound I could hear.

In Linux I can't figure out how to do this. I have Audacity, and I've tried to use the pulse audio controls, but no matter what I do Audacity records nothing, just silence. There is a long list of sources with names that don't mean much to me, even though I know what mic and line are. There is no record level in Audacity. The pulse audio thing gives me a horrible feedback loop if I select the wrong source in there. It only plays sound normally if I leave it set on built in audio. But Audacity still records silence, it has no input audio to record.

What am I missing? Or should I simply be using wavosaur instead?
phd21
Level 20
Level 20
Posts: 10104
Joined: Thu Jan 09, 2014 9:42 pm
Location: Florida

Re: How To Record Audio Stream?

Post by phd21 »

Hi "soundchaser59",

It would help to know more about your system setup. If you run "inxi -Fxzd" from the console terminal prompt, highlight the results, copy and paste them back here, that should provide enough information.

There are much easier methods to do this, rather than using the great "Audacity" sound editing application.

If you have not installed "ubuntu-restricted-extras" from the Software Manager or Synaptic Package Manager (SPM), then I would recommend that you do.

1.) You can use "YouTube-DL" or its desktop graphical application "YouTube-DLG" to download videos, or just their audio track(s), or both at one time. There are also browser add-ons (plug-ins) that can download videos or just their audio track(s). And, there is the wonderful "audio recorder" application, see below. There are also programs that can extract audio tracks from videos, like "SoundKonverter", "SoundConverter", Curlew, WinFF, FF Multi Converter, etc... Some desktop recording (screencasting) applications like "Simple Screen Recorder" can also record sound (audio) to audio files. And most good video editors can easily separate the audio track from a video and render that to an audio only file.

Multi-Platform Youtube-DL GUI: (youtube-dlg)
This can download (save) a video and or just its audio track, or both at one time
http://www.webupd8.org/2014/03/multi-pl ... utube.html
To install this using the PPA method, open a console terminal, type in, or copy & paste, each line below one by one:

sudo add-apt-repository ppa:nilarimogard/webupd8
sudo apt-get update
sudo apt-get install youtube-dl youtube-dlg


2.) You can also install one of the many browser add-ons to download videos from YouTube, some of which will provide a "download button" on the YouTube webpage, like "YouTube Video and Audio Downloader".
https://addons.mozilla.org/en-US/firefo ... w/?src=api

3.) "Audio Recorder" records sound from your system’s sound card, microphones, browsers, webcams, and more. This includes streaming audio and any audio that you can hear from your speakers (audio line out). It provides a timer that can start, stop, or pause recording at a given condition. And it allows you to select audio sources, and to choose the audio file format, etc.
phd21 wrote: I just installed this in Linux Mint 18 (could not find it for awhile), using the instructions below, and it works really well.
Information and how to Install Audio Recorder in Ubuntu 16.04 (Linux Mint 18) - in the repos for Mint 17.x
http://tipsonubuntu.com/2016/08/13/inst ... -04-16-10/
Another good article
http://ubuntuhandbook.org/index.php/201 ... -04-15-10/

To install this using the PPA method, open a console terminal, type in, or copy & paste, each line below one by one:

sudo add-apt-repository ppa:audio-recorder/ppa
sudo apt update
sudo apt-get install audio-recorder


4.) You might also consider installing this wonderful multi-media player, that can also record.

SMPlayer Sees New Release With MPV Support, Install via PPA, updates to current version including YouTube DL.

You can use the excellent "SMplayer" and "SMtube" to view videos and stuff from various websites.
Unlike other players SMplayer doesn't require you to install codecs to play something because it carries its own, all required codecs within itself.[/u][/color] This is the first release which now supports MPV and some other features such as MPRIS v2 Support, new theme, 3D stereo filter and more.
I recommend reading both web links below.

Web Upd8 - excellent Linux website - This article is for SMplayer & MPV
http://www.webupd8.org/2015/09/smplayer ... h-mpv.html

Noobslab - another excellent Linux website - This article on SMplayer and MPV
http://www.noobslab.com/2015/09/smplaye ... h-mpv.html

To install these using the PPA method, open a console terminal, type in, or copy & paste, each line below one by one:

sudo add-apt-repository ppa:rvm/smplayer
sudo add-apt-repository ppa:mc3man/mpv-tests
sudo apt-get update
sudo apt-get install mpv smplayer smtube youtube-dl

or for added smplayer themes and skins
sudo apt-get install mpv smplayer smtube smplayer-themes smplayer-skins youtube-dl

To setup MPV as base for SMplayer head over to tool bar Under "Options" menu select "Preferences" then under "General" write /usr/bin/mpv in MPlayer/mpv executable field,


Hope this helps ...
Last edited by phd21 on Thu Oct 27, 2016 2:37 pm, edited 7 times in total.
Phd21: Mint 20 Cinnamon & KDE Neon 64-bit Awesome OS's, Dell Inspiron I5 7000 (7573, quad core i5-8250U ) 2 in 1 touch screen
User avatar
trytip
Level 14
Level 14
Posts: 5367
Joined: Tue Jul 05, 2016 1:20 pm

Re: How To Record Audio Stream?

Post by trytip »

are you using the microphone jack or the line input? leave audacity alone for now and open sound preferences/input or pavucontrol/input devices (be sure it's not muted) and change to line in when you open audacity click the volume meter top right hand where it says click to start monitoring and test it out
Image
User avatar
all41
Level 19
Level 19
Posts: 9523
Joined: Tue Dec 31, 2013 9:12 am
Location: Computer, Car, Cage

Re: How To Record Audio Stream?

Post by all41 »

@soundchaser59
You can use YouTube-DL or its desktop graphical application "YouTube-DLG" to download videos, and or just their audio track(s), or both at one time.
+1 on what phd21 is saying here
Everything in life was difficult before it became easy.
User avatar
jimallyn
Level 19
Level 19
Posts: 9075
Joined: Thu Jun 05, 2014 7:34 pm
Location: Wenatchee, WA USA

Re: How To Record Audio Stream?

Post by jimallyn »

I used to record the sound from Youtube videos all the time, using PulseAudio and Audacity. Now I don't do that as much; usually I just download the video with youtube-dl. You might have a look at this thread:

viewtopic.php?f=48&t=232475
“If the government were coming for your TVs and cars, then you'd be upset. But, as it is, they're only coming for your sons.” - Daniel Berrigan
phd21
Level 20
Level 20
Posts: 10104
Joined: Thu Jan 09, 2014 9:42 pm
Location: Florida

Re: How To Record Audio Stream?

Post by phd21 »

Hi "soundchaser59", & Anyone Else Interested In This,

You now have many methods to easily record the music (audio) from any source, including YouTube.

You did not mention what musical instrument(s) that you play in your band?

I thought this might interest you and other musicians:

1.) There are programs that can let you control the playback of music, and other audio, files which can help with transcribing to sheet music (creating a music score), or for learning the songs, or for transcription to text, etc... "Transcriber" and "playitslowly" are in the Software Manager or Synaptic Package Manager (SPM).

Transcribe
https://www.seventhstring.com/xscribe/overview.html

2.) ScoLily - can record from microphone, and other sources, and automatically create sheet music, a music score. (install "Lilypond" first). "LilyPond" and "ScoLily" are in the Software Manager or Synaptic Package Manager (SPM)

LinuxMusicians.com - good website
madtom1999 wrote: Now that is something else - sing into a microphone and get a Lilypond score!
Well not my singing perhaps but it transcribed a couple of piano tunes near perfectly!
https://linuxmusicians.com/viewtopic.php?t=2638

https://community.linuxmint.com/software/view/scolily

3.) There are numerous music and audio applications, like the superb "Ardour" (version 3, or 4,5,6), the excellent "Rosegarden", this is very cool "Mixxx" (DJ), etc...

4.) Music notation and sheet music: LilyPond, MuseScore, NtED, Canorus, SongWrite, etc...

5.) If you look in the Software Manager or Synaptic Package Manager (SPM) for a particular musical instrument, like Guitar, or Piano, etc... there will be various applications for that as well.


Hope this helps ...
Phd21: Mint 20 Cinnamon & KDE Neon 64-bit Awesome OS's, Dell Inspiron I5 7000 (7573, quad core i5-8250U ) 2 in 1 touch screen
User avatar
Flemur
Level 20
Level 20
Posts: 10096
Joined: Mon Aug 20, 2012 9:41 pm
Location: Potemkin Village

Re: How To Record Audio Stream?

Post by Flemur »

Many youtube videos aren't downloadable and the easiest way to get the audio is what the OP wants to do - "record what you hear". I do it fairly regularly when two FF downloaders and youtube-dl don't work.

I don't have pulseaudio (used to), so this is a bit vague (but see links) - open

Code: Select all

pavucontrol
and you'll see on recording tab: "Analog output" and "Monitor of Analog output"
Select "MONITOR OF ANALOG..." and then you should be able to record "what you hear".

Like here:
http://manual.audacityteam.org/man/tuto ... linux.html
or here:
http://askubuntu.com/questions/171287/h ... put-device

You might have to install pavucontrol

Code: Select all

sudo apt-get install pavucontrol
and then either find it in your menus or run it from a terminal.

"audacity" is a good sound recording editing program, like adobe audition; set it's recording input to "pulseaudio".
If you need to install it

Code: Select all

sudo apt-get install audacity
Please edit your original post title to include [SOLVED] if/when it is solved!
Your data and OS are backed up....right?
User avatar
trytip
Level 14
Level 14
Posts: 5367
Joined: Tue Jul 05, 2016 1:20 pm

Re: How To Record Audio Stream?

Post by trytip »

audio-recorder with the built-in audio analogue stereo (audio output) source ... it's in synaptic and you can record in flac if you want to

Image

i forget if audio-recorder is in official repos. if not https://launchpad.net/~osmoma/+archive/ ... o-recorder for 14.04 and bellow and https://launchpad.net/~audio-recorder/+ ... ubuntu/ppa for 15.10 and above

no need to install the ppa just click on View package details and scroll down till you see the .deb file you can download
Image
MarkCnow

Re: How To Record Audio Stream?

Post by MarkCnow »

I wanted to record sound coming on to my Linux Mint 18.2 computer, therefore...

Installed "Sound Recorder" + PulseAudio Volume Control (pavucontrol)
All works great now!



Step by step...

From "Software Manager" I installed...
"Sound Recorder"

Only thing is no sound came out after trying to record.
What to do?

Searched the net and found and installed from "Software Manager"...
(Pavucontrol) = PulseAudio Volume Control

INFO HOW TO HERE:
viewtopic.php?t=232550

On the Output Devices tab, I selected to show "All Output Devices".
I wanted to see all that was going on.

That's all I did. Turned on a song, hit record...Don't know why or how but it works just beautifully.

Thank you to "Pavucontrol" and you too "Sound Recorder"


PulseAudio Volume Control (pavucontrol)

PulseAudio Volume Control (pavucontrol) is a simple GTK+ based volume control tool (mixer) for the PulseAudio sound server. In contrast to classic mixer tools this one allows you to control both the volume of hardware devices and of each playback stream separately. It also allows you to redirect a playback stream to another output device without interrupting playback.
Locked

Return to “Sound”