Record Skype or Zoom Calls with FFmpeg

This guide provides a straightforward, step-by-step tutorial on how to capture both screen video and call audio during a Skype or Zoom meeting using FFmpeg. You will learn the specific command-line configurations required for Windows, macOS, and Linux to capture high-quality video and merge internal system audio with your microphone input.


Understanding the Challenge: Audio Routing

To record a Skype or Zoom call successfully, FFmpeg must capture two audio sources simultaneously: your microphone (your voice) and your system’s output (the other participants’ voices).

On most operating systems, you will need to install a virtual audio loopback device (such as VB-Cable for Windows/Mac or BlackHole for Mac) to route both audio sources into a single input stream that FFmpeg can record.


Recording on Windows

Windows uses the gdigrab device for screen capture and dshow (DirectShow) for audio capture.

Step 1: Identify Your Audio Devices

Run the following command in your Command Prompt to list your available audio input devices:

ffmpeg -list_devices true -f dshow -i dummy

Locate the names of your microphone and your virtual audio cable (e.g., “Microphone (Realtek)” and “CABLE Output”).

Step 2: Run the FFmpeg Command

Replace the audio device names in the command below with the exact names identified in Step 1:

ffmpeg -f gdigrab -framerate 30 -i desktop -f dshow -i audio="CABLE Output" -f dshow -i audio="Microphone (Realtek)" -filter_complex "[1:a][2:a]amix=inputs=2[a]" -c:v libx264 -pix_fmt yuv420p -c:a aac -map 0:v -map "[a]" output.mp4

Recording on macOS

macOS uses the avfoundation framework for both screen and audio capture.

Step 1: Identify Your Input Indices

Run this command to list your screen, camera, and audio inputs:

ffmpeg -f avfoundation -list_devices true -i ""

Identify the index number for your screen (usually 1 or capture screen 0) and your audio device (e.g., a virtual device like BlackHole mapped to index 0).

Step 2: Run the FFmpeg Command

Use the corresponding device index numbers in the following format [video_index]:[audio_index]:

ffmpeg -f avfoundation -framerate 30 -i "1:0" -c:v libx264 -pix_fmt yuv420p -c:a aac output.mp4

Note: To capture both your microphone and the Zoom/Skype audio on macOS, create a “Multi-Output Device” in your Mac’s Audio MIDI Setup that includes both your headphones and your virtual audio driver (BlackHole).


Recording on Linux

Linux utilizes x11grab for capturing the X11 display and pulse (PulseAudio) to capture sound.

Step 1: Identify Your PulseAudio Monitor

Find the name of your system audio monitor and microphone using:

pactl list sources short

Step 2: Run the FFmpeg Command

Use the following command, replacing :0.0 with your target screen display ID and the audio inputs with your mapped PulseAudio sources:

ffmpeg -video_size 1920x1080 -framerate 30 -f x11grab -i :0.0 -f pulse -i default -c:v libx264 -pix_fmt yuv420p -c:a aac output.mp4

To capture both the system audio and your microphone on Linux, you can use PulseAudio’s module-loopback or configure a virtual source using pavucontrol (PulseAudio Volume Control) to mix the inputs before running FFmpeg.


Stopping the Recording

To safely stop recording without corrupting your video file, press q or Ctrl + C in your terminal window. FFmpeg will gracefully write the final metadata and save your output file.