Capturing ONLY desktop audio with ffmpeg
pavucontrol
- Install
pavucontrol
. - Start recording with
ffmpeg
(see example commands below). - Start
pavucontrol
. - Go to the Recording tab and you'll find
ffmpeg
orLavf56.15.102
(or similar) listed there. - Change audio capture from Internal Audio Analog Stereo to Monitor of Internal Audio Analog Stereo.
Now it should record system and application audio instead of the microphone.
This setting will be remembered. The next time you want to capture with ffmpeg
, it will automatically start recording system audio. If you want to revert this, use pavucontrol
again to change back to microphone input.
The text above was adapted from HOWTO: Screencasting on Linux.
example ffmpeg commands
audio only
ffmpeg -f pulse -i default output.wav
with screen capture
ffmpeg -f x11grab -video_size 1360x768 -framerate 30 -i :0.0 -f pulse -i default -preset ultrafast -crf 18 -pix_fmt yuv420p out.mkv