I am trying to capture video and audio from the screen, loudspeakers and microphone. I would like to do that with a command-line command.
So far,
ffmpeg -f x11grab -r 25 -s 800x600 -i :0.0 /tmp/outputFile.mpg
records video, and
ffmpeg -f alsa -ac 2 -i pulse -acodec libmp3lame -ab 128k ~/Videos/outpulse.mp3
records the audio of the microphone.
Both commands can be combined in:
ffmpeg -f x11grab -r 25 -s 800x600 -i :0.0 -f alsa -ac 2 -i pulse -acodec libmp3lame -ab 128k /tmp/outputFile.mpg
which records the screen and the microphone in the same file. This can be useful for tutorials.
How can I adapt the command above to record from the loudspeakers? Or to record microphone + loudspeaker at the same time? For example for a VoIP session. Obviously, the audio from the loudspeakers gets taped by the microphone, but that results in a very poor sound quality.
avconv
options are also welcome, but I don't want any tool that's not standard in Linux, GUI based, or not in the repositories.