# Captr for Windows **Captr** is a screen recording and computer interaction capture tool that records keyboard/mouse input, screen video, DOM snapshots, and accessibility trees. Perfect for creating datasets to train and evaluate computer-use AI models. ![Captr Logo](assets/captr.png) ## Features - **Screen & Input Recording:** Captures all mouse movements, clicks, scrolls, and keyboard inputs with precise timestamps - **OBS Integration:** Automatic screen recording via OBS Studio - **DOM Capture:** Automatically captures webpage structure from Chromium browsers (Chrome, Edge, Brave, etc.) - **Accessibility Trees:** Records Windows UI Automation information from native applications - **System Metadata:** Captures detailed system information (OS, screen resolution, installed apps, etc.) - **Privacy Controls:** Pause/resume recording to hide sensitive information - **Playback:** Replay recorded sessions to verify captures ## Installation ### Option 1: Download Pre-built App (Recommended) 1. Download the latest `Captr.exe` from the [Releases](../../releases) page 2. Run the installer or extract to your preferred location 3. Install and configure OBS Studio (see [OBS Setup](#obs-setup)) 4. Launch Captr.exe ### Option 2: Build from Source Requirements: Python ≥3.11, OBS Studio ```bash # Clone the repository git clone https://github.com/YOUR_USERNAME/Captr_Windows.git cd Captr_Windows # Create virtual environment python -m venv venv venv\Scripts\activate # Install dependencies pip install -r requirements.txt # Build the executable python build.py ``` The built executable will be in the `dist` folder. ## OBS Setup Captr requires OBS Studio for screen recording: 1. Download and install [OBS Studio](https://obsproject.com/) 2. Open OBS and go to **Tools → WebSocket Server Settings** 3. Enable **WebSocket server** and disable **Authentication** 4. Add a **Display Capture** source in OBS 5. Close OBS (Captr will control it automatically) For detailed instructions, see [OBS_SETUP.md](OBS_SETUP.md). ## Usage ### Recording 1. Launch Captr 2. Click **Start Recording** 3. Perform your computer tasks 4. Use **Pause/Resume** to hide sensitive information (passwords, credit cards, etc.) 5. Click **Stop Recording** 6. Optionally name and describe your recording Recordings are saved to `C:\Users\[YourUsername]\Documents\Captr_Recordings\`. ### DOM Capture (Optional) To capture webpage DOM snapshots: **Option 1: Use the helper script** ```bash cd tools python launch_chrome_debug.py ``` **Option 2: Manual launch** ```bash "C:\Program Files\Google\Chrome\Application\chrome.exe" --remote-debugging-port=9222 ``` Once a browser is launched with debugging enabled, Captr will automatically capture DOM snapshots during recording. See [DOM_CAPTURE_SETUP.md](DOM_CAPTURE_SETUP.md) for details. ### Playback - **Play Latest Recording:** Replays the most recent recording - **Play Custom Recording:** Choose any recording to replay - Press `Shift+Esc` to stop playback ## Recording Format Each recording creates a folder in `Documents\Captr_Recordings\` containing: - `events.jsonl` - All keyboard/mouse actions with timestamps - `metadata.json` - System information - `*.mp4` - Screen recording video from OBS - `dom_snaps\` - DOM snapshots from web pages (if DOM capture enabled) - `a11y_snaps\` - Accessibility tree captures from native apps - `README.md` - Optional recording description ### Sample Event Format ```json {"time_stamp": 1234567.89, "action": "move", "x": 100.0, "y": 200.0} {"time_stamp": 1234568.01, "action": "click", "x": 100.0, "y": 200.0, "button": "left", "pressed": true} {"time_stamp": 1234568.15, "action": "window_focus", "app_name": "chrome.exe", "window_title": "Example - Google Chrome"} ``` ## Troubleshooting ### DOM Captures Not Working Run the diagnostic tool: ```bash cd tools python check_recording.py ``` Make sure Chrome (or another Chromium browser) is running with `--remote-debugging-port=9222`. ### App Issues Check if OBS is running properly and has the correct permissions. ### Firewall/Antivirus Blocking Some antivirus software may block the WebSocket connection to OBS or the Chrome debugging port. Add exceptions for: - Captr.exe - OBS Studio - Chrome (if using DOM capture) ## Known Limitations - Mouse input not captured in video games that use raw input - Google Docs and similar canvas-based web apps have limited DOM capture (by design for privacy) - Banking sites may limit DOM capture content due to security policies - Some applications may not provide accessibility tree information ## Development ### Running from Source ```bash venv\Scripts\activate python main.py ``` ### Utility Scripts Located in `tools\`: - `launch_chrome_debug.py` - Launch Chrome with debugging enabled - `check_recording.py` - Verify recordings and diagnose issues - `debug_accessibility.py` - Test Windows UI Automation access - `debug_chrome_cdp.py` - Test Chrome DevTools Protocol connection ## System Requirements - Windows 10 or later - Python 3.11+ (for building from source) - OBS Studio (latest version) - 2GB RAM minimum - 500MB free disk space + space for recordings ## Attribution Captr is derived from [DuckTrack](https://github.com/TheDuckAI/DuckTrack) by DuckAI, released under the MIT License. We've added significant enhancements including DOM capture, accessibility trees, enhanced Windows support, and improved debugging tools. See [LICENSE](LICENSE) for full details. ## Citation If you use Captr in your research or project, please cite it as: ```bibtex @software{howland2025captr, author = {Howland, Anais and Thinnappan, Ashwin and Mohammed, Jameel Shahid}, title = {Captr: Screen Recording and Computer Interaction Capture for Computer-Use Datasets}, year = {2025}, url = {https://github.com/anaishowland/captr_ducktrack} } ``` ## License MIT License - see [LICENSE](LICENSE) file for details. --- **Created by Anais Howland, Ashwin Thinnappan & Jameel Shahid Mohammed at Paradigm Shift AI** | Based on DuckTrack by DuckAI