Okay, after fiddling for an hour I found the solution.
At first I got pulseaudio output source by running pactl list short sources
. Which showed me this list -
0 alsa_input.usb-046d_0825_3AC10B90-02.mono-fallback module-alsa-card.c s16le 1ch 48000Hz RUNNING
1 alsa_output.pci-0000_06_00.1.hdmi-stereo.monitor module-alsa-card.c s16le 2ch 44100Hz RUNNING
2 alsa_output.pci-0000_06_00.6.analog-stereo.monitor module-alsa-card.c s16le 2ch 44100Hz RUNNING
3 ladspa_output.mbeq_1197.mbeq.monitor module-ladspa-sink.c float32le 2ch 44100Hz RUNNING
In my case the source is ladspa_output.mbeq_1197.mbeq.monitor
.
Finally I ran this command selecting the output source -
ffmpeg -f x11grab -s 1920x1080 -i :0.0 -f pulse -i ladspa_output.mbeq_1197.mbeq.monitor -c:a ac3 -c:v libx265 -crf 22 -preset slower ~/Videos/Recording-$(date +%F-%I-%M-%N).mp4
Hope this helps.