Cap

repository·main·Indexed 12 days ago

https://github.com/capsoftware/cap

An open-source, high-performance alternative to Loom for screen recording, video editing, and sharing. Cap features a desktop app and a CLI for automation, supporting self-hosting, custom S3 storage, and integration with AI agents via MCP servers. The toolset includes capabilities for recording management, project validation, and exporting to mp4, gif, and mov formats.

Tokens
128K
Snippets
349
Records
743
Agent score
96%

What's inside Cap

  1. Overview of cap-camera

    main
    cap-camera is a cross-platform camera capture API that provides a unified Rust interface for macOS (using AVFoundation) and Windows (using Media Foundation/DirectShow). It abstracts platform-specific complexities while offering low-level access to camera devices, consistent device enumeration, and format negotiation.
  2. Capabilities of Cap for Agents

    main

    Once connected, an AI agent can perform a wide range of tasks across the Cap platform without needing to use the web dashboard manually. Key capabilities include:

    • Understanding Recordings: Read titles, AI summaries, chapters, transcripts, comments, reactions, and processing states.
    • Information Retrieval: Search all, owned, or shared Caps; filter by organization or folder; inspect notifications.
    • Collaboration: Draft and post timestamped comments, replies, reactions, and manage visibility/titles (requires user confirmation).
    • Recording & Sharing: Check capture readiness, select screen/window, record, validate, export, upload, and return share links.
    • Library Management: Create/organize folders and spaces, move Caps, manage public collection pages, and download assets.
    • Team & Admin Management: Inspect members, invites, billing, storage, analytics, and domains; perform confirmed admin changes.
    • Migration & Development: Run Loom imports, manage Cap developer apps, and handle video/domain/usage/credits.
  3. New features in Cap v0.3.0

    main

    Cap v0.3.0 introduces several core capabilities for screen recording and sharing:

    • Video Editing: Trim recordings and customize them with custom padding and backgrounds.
    • Local-First Approach: Recordings and edits are processed locally on your machine for improved privacy and performance.
    • Quick Sharing: Generate shareable links for videos with a single click.
    • Screenshots: Capture desktop screenshots and share them instantly via single-click links.
  4. Understand the purpose of @cap/web-domain

    main

    The @cap/web-domain package contains the shared logic, types, and definitions used by both the client and the server in the @cap/web ecosystem. It ensures type safety and consistent data structures across the full stack.

    Key components include:

    • Domain data types: Core entities like Video.Video and Video.VideoId.
    • RPC definitions: Interface definitions for remote procedure calls, such as VideoRpcs.
    • Full-stack errors: Standardized error types like InternalError that can be safely passed between client and server.
    • Client-safe utilities: Logic designed to run on the client, such as Policy.
  5. Explore Cap Analytics features

    main

    Cap Analytics provides a comprehensive dashboard for monitoring Cap performance beyond simple view counts. Key capabilities include:

    • Views over time: Visualize view trends across various timeframes, including the last 24 hours, 7 days, 30 days, or the entire lifetime of a video.
    • Audience breakdowns: Analyze viewer demographics and technical environments by splitting views by country, browser, operating system, and device type.
    • Video comparison: Use a side-by-side comparison tool to evaluate the performance of different videos.
    • Real-time tracking: Monitor new views as they occur via live dashboard updates.
  6. Manage camera lifecycle and recovery in Cap Desktop

    main

    Cap Desktop (v0.4.6+) features improved recording resilience for camera hardware. If a camera disconnects during a recording, the session will continue gracefully. The system will attempt automatic reconnection once the device becomes available again.

    New camera management features include:

    • Camera preview pause/resume: Control the visibility of the preview without stopping the recording.
    • Camera-only mode: A large camera preset designed for focused camera captures.
  7. Changelog entry format and rendering rules

    main

    Changelog entries are rendered as plain markdown (not compiled MDX). To ensure consistent rendering across the web and the desktop app, do not use JSX or imports within the entry files.

    Rendering Behavior

    • Intro: Everything before the first ## heading is treated as the intro and is always visible. Keep this to a sentence or two.
    • Collapsible Content: Everything from the first ## heading onwards is collapsed behind a "Show release notes" toggle if the content is long.
    • Short Entries: Entries without headings render inline. A long bullet list without an intro will collapse behind a toggle showing only the title.
    • Pagination: The changelog is statically paginated with 20 entries per page (e.g., /changelog/page/2).
  8. How cap-camera-ffmpeg integrates with cap-camera

    main

    The library works by extending the core cap-camera CapturedFrame type using the CapturedFrameExt trait.

    Architecture Model:

    1. Capture: cap-camera captures a frame from the hardware.
    2. Extension: The cap-camera-ffmpeg crate provides the CapturedFrameExt trait to that frame.
    3. Conversion: The to_ffmpeg() method detects the native platform format (e.g., AVFoundation on macOS) and maps the memory layout to an FFmpeg-compatible video frame.
    4. Pipeline: The resulting FFmpeg frame is ready for encoding, filtering, or analysis without requiring manual format conversions or extra memory copies.