Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.debian.user > #233519

Re: how to record sound to mp3 [wav, for those who can]

From Linux-Fan <Ma_Sys.ma@web.de>
Newsgroups linux.debian.user
Subject Re: how to record sound to mp3 [wav, for those who can]
Date 2021-03-26 00:20 +0100
Message-ID <BWHqF-1FR-1@gated-at.bofh.it> (permalink)
References <BWwYh-3q7-1@gated-at.bofh.it> <BWxhD-3wP-3@gated-at.bofh.it> <BWAIy-5Ls-9@gated-at.bofh.it> <BWBlg-5Zw-13@gated-at.bofh.it> <BWGbf-H4-1@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


[Multipart message — attachments visible in raw view] - view raw

David Wright writes:

> On Thu 25 Mar 2021 at 17:40:51 (+0100), Nicolas George wrote:
> > David Wright (12021-03-25):

[...]

> > > To record, you could type, for example, in another xterm:
> > >
> > > $ arecord -d 10 -f cd -v -v -v -D plughw:0,0 /tmp/audiofile.wav
> >
> > This command does not record the sound being played.
>
> … on your machine. That's why I wrote "If you can't get ALSA to work…".
> You're a candidate for pulseaudio, I assume.

Not sure about that command above (no means to try it just now), but _with_  
PulseAudio, I can record the sound that is being played back just fine by  
means of "monitor" audio devices. E.g. I have the following command to  
record my screen (`0:v`), the "monitor" device (`1:a`) and a microphone  
(`2:a`):

exec ffmpeg -video_size 1600x1200 -framerate 12 -f x11grab -i :0.0+0,0 -f pulse -ac 2 -i 0 -f pulse -i 1 -c:v libvpx-vp9 -deadline realtime -b:v 2M -c:a libvorbis -map 0:v -map 1:a -map 2:a "recording.webm"

adapted from these two sources:

 -> https://trac.ffmpeg.org/wiki/Capture/Desktop
 -> https://askubuntu.com/questions/682144/capturing-only-desktop-audio-with-ffmpeg

It may of course be true that the hardware _does_ support/accellerate this  
monitoring capability, but it does not seem to be entirely uncommon a  
feature? Here, it even works inside virtual machines :)

Btw. the existence of monitor devices can be checked in `pavucontrol` where  
under "Output" it lists two monitor devices here: One for the HDMI output  
and one for the "Built-in Analog Stereo" Output.

> AFAICT, this recording facility is getting harder to find on most
> computers, if you're not prepared to fork out for a sound card.
> I've been fortunate, in that just as my ancient Pentium III expired,
> I have acquired a Dell Precision T3500 which has a well endowed
> (integrated) sound card.
>
> I'm still finding my way round it: for example, it also has HDMI
> playback, but I haven't yet worked out how to exploit it. The machine
> has one DVI output and two DisplayPorts, so I need to find a
> DisplayPort/HDMI adapter to see if that would yield anything.

[...]

As far as I can tell, DisplayPort can transport audio without the need for  
an HDMI adapter. Here, a Radeon Pro W5500 graphics card is connected to a  
Dell U2713HM display which has one HDMI, DP, VGA and DVI input each. The  
W5500 is connected to the DisplayPort and if I play sound to the "HDMI"  
output, the display outputs that sound through its headphones socket.

Similar to your case, there are no HDMI ports on the graphics card.
In my case, it is only DisplayPorts.

HTH
Linux-Fan

öö

Back to linux.debian.user | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

Re: how to record sound to mp3 "Susmita/Rajib" <bkpsusmitaa@gmail.com> - 2021-03-25 13:10 +0100
  Re: how to record sound to mp3 Long Wind <longwind2@yahoo.com> - 2021-03-25 13:30 +0100
    Re: how to record sound to mp3 <tomas@tuxteam.de> - 2021-03-25 13:40 +0100
    Re: how to record sound to mp3 David Wright <deblis@lionunicorn.co.uk> - 2021-03-25 17:10 +0100
      Re: how to record sound to mp3 Nicolas George <george@nsup.org> - 2021-03-25 17:50 +0100
        Re: how to record sound to mp3 ghe2001 <ghe2001@protonmail.com> - 2021-03-25 18:00 +0100
        Re: how to record sound to mp3 [wav, for those who can] David Wright <deblis@lionunicorn.co.uk> - 2021-03-25 23:00 +0100
          Re: how to record sound to mp3 [wav, for those who can] Nicolas George <george@nsup.org> - 2021-03-25 23:30 +0100
            Re: how to record sound to mp3 [wav, for those who can] <tomas@tuxteam.de> - 2021-03-26 08:40 +0100
              Re: how to record sound to mp3 [wav, for those who can] Michael Lange <klappnase@freenet.de> - 2021-03-26 09:50 +0100
                Re: how to record sound to mp3 [wav, for those who can] Michael Lange <klappnase@freenet.de> - 2021-03-26 10:20 +0100
            Re: how to record sound to mp3 [wav, for those who can] David Wright <deblis@lionunicorn.co.uk> - 2021-03-26 17:10 +0100
          Re: how to record sound to mp3 [wav, for those who can] Linux-Fan <Ma_Sys.ma@web.de> - 2021-03-26 00:20 +0100
      Re: how to record sound to mp3 Long Wind <longwind2@yahoo.com> - 2021-03-25 19:40 +0100
        Re: how to record sound to mp3 Greg Wooledge <greg@wooledge.org> - 2021-03-25 19:50 +0100
          Re: how to record sound to mp3 Nicolas George <george@nsup.org> - 2021-03-25 20:00 +0100
            Re: how to record sound to mp3 Greg Wooledge <greg@wooledge.org> - 2021-03-25 20:20 +0100
              Re: how to record sound to mp3 Nicolas George <george@nsup.org> - 2021-03-25 21:00 +0100
            Re: how to record sound to mp3 Celejar <celejar@gmail.com> - 2021-03-25 21:30 +0100

csiph-web