[FFmpeg-user] How would you record a single window's video and audio on Linux?
lou at lrcd.com
Wed Jul 6 20:28:29 CEST 2016
On Tue, 5 Jul 2016 23:50:23 -0400
John Lewis <oflameo2 at gmail.com> wrote:
> How would you record a single window's video and audio on Linux? I
> usually see things in an x11 window and hear things via pulseaudio. I am
> currently running Debian 8 with XFCE if that makes a difference.
xwininfo will tell you the appropriate coordinates, then refer to
Width, Height, Absolute upper-left X, and Absolute upper-left Y. Use
these values for x11grab.
As for pulseaudio, it is probably easiest to:
1. Install pavucontrol
2. Start recording with ffmpeg
3. Start pavucontrol
4. Go to the Recording tab and you'll find "ffmpeg" or "Lavf*" (or
similar) listed there
5. Change audio capture from "Internal Audio Analog Stereo" to "Monitor
of Internal Audio Analog Stereo"
The above list is adapted from: http://askubuntu.com/a/682793/59378
Now it should record "desktop" audio instead of the microphone. I don't
use pulsaudio, so I don't know if you can change it to record only a
So the inputs section of your command may look something like:
ffmpeg -f x11grab -video_size <Width>x<Height> -i :0.0+<X>,<Y> -f pulse -i default ...
More information about the ffmpeg-user