Skip to content

About

A lightweight, Python-based graphical user interface for wf-recorder

Resources

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

 

History

12 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

🎥 Wf-Recorder GUI (Wayland & ARM64 Optimized)

A lightweight, Python-based graphical user interface for wf-recorder. Designed specifically for Wayland compositors (Sway, Hyprland, Wayfire) and highly optimized for ARM64 hardware (Raspberry Pi, Rockchip, etc.), this tool takes the hassle out of command-line screen recording.

License Platform Python

demo

✨ Key Features

  • Wayland Native: Built with PyQt6 and forced into Wayland-native mode for flawless integration without XWayland scaling issues.
  • Hardware Encoding Selection: Dropdown support for standard software encoding (libx264) and hardware-accelerated codecs crucial for ARM boards (h264_v4l2m2m, h264_vaapi).
  • Advanced Audio Routing Engine:
    • 🎤 Microphone Only
    • 🔊 Internal Desktop Audio Only
    • 🎛️ Mix Both: Automatically creates and manages a virtual PulseAudio/PipeWire mixer to record both your mic and internal desktop audio simultaneously, completely bypassing wf-recorder's single-audio-stream limitation.
  • Region Capture: Integrated with slurp to easily click-and-drag the exact portion of your screen you want to record.

🛠️ Prerequisites

Before running the application, ensure your system has the required backend tools installed.

For Arch Linux users:

sudo pacman -S wf-recorder slurp python python-pyqt6 pulseaudio-utils

(Note: pulseaudio-utils provides the pactl command, which is required for the advanced audio routing, even if you are using PipeWire).

For Debian/Ubuntu/Raspberry Pi OS users:

sudo apt install wf-recorder slurp python3 python3-pyqt6 pulseaudio-utils

🚀 Installation & Setup

You don't need to compile anything. Simply download the Python script and place it in your local binaries folder.

1. Download and Install the Script

# Create local bin directory if it doesn't exist
mkdir -p ~/.local/bin

# Move your script to the bin folder
cp wf_ui.py ~/.local/bin/wf-gui

# Make it executable
chmod +x ~/.local/bin/wf-gui

2. Create a Desktop Launcher (Optional but Recommended)

To run the app from your standard application launcher (wofi, rofi, GNOME menu, KDE kickoff), create a .desktop file.

nano ~/.local/share/applications/wf-recorder-gui.desktop

Paste the following configuration into the file (Replace YOUR_USERNAME with your actual Linux username):

[Desktop Entry]
Type=Application
Name=Screen Recorder (wf-recorder)
Comment=Wayland Screen Recorder with Audio Routing
Exec=/home/YOUR_USERNAME/.local/bin/wf-gui
Icon=media-record
Terminal=false
Categories=AudioVideo;Video;Recorder;
Keywords=screen;capture;wayland;video;

Refresh your application menu:

update-desktop-database ~/.local/share/applications/

🎧 Understanding Audio Modes

Linux audio routing can be tricky. Here is how this GUI handles it under the hood:

  • Microphone Only: Uses your default system microphone.
  • Internal Desktop Audio Only: Automatically detects your default speaker output and records its .monitor stream.
  • Mix Both: The script uses pactl to instantly spawn a virtual sink (module-null-sink). It then routes both your mic and your desktop audio into this virtual sink, and tells wf-recorder to record the result. The script cleans up and deletes this virtual sink the moment you click "Stop Recording".

⚠️ Troubleshooting

"The app doesn't launch from my app drawer, but works in the terminal!" This usually means your desktop environment cannot find PyQt6. Ensure you installed PyQt6 via your system package manager (sudo pacman -S python-pyqt6) rather than through a local pip environment, so it is available system-wide.

"Internal Audio Only is picking up my Microphone!" Sometimes, PipeWire remembers old routing rules (via module-stream-restore). Open pavucontrol (PulseAudio Volume Control), go to the Playback tab, and ensure your microphone is muted from playing back through your physical headphones.

"The screen recording is very laggy (especially on ARM64)." Ensure you have selected a hardware-accelerated codec from the Video Codec dropdown. Software encoding (libx264) will overwhelm most SBCs (Single Board Computers).

About

A lightweight, Python-based graphical user interface for wf-recorder

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages