Minimal screen recorder for Arch Linux with X11 and Wayland support. Uses FFmpeg (X11) or wf-recorder (Wayland) with optimized presets.
- Recording starts immediately after setup
- Stop with Ctrl+C
- Automatic file saving
- Auto-detects X11/Wayland
- System audio recording
- 5 FFmpeg presets: web, compressed, nvidia, universal, lossless
- Keystroke display (screenkey)
- Record fullscreen, window, or selected area
- Auto-dependency setup on first run
git clone https://github.com/vifirsanova/shellrec.git
cd shellrec
chmod +x shellrec
sudo cp shellrec /usr/local/bin/On first launch, ShellRec will check and install missing dependencies:
shellrec# Fullscreen recording (auto-detects X11/Wayland)
shellrec
# Show keystrokes
shellrec -key
# Select area with mouse
shellrec -area
# Record active window (X11 only)
shellrec -window# Web/YouTube optimized (libx264, balanced)
shellrec -set web
# Compressed for sharing (fast encoding)
shellrec -set compressed -out bug_report
# NVidia hardware encoding (h264_nvenc)
shellrec -set nvidia -fps 144 -out gameplay
# Universal compatibility
shellrec -set uni -key
# Lossless quality for editing (large files)
shellrec -set lossless-set PRESET Preset: web, compressed, nvidia, uni, lossless
Default: web
-key Show keystrokes (screenkey)
Default: off
-out NAME Output filename (without extension)
Default: YYYYMMDD_HHMMSS_recording
-res WxH Resolution (1920x1080, 1280x720)
-fps N Frames per second (default: 30)
-area Select area with mouse
-window Record active window (X11 only)
-fullscreen Record entire screen (default)
-dir PATH Output directory
-deps Check/install dependencies
-h, --help Show help
-v, --version Show version
- web - libx264, fast preset, CRF 28 (YouTube/streaming)
- compressed - libx264, ultrafast, CRF 32 (quick sharing)
- nvidia - h264_nvenc, p4 preset (hardware encoding)
- uni - libx264, medium, CRF 23 (universal compatibility)
- lossless - libx264, veryslow, CRF 0 (editing/archival)
- Full support via FFmpeg x11grab
- Audio via PulseAudio
- Window selection (xdotool)
- Area selection (slop)
- Basic support via wf-recorder
- Audio via wf-recorder
- Area selection (slurp)
- Window selection not supported
- X11: PulseAudio via FFmpeg
- Wayland: Via wf-recorder (auto-detected)
# Quick 5-second test
shellrec -set compressed -fps 10 -out test &
sleep 5
kill %1- X11: FFmpeg with
x11grabfor capture andpulsefor audio - Wayland: wf-recorder for capture and audio
Example FFmpeg command for 'web' preset:
ffmpeg -f x11grab -video_size 1920x1080 -framerate 30 \
-i :0.0 -f pulse -i default \
-c:v libx264 -preset fast -crf 28 \
-c:a aac -movflags +faststart output.mp4Automatically installed on first run:
- ffmpeg (core backend)
- slop (area selection)
- xdotool (window capture)
- screenkey (keystroke display)
- wf-recorder (core backend)
- slurp (area selection)
- screenkey (keystroke display)
- Command-line only
- Primarily tested on Arch Linux
- Recording starts immediately after setup
- Stop recording with Ctrl+C
- Wayland: no window selection
-windowoption only works in X11timeoutcommand not directly supported (use shell workaround)-set unipreset might have issues in some configurations
- Default:
~/Videos/shellrec/ - Format:
YYYYMMDD_HHMMSS_recording.mp4(format varies by preset)
xhost +local:sudo pacman -S nvidia nvidia-utils
nvidia-smi # Verify driver installation# Check FFmpeg installation
ffmpeg -version
# Test screen capture manually
ffmpeg -f x11grab -video_size 1920x1080 -framerate 30 -i :0.0 -t 5 test.mp4# X11
pactl info # Check PulseAudio
# Wayland
wf-recorder --audio # Check audio support# Test xdotool
xdotool getactivewindow
# If empty, window recording may not workIf -set uni fails, try:
# Alternative presets
shellrec -set web
shellrec -set compressedcat /tmp/shellrec.logCreated by @vifirsanova (missvector)
Issues and feedback welcome on GitHub.
Version: 2.1 (X11 and Wayland support)