recording pulseaudio output

What other apps and distros do you use to round out your studio?

Moderators: khz, MattKingUSA

morgon
Established Member
Posts: 3
Joined: Thu Nov 21, 2019 6:20 pm

recording pulseaudio output

Postby morgon » Thu Nov 21, 2019 6:35 pm

Hi,

On my debian system firefox uses the pulseaudio-sink "alsa_output.pci-0000_01_05.1.hdmi-stereo".
This is what I would like to record.

So I simply tried to record the monitor-sink like this:

Code: Select all

parec --format=s16le -d alsa_output.pci-0000_01_05.1.hdmi-stereo.monitor > out.raw


And that works. However there seems to be a problem: The volume of the recording is pretty low.

However when I create a null-sink ("pactl load-module module-null-sink sink_name=whatever"), direct the firefox output to this null-sink and record that I get a recording with proper volume level.

Why do these volume-levels differ?
Why is does recording from a "regular" sink result in lower volume as opposed to recording a null-sink?

So can someone explain to me what is happening here and what the preferred way to record a pulseaudio-sink is?

Many thanks!

User avatar
bluebell
Established Member
Posts: 1242
Joined: Sat Sep 15, 2012 11:44 am
Location: Saarland & Frankfurt, Germany

Re: recording pulseaudio output

Postby bluebell » Thu Nov 21, 2019 10:03 pm

On my systems pulseaudio is configured to use jack-sink. My main audio system is jack. Recording pulseaudio clients (e.g. Firefox) with jack clients (e.g. Audacity) makes no problems. The volume is ok.
Linux – MOTU UltraLite AVB – Qtractor – https://soundcloud.com/suedwestlicht

User avatar
thetotalchaos
Established Member
Posts: 161
Joined: Mon Sep 29, 2014 8:29 pm
Contact:

Re: recording pulseaudio output

Postby thetotalchaos » Fri Nov 22, 2019 7:16 pm

I will recommend to use pavucontrol. It gives you more options, compared to your desktop environment's volume control app. Use alsamixer (qasmixer, gnome-alsamixer) to check if your alsa levels are correct. For example my alsa volume level defaults on 40%, which makes my output very quiet, regardless of the level of pulseaudio out.
For recording i use "Cadence jack renderer", which is built in Cadnce by default. I am having a monitor channels activated. And i am using Meterbridge to help optimize the volume levels
Check out my latest music album The girl with the stars in her eyes
https://totalchaos-music.bandcamp.com/album/the-girl-with-the-stars-in-her-eyes

User avatar
nikgnomicradio
Established Member
Posts: 90
Joined: Wed Feb 07, 2018 9:31 pm
Contact:

Re: recording pulseaudio output

Postby nikgnomicradio » Sat Nov 23, 2019 7:18 am

check volume levels for the pulseaudio sinks

Code: Select all

pactl list sinks | grep -e 'Name' -e 'Volume'


presumably null-sink is by-passing level control for regular sink set with level lower than 100%

would get same level for recording if regular sink was set to 100%, but likely would be too loud for comfortable listening

adding null-sink allows control of recording level that is not affected by level setting for listening

morgon
Established Member
Posts: 3
Joined: Thu Nov 21, 2019 6:20 pm

Re: recording pulseaudio output

Postby morgon » Sat Nov 23, 2019 5:18 pm

I think there is something that I may not quite understand about volume.

When I have a sink that is connected to a speaker, record the monitor of that sink with parec and play back the recording with paplay, I would expect to get the hear the same volume level (which is not what is happening which makes me infer that there is something wrong).

But maybe I simply don't understand how things work.

Is my expectiation that a recording would preserve the volume level valid?


Return to “Linux Distributions & Other Software”

Who is online

Users browsing this forum: No registered users and 2 guests