Onscreen video capture no sound

Using

ffmpeg -video_size 1920x1080 -framerate 25 -f x11grab -i :0.0+0,0 -f alsa -ac 2 -i pulse -acodec mp3 -strict experimental output.mpg

I can capture video playing on my screen and play it using smplayer, but I get no sound. What am I doing wrong?

You should first check wich sources are available. Because x11grab is not available by default:

ffmpeg -sources


man ffmpeg provides more help in this case…

Additional some important informations are missing:
What are you doing and how? You try to do a screen capture? Which sound do you try to record? Where is the sound coming from? An additional player or browser or what? Are you playing a video in an unknown player and try to capture the sound?..

Some additional examples how to make it work.
https://trac.ffmpeg.org/wiki/Capture/Desktop

Thanks for the link. I was able to extract sound using one of the examples.