Opened 4 years ago
Closed 4 years ago
#8994 closed defect (invalid)
pulseaudio recording: alsa capture volume levels are automatically reset
Reported by: | cri | Owned by: | |
---|---|---|---|
Priority: | normal | Component: | ffmpeg |
Version: | unspecified | Keywords: | |
Cc: | Blocked By: | ||
Blocking: | Reproduced by developer: | no | |
Analyzed by developer: | no |
Description
Summary of the bug: when recording audio with -f pulse
ffmpeg doesn't respect the alsa capture volume levels previously set with alsamixer or amixer.
How to reproduce:
amixer -c 0 set 'Capture' cap amixer -c 0 set 'Capture' 20dB amixer -c 0 set 'Internal Mic' cap amixer -c 0 set 'Internal Mic Boost' 20dB ffmpeg -f pulse -i alsa_input.pci-0000_00_1b.0.analog-stereo -ac 1 out.m4a
Expected result: ffmpeg should record audio using the volume levels I set with amixer
.
Actual result: ffmpeg automatically resets audio levels: 'Capture' to 100%, 'Internal Mic Boost' to 0%
ffmpeg version 4.1.6 (Debian 10 package)
Change History (3)
comment:1 by , 4 years ago
comment:2 by , 4 years ago
Ah you're right, I finally found a clarification buried in the pulseaudio documentation:
https://www.freedesktop.org/wiki/Software/PulseAudio/Documentation/User/PulseAudioStoleMyVolumes/
Basically, pulseaudio will automatically adjust the low-level alsa mixer controls (mic level and
boost) to match the capture level currently set in pulseaudio for the recording source.
In fact the example in my first post shows a wrong approach: i.e. set mixer controls using
ALSA tools and then record using ffmpeg -f pulse format.
The right way is to choose either ALSA or pulse, and use the proper tools for initial setup
and the proper ffmpeg -f option.
- ALSA: use
amixer
oralsamixer
for setup, then useffmpeg -f alsa...
- PA: use
pactl
orpavucontrol
for setup, then useffmpeg -f pulse...
I guess you can close this ticket.
I very much doubt that this has anything to do with ffmpeg. It's just the way pulse works ignoring the software volume controls of alsa?
I suggest you try capturing with parec/parecord and see if the issue happens there as well or not.