A powerful, interactive terminal-based screen recorder for Linux (X11), built in C++17 + ncurses, powered by FFmpeg.
โก Industrial-grade TUI โข Keyboard + Mouse support โข Safe & robust
- FFmpeg-powered recording (
libx264 + AAC) - Real-time screen capture via X11 (x11grab)
- Automatic scaling (capture native โ downscale if needed)
- Clean shutdown via
q(prevents corruption)
- Fully interactive multi-step UI
- Keyboard + mouse support
- Highlighted menus, dialogs, sliders, and input boxes
- Help screen with full keybindings
- Live status + structured workflow
- 720p / 1080p / 1440p / 4K
- Native screen resolution (auto-detected)
- 24 FPS (cinematic)
- 30 FPS (balanced)
- 60 FPS (smooth gameplay)
- No audio mode
- Default system audio (PulseAudio monitor)
- Custom audio device selection (auto-detected sinks)
-
Presets:
- Ultrafast / Fast / Medium / Slow
-
CRF slider (0โ51) for fine quality control
-
Toggle mouse cursor visibility
-
Pixel format optimized for compatibility (
yuv420p)
-
Interactive filename input
-
Auto
.mp4handling -
Path validation:
- Prevents invalid characters
- Checks directory existence
- Verifies write permissions
-
Overwrite confirmation dialog
-
Auto-detects:
- Screen resolution (
xdpyinfo/xrandr) - DISPLAY environment
- PulseAudio monitor device
- Screen resolution (
-
Lists available audio sinks dynamically
- Dependency checker (ffmpeg, pactl, xdpyinfo)
- Disk space validation (warns < 500MB)
- Terminal size validation
- Input sanitization (prevents unsafe filenames)
-
Persistent logs:
~/.screen_recorder.log -
Includes:
- Command execution
- Errors & warnings
- Runtime events
- Multi-threaded design
- Atomic state management
- Safe subprocess handling
- Efficient FFmpeg pipeline
- Linux (X11 required โ โ Wayland not supported)
- FFmpeg (
libx264+aac) - PulseAudio (
pactl) - ncurses
xdpyinfoorxrandr
sudo pacman -S ffmpeg ncurses libpulsesudo apt install ffmpeg libncurses-dev pulseaudio-utils x11-utilsg++ -std=c++17 -O2 -o screen_recorder screen_recorder.cpp \
-lncurses -lpanel -lmenu -lform -lpthread./screen_recorder- Dependency check
- Select resolution
- Select frame rate
- Choose audio source
- Configure encoder (preset + CRF + cursor)
- Enter output filename
- Review summary + FFmpeg command preview
- Start recording
โ / โ / j / kโ NavigateEnter / Clickโ Selectb / Backspaceโ Go backq / Escโ Quit? / hโ Help screen
- / +โ Adjust CRFโ / โโ Adjust sliderCโ Toggle cursor
qโ Stop recording safelyโ ๏ธ AvoidCtrl+C(may corrupt file)
-
Default:
recording.mp4 -
Supports full paths:
~/Videos/output.mp4
After recording:
- Shows file size
- Provides playback commands (mpv / vlc / ffplay)
- Wayland not supported
- No microphone input (system audio only)
- No region/window capture (full screen only)
- Wayland support
- Microphone input
- Region/window recording
- Hardware acceleration (VAAPI / NVENC)
MIT License
Built with ๐ป + โ by Dip