Record screen + audio with FFMpeg

$480 for Camstasia? I think not. CamStudio? Buggy as hell. Luckily, we have an excellent FREE cross-platform tool that let’s us easily create a video-recording of your desktop including audio: FFMpeg.

If you are running Windows, download the x64 here.

Extract the downloaded archive and open a command prompt in the bin folder.

To check your version:
ffmpeg --version

ffmpeg version N-79630-g9ac154d Copyright (c) 2000-2016 the FFmpeg developers

To show available input devices for audio:
ffmpeg -list_devices true -f dshow -i dummy

DirectShow audio devices
“Microphone (5- Webcam C170)”

This is the magic string you’ll need to specify in the next, awesome command.

ffmpeg -y -f dshow -i audio="Microphone (5- Webcam C170)" -f gdigrab -video_size 1920x1080 -i desktop -vcodec h264 my-screen-with-audio.mkv

This will record your screen at full-hd encoded using h264 and including audio sourced from your microphone. When you want to stop the recording, press Ctrl+C in command prompt and your video file will be ready, too easy!

If you want to record the screen only (no audio), use:
ffmpeg -f gdigrab -offset_x 0 -offset_y 0 -video_size 1920x1080 -i desktop -vcodec h264 my-screen-only.mkv

Thank you FFMpeg developers!