How to record the full screen with audio

audioffmpegrecording

If I want to record my desktop, I use:

ffmpeg -f x11grab -s `xdpyinfo | grep -i dimensions: | sed 's/[^0-9]*pixels.*(.*).*//' | sed 's/[^0-9x]*//'` -r 25 -i :0.0 -sameq valami.avi

But it doesn't save any audio — how can I include sound with the video?

Extra: How can I set on-the-fly encoding like with x264 + mp3:128kbit?

Best Answer

Just add -ad device_you_want_to_record

You might also want to tweak your audio codec.

This site has good examples: https://verb3k.wordpress.com/2010/01/26/how-to-do-proper-screencasts-on-linux/

Related Question