To load the module on boot, create /etc/modules-load.d/nf and add snd_aloop asoundrc to route all output devices to the loopback device so I could record everything I hear. I ended up with creating an alsa loopback device and a new. When I started to write this article I spent a lot of time to figure out a way to record everything that comes out of my laptop’s soundcard.
You need to have FFmpeg compiled with -enable-x11grab and -enable-libx264 to achieve this, so run $ ffmpeg to check the compile configuration of your FFmpeg version. In this article I will explain how to use the x11grab and the alsa input module to record a screencast as mp4 file with h264 video and aac audio. In order to record a screencast, you can use the x11grab input module for recording an X screen and the alsa input module for audio recording. FFmpeg is able to use audio and video streams from many different sources.