Is it possible to record audio from different xvfb displays using ffmpeg screen capture

0

1

Using ffmpeg https://trac.ffmpeg.org/wiki/Capture/Desktop

pulseaudio screencapture

But if two such processes are running both the audios are getting mixed Is it possible we can record only the audio coming from a specific display

somya bhargava

Posted 2016-08-11T09:14:29.360

Reputation: 49

Answers

0

You can specify with ALSA to grab the audio from a specific application only and its documented on the page you linked, just had to click on the link for ALSA configurations.

ALSA Advanced Configuration

If you are using a server, you don't need a physical soundcard to record audio originating from an application on your system. Only really need a sound card for you to listen to sounds from applications and to record external sounds if card allows for it. In wiki for ALSA it does describe creating a dummy device for the purpose of recording from an application as its not necessary to have a physical sound card to capture it.

Frostalf

Posted 2016-08-11T09:14:29.360

Reputation: 429

Using a machine which doesnot have a soundcard actually .It is a server so using pulseaudio as a dummy audio – somya bhargava – 2016-08-11T09:56:32.310

@somyabhargava updated my answer to reflect why its not necessary to have a physical soundcard. – Frostalf – 2016-08-11T10:11:16.350

ffmpeg -s 1280x720 -framerate 30 -f x11grab -draw_mouse 0 -i :99.0+10,10 -f alsa -ac 1 -ar 44100 -i hw:99 output.mp4 tried this command but error came like cannot open audio device hw:99 (Invalid argument) – somya bhargava – 2016-08-11T10:23:01.717

https://trac.ffmpeg.org/wiki/Capture/ALSA#Recordaudiofromanapplication need to ensure that you setup the configs correctly, and you need to use LoopBack instead of specifing a number, as that means you are trying to access HW id 99 which most likely doesn't exist. – Frostalf – 2016-08-11T10:26:42.077