[FFmpeg-user] Fwd: Cannot capture audio in screen recording
barsnick at gmx.net
Tue Sep 11 15:03:06 EEST 2018
On Tue, Sep 11, 2018 at 15:46:11 +0530, Abhijit Nathwani wrote:
> > Could it be that your ALSA capture device's recording is muted?
> I don't know. How to ensure that?
ALSA's command line tools' syntax is truly difficult (PITA, if you know
what the term means). You can use the command "amixer" to display the
present state. You can use a "GUI" (ncurses) program such as
"alsamixer" to graphically display all ports' states. Some may show
"[off]". You need to switch the recording port "[on]". I used to do
this with "amixer" or possibly "alsactl", when I was still using ALSA
directly, but it took me days to figure out the syntax. My notes say I
did something like this:
$ amixer eset 'Input Gain Switch',0,Switch2 on
$ amixer eset 'Line Switch',0,Switch2 capture
$ amixer eset 'Input Gain Volume',0,Volume1 9
Modern ALSA or newer frontends may be nicer.
> abhijit at AHMCPU2092:~$ ffmpeg -i /home/abhijit/test_1036.mp4 -map 0:a -af volumedetect -f null -
> [Parsed_volumedetect_0 @ 0x12b2ac0] n_samples: 2899968
> [Parsed_volumedetect_0 @ 0x12b2ac0] mean_volume: -91.0 dB
> [Parsed_volumedetect_0 @ 0x12b2ac0] max_volume: -91.0 dB
> [Parsed_volumedetect_0 @ 0x12b2ac0] histogram_91db: 2899968
Indeed, that's absolute silence.
> When I run arecord with default device,
> $ arecord -d 10 /tmp/test-mic.wav ,
> this records from my microphone and plays well. When I specify the device
> with "hw:", like,
> $ arecord -D hw:0,1,0 -d 10 -f S16_LE /tmp/test-mic3.wav
> , I don't hear any audio from my microphone nor the youtube player.
So obviously, the mapping hw:0,1,0 is incorrect? Again, first check the
More information about the ffmpeg-user