Linux desktop screen recorder for X11 written in Nim with NiGui and FFmpeg.
It provides a desktop preview inside the main window, region and window capture modes, optional webcam-window support, and an FFmpeg-based recording backend.
- Desktop preview panel with a draggable and resizable capture rectangle
- Settings are persistant between launches
- Project settings for project name and output folder
- Built-in recording profiles for tutorial, shorts, and demo workflows
- Capture settings for region or window mode, presets, width, height, X, Y, selected window, and aspect-ratio feedback
- Recording settings for FPS, duration, countdown, audio mode, microphone/system sources, encoder, output format, quality, and optional auto-hide
- Configurable global hotkeys using
Ctrl+Alt+<Key>for record and pause - Optional webcam window driven by
ffplay - FFmpeg subprocess backend for X11 screen capture
- Pause/resume support for active recordings
- Desktop notifications for start, pause, resume, stop
- FFmpeg log files
- History actions for opening the latest recording, copying paths, and opening the last FFmpeg log
- Recent recordings history in the
Historysection - Optional MKV-to-MP4 remux
- Nim 2.2+
- NiGui
Required for the compiled app:
ffmpeg- GTK3 runtime libraries
- Linux desktop session
- X11 display
Optional, depending on features:
ffplayfor the webcam window featurexdotoolforWindowcapture modenotify-sendfor desktop notificationspactlfor audio-source discoveryxdg-openforOpen Folder
The app still works for basic region recording if optional tools are missing, but the related features will not. Unavailable optional features are disabled in the UI automatically.
Run directly with Nim:
nim c -r src/NimScreenRecorder.nimRelease build:
nim c -d:release -r src/NimScreenRecorder.nimNimble tasks:
nimble Debug
nimble Release
nimble ReleasePortableAll Nimble tasks place the binary in ./bin.
Release: normal local release build using compiler defaultsReleasePortable: portable x86-64 release build for wider Linux compatibility
For a compiled release tree, install the app user-local with:
./install-user.shThat installs:
- the binary into
~/.local/bin - the desktop launcher into
~/.local/share/applications - the icons into
~/.local/share/icons/hicolor
Run the install script again after icon or desktop-file changes so the launcher metadata is refreshed.
Remove the user-local install with:
./uninstall-user.sh- Start the app.
- Set a project name if you want named output files.
- Choose or browse to an output folder.
- Pick a profile if you want a quick starting point:
TutorialShortsDemoManual edits automatically switch back toCustom.
- Choose a capture mode:
Region: use the preview panel or the X/Y/Width/Height fields.Window: clickPick Window, then click the X11 window you want to record.
- Choose recording settings:
- FPS
- duration
- countdown
- audio mode
- microphone source if microphone audio is enabled
- system source if system audio is enabled
- refresh audio sources if needed
- encoder
- format
- optional MKV-to-MP4 remux
- quality
- If you want the webcam visible in the recording, stay in
Regionmode and enableShow webcam window. - Choose the record and pause hotkey keys in
Recording Settingsif you do not want the defaults. - Start recording with the button or the configured
Ctrl+Alt+<Record Key>hotkey. - If a countdown is enabled, the preview panel shows a countdown overlay before recording starts.
- Pause or resume with the
Pause Recordingbutton or the configuredCtrl+Alt+<Pause Key>hotkey. - Stop recording with the button or the configured record hotkey.
- Use the
Historysection after a recording finishes:Open Latest,Copy Latest Path,Open Selected,Copy Selected Path, orOpen Last Log.
Region
- The preview panel is editable.
- You can drag and resize the capture rectangle.
- Webcam window support is available.
Window
- The selected X11 window is recorded directly with
-window_id. - Preview editing is locked to the selected window bounds.
- Window bounds are refreshed automatically before recording starts.
- If the selected window is gone, the selection is cleared and you are prompted to pick again.
- Use
Refresh Boundsif the target window moves or resizes before recording. - Webcam window support is disabled in this mode because the webcam is a separate window.
- If
xdotoolis missing, window capture is unavailable and the UI stays inRegionmode.
libx264
- software encoder
- best compatibility
- higher CPU usage
VAAPI
- hardware encoder for supported Linux GPU stacks
- lower CPU usage
- often better for high-resolution or high-FPS recording
NVENC
- hardware encoder for NVIDIA GPUs
- only shown when supported by both FFmpeg and local hardware
None
- records video only
Microphone
- records the selected microphone source
System
- records the selected Pulse monitor source
Microphone + System
- records both and mixes them into one track
The webcam is not composited into FFmpeg.
When Show webcam window is enabled:
- the app launches a separate webcam window with
ffplay - the webcam can be mirrored
- you place that window inside the recording area
- the desktop recording captures it like any other window
If ffplay is missing, the webcam controls stay disabled and the app continues to work without the webcam feature.
src/NimScreenRecorder.nim: binary entrypointsrc/ui.nim: window layout and UI bindingssrc/state.nim: recorder state, presets, validation, and environment detectionsrc/preview.nim: desktop preview widget and region selection logicsrc/ffmpeg.nim: FFmpeg argument generation for screen recordingsrc/recorder.nim: FFmpeg recording subprocess lifecyclesrc/restorefix.nim: Linux/X11 window restore workaround for global-hotkey stopsrc/windowpicker.nim: X11 window selection and geometry lookup viaxdotoolsrc/webcam.nim: webcam device detection andffplaywindow lifecycle
- Preview refreshes by capturing desktop screenshots with FFmpeg.
- Default output directory is
~/Videos/<Project Name>. - If the project name is blank, the output file name falls back to a timestamp.
- Output folder paths are normalized before recording.
- Most settings are saved to
~/.config/NimScreenRecorder/settings.jsonand restored on the next launch. - Encoder choices are limited to what the local FFmpeg build and hardware can actually use.
- Recording format can be switched between
MP4andMKV. - The default output format is
MKVbecause it is safer if a recording stops unexpectedly. - If
Remux MKV to MP4 after stopis enabled, the app keeps the MKV recording and also creates an MP4 copy. - Quality presets map to simple defaults for the selected encoder:
Fast,Balanced, andHigh. Hide app window while recordingminimizes the app and restores it again when recording stops.- Pausing closes the current recording segment and resuming starts a new one.
- The final output is assembled from those segments, so paused time is skipped instead of appearing as a frozen section.
- The window icon changes between idle, recording, and paused states when the desktop honors runtime icon updates.
- When
Hide app window while recordingis enabled, desktop notifications provide state feedback even if the taskbar icon does not change live. - If FFmpeg exits unexpectedly, the app shows the failure and stores a
.ffmpeg.logfile next to the intended output file. - If
ffplayorxdotoolare missing, the related webcam or window-capture features will not be available. - The recent recordings list stores the latest completed output paths and keeps the newest entries first.
