Dhruvin Bhatt
Dhruvin Bhatt

Reputation: 29

No Audio recorded with FFMPEG ALSA Loopback

I am trying to record screen with audio. I played an mp4 file with audio and video in browser and I tried the command specified here, and tried to save output to mp4 as well as mkv files. But the screen records with no audio. I have installed Alsa loopback with

sudo apt-get install linux-image-extra-virtual

modprobe snd-aloop

The outputs of arecord -l and aplay -l are arecord -l aplay -l

I have tried all hw devices like hw:0, hw:2, hw:0,1, hw:0,1,0

I am using Ubuntu 18.04 with FFMPEG version 4.0.3-1~18.04.york0

I have faced same issue with FFMPEG version 3.4.4-0ubuntu0.18.04.1

The same issue is also faced in Ubuntu 16.04 with FFMPEG version 4.0.3-1~16.04.york0.

Please help me solve this. I can not use any other packages like Simple-Screen-Recorder or PulseAudio, as the command which I am trying to run for an application uses only FFMPEG and Alsa Loopback, and is not changeable.

Upvotes: 2

Views: 2587

Answers (1)

nooitaf
nooitaf

Reputation: 1468

I was looking for an answer to record the alsa Loopback with ffmpeg.

This finally did the trick:

ffmpeg -f alsa -i hw:Loopback,1,0 rec.wav

I have to admit i use pavcontrol to send audio to the Loopback device.

Upvotes: 0

Related Questions