Record Screen Without Mouse Cursor in FFmpeg

This article provides a quick guide on how to record your desktop screen using FFmpeg while completely hiding the mouse cursor. You will learn the specific command-line parameters required to disable cursor capture across Windows, macOS, and Linux operating systems.

To record your screen without capturing the mouse cursor, you must pass a specific “hide cursor” flag to the input device driver you are using. The parameter and input format vary depending on your operating system.

Windows (using gdigrab)

On Windows, the native device for desktop capture is gdigrab. To hide the cursor, add the -draw_mouse 0 option before the input.

Run the following command in your command prompt:

ffmpeg -f gdigrab -draw_mouse 0 -i desktop output.mp4

macOS (using avfoundation)

On macOS, FFmpeg uses the avfoundation library for screen recording. To hide the cursor, use the -capture_cursor 0 option.

Run the following command in your terminal:

ffmpeg -f avfoundation -capture_cursor 0 -i "1" output.mp4

Linux (using x11grab)

On Linux systems running the X11 window system, FFmpeg uses x11grab. To hide the cursor, use the -draw_mouse 0 option.

Run the following command in your terminal:

ffmpeg -f x11grab -draw_mouse 0 -video_size 1920x1080 -i :0.0 output.mp4