{"id":19382564,"url":"https://github.com/capsoftware/scap","last_synced_at":"2025-05-15T23:03:27.443Z","repository":{"id":178741183,"uuid":"574188525","full_name":"CapSoftware/scap","owner":"CapSoftware","description":"High-performance, cross-platform screen capture library in Rust.","archived":false,"fork":false,"pushed_at":"2025-04-19T02:56:17.000Z","size":6105,"stargazers_count":393,"open_issues_count":39,"forks_count":70,"subscribers_count":4,"default_branch":"main","last_synced_at":"2025-05-15T23:02:54.813Z","etag":null,"topics":["cross-platform","rust","screen-capture","video"],"latest_commit_sha":null,"homepage":"https://crates.io/crates/scap","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/CapSoftware.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null},"funding":{"github":"clearlysid"}},"created_at":"2022-12-04T17:42:28.000Z","updated_at":"2025-05-15T16:06:24.000Z","dependencies_parsed_at":"2023-11-11T21:22:11.506Z","dependency_job_id":"866dc22a-028f-4719-9f86-5e6cd41ef5a4","html_url":"https://github.com/CapSoftware/scap","commit_stats":null,"previous_names":["clearlysid/cypher","clearlysid/scap","helmerapp/scap","capsoftware/scap"],"tags_count":4,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CapSoftware%2Fscap","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CapSoftware%2Fscap/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CapSoftware%2Fscap/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CapSoftware%2Fscap/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/CapSoftware","download_url":"https://codeload.github.com/CapSoftware/scap/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254436944,"owners_count":22070946,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["cross-platform","rust","screen-capture","video"],"created_at":"2024-11-10T09:22:10.775Z","updated_at":"2025-05-15T23:03:27.412Z","avatar_url":"https://github.com/CapSoftware.png","language":"Rust","funding_links":["https://github.com/sponsors/clearlysid"],"categories":[],"sub_categories":[],"readme":"![Github banner](./.github/banner.gif)\n\n[![Discord](https://img.shields.io/badge/Discord-%235865F2.svg?style=for-the-badge\u0026logo=discord\u0026logoColor=white)](https://cap.link/discord)\n[![Twitter](https://img.shields.io/badge/twitter-blue?style=for-the-badge\u0026logo=twitter\u0026logoColor=white\u0026labelColor=%231DA1F2\u0026color=%231DA1F2)](https://www.x.com/cap)\n![GitHub Repo stars](https://img.shields.io/github/stars/capsoftware/scap?style=for-the-badge\u0026logo=github\u0026label=Github%20Stars\u0026labelColor=black)\n![docs.rs](https://img.shields.io/docsrs/scap?style=for-the-badge\u0026logo=rust\u0026logoColor=white\u0026labelColor=black)\n![Crates.io MSRV](https://img.shields.io/crates/msrv/scap?style=for-the-badge\u0026logo=rust\u0026logoColor=white\u0026labelColor=black)\n\nA Rust library for high-quality screen capture that leverages native OS APIs for optimal performance!\n\n1. macOS: [ScreenCaptureKit](https://developer.apple.com/documentation/screencapturekit)\n2. Windows: [Windows.Graphics.Capture](https://learn.microsoft.com/en-us/uwp/api/windows.graphics.capture?view=winrt-22621)\n3. Linux: [Pipewire](https://pipewire.org)\n\n---\n\n## Features\n\n1. Cross-platform across Windows, Mac and Linux!\n2. Checks for support and recording permissions.\n3. Query list of captureable targets (displays and windows).\n4. Exclude certain targets from being captured.\n\n## Contributing\n\nWe found most of Rust's tooling around screen capture either very outdated, non-performant or platform-specific. This project is our attempt to change that. Contributions, PRs and Issues are most welcome!\n\nIf you want to contribute code, here's a quick primer:\n\n1. Clone the repo and run it with `cargo run`.\n2. Explore the API and library code in [lib.rs](./src/lib.rs).\n3. Platform-specific code lives in the `win`, `mac` and `linux` modules.\n4. The [main.rs](./src/main.rs) is a small program that \"consumes\" the library, for easy testing.\n\n## Usage\n\n```rust\nuse scap::{\n    capturer::{Point, Area, Size, Capturer, Options},\n    frame::Frame,\n};\n\nfn main() {\n    // Check if the platform is supported\n    if !scap::is_supported() {\n        println!(\"❌ Platform not supported\");\n        return;\n    }\n\n    // Check if we have permission to capture screen\n    // If we don't, request it.\n    if !scap::has_permission() {\n        println!(\"❌ Permission not granted. Requesting permission...\");\n        if !scap::request_permission() {\n            println!(\"❌ Permission denied\");\n            return;\n        }\n    }\n\n    // Get recording targets\n    let targets = scap::get_all_targets();\n    println!(\"Targets: {:?}\", targets);\n\n    // All your displays and windows are targets\n    // You can filter this and capture the one you need.\n\n    // Create Options\n    let options = Options {\n        fps: 60,\n        target: None, // None captures the primary display\n        show_cursor: true,\n        show_highlight: true,\n        excluded_targets: None,\n        output_type: scap::frame::FrameType::BGRAFrame,\n        output_resolution: scap::capturer::Resolution::_720p,\n        source_rect: Some(Area {\n            origin: Point { x: 0.0, y: 0.0 },\n            size: Size {\n                width: 2000.0,\n                height: 1000.0,\n            },\n        }),\n        ..Default::default()\n    };\n\n    // Create Capturer\n    let mut capturer = Capturer::new(options);\n\n    // Start Capture\n    capturer.start_capture();\n\n    let mut input = String::new();\n    std::io::stdin().read_line(\u0026mut input).unwrap();\n\n    // Stop Capture\n    capturer.stop_capture();\n}\n```\n\n## License\n\nThe code in this repository is open-sourced under the MIT license, though it may be relying on dependencies that are licensed differently. Please consult their documentation for exact terms.\n\n## Contributors\n\n\u003c!-- ALL-CONTRIBUTORS-LIST:START - Do not remove or modify this section --\u003e\n\u003c!-- prettier-ignore-start --\u003e\n\u003c!-- markdownlint-disable --\u003e\n\u003ctable\u003e\n  \u003ctbody\u003e\n    \u003ctr\u003e\n      \u003ctd align=\"center\" valign=\"top\" width=\"14.28%\"\u003e\u003ca href=\"https://github.com/Pranav2612000\"\u003e\u003cimg src=\"https://avatars.githubusercontent.com/u/20909078?v=4?s=100\" width=\"100px;\" alt=\"Pranav Joglekar\"/\u003e\u003cbr /\u003e\u003csub\u003e\u003cb\u003ePranav Joglekar\u003c/b\u003e\u003c/sub\u003e\u003c/a\u003e\u003cbr /\u003e\u003ca href=\"#code-Pranav2612000\" title=\"Code\"\u003e💻\u003c/a\u003e\u003c/td\u003e\n      \u003ctd align=\"center\" valign=\"top\" width=\"14.28%\"\u003e\u003ca href=\"https://www.sid.me\"\u003e\u003cimg src=\"https://avatars.githubusercontent.com/u/30227512?v=4?s=100\" width=\"100px;\" alt=\"Siddharth\"/\u003e\u003cbr /\u003e\u003csub\u003e\u003cb\u003eSiddharth\u003c/b\u003e\u003c/sub\u003e\u003c/a\u003e\u003cbr /\u003e\u003ca href=\"#code-clearlysid\" title=\"Code\"\u003e💻\u003c/a\u003e\u003c/td\u003e\n      \u003ctd align=\"center\" valign=\"top\" width=\"14.28%\"\u003e\u003ca href=\"http://dev-rohan.in\"\u003e\u003cimg src=\"https://avatars.githubusercontent.com/u/48467821?v=4?s=100\" width=\"100px;\" alt=\"Rohan Punjani\"/\u003e\u003cbr /\u003e\u003csub\u003e\u003cb\u003eRohan Punjani\u003c/b\u003e\u003c/sub\u003e\u003c/a\u003e\u003cbr /\u003e\u003ca href=\"#code-RohanPunjani\" title=\"Code\"\u003e💻\u003c/a\u003e\u003c/td\u003e\n      \u003ctd align=\"center\" valign=\"top\" width=\"14.28%\"\u003e\u003ca href=\"https://github.com/NiiightmareXD\"\u003e\u003cimg src=\"https://avatars.githubusercontent.com/u/90005793?v=4?s=100\" width=\"100px;\" alt=\"NiiightmareXD\"/\u003e\u003cbr /\u003e\u003csub\u003e\u003cb\u003eNiiightmareXD\u003c/b\u003e\u003c/sub\u003e\u003c/a\u003e\u003cbr /\u003e\u003ca href=\"#code-NiiightmareXD\" title=\"Code\"\u003e💻\u003c/a\u003e\u003c/td\u003e\n      \u003ctd align=\"center\" valign=\"top\" width=\"14.28%\"\u003e\u003ca href=\"http://bringeber.dev\"\u003e\u003cimg src=\"https://avatars.githubusercontent.com/u/83474682?v=4?s=100\" width=\"100px;\" alt=\"MAlba124\"/\u003e\u003cbr /\u003e\u003csub\u003e\u003cb\u003eMAlba124\u003c/b\u003e\u003c/sub\u003e\u003c/a\u003e\u003cbr /\u003e\u003ca href=\"#code-MAlba124\" title=\"Code\"\u003e💻\u003c/a\u003e\u003c/td\u003e\n      \u003ctd align=\"center\" valign=\"top\" width=\"14.28%\"\u003e\u003ca href=\"https://peerlist.io/anubhavitis\"\u003e\u003cimg src=\"https://avatars.githubusercontent.com/u/26124625?v=4?s=100\" width=\"100px;\" alt=\"Anubhav Singhal\"/\u003e\u003cbr /\u003e\u003csub\u003e\u003cb\u003eAnubhav Singhal\u003c/b\u003e\u003c/sub\u003e\u003c/a\u003e\u003cbr /\u003e\u003ca href=\"#code-anubhavitis\" title=\"Code\"\u003e💻\u003c/a\u003e\u003c/td\u003e\n      \u003ctd align=\"center\" valign=\"top\" width=\"14.28%\"\u003e\u003ca href=\"http://linkedin.com/in/vasusharma7\"\u003e\u003cimg src=\"https://avatars.githubusercontent.com/u/40715071?v=4?s=100\" width=\"100px;\" alt=\"Vasu Sharma\"/\u003e\u003cbr /\u003e\u003csub\u003e\u003cb\u003eVasu Sharma\u003c/b\u003e\u003c/sub\u003e\u003c/a\u003e\u003cbr /\u003e\u003ca href=\"#code-vasusharma7\" title=\"Code\"\u003e💻\u003c/a\u003e\u003c/td\u003e\n    \u003c/tr\u003e\n  \u003c/tbody\u003e\n\u003c/table\u003e\n\n\u003c!-- markdownlint-restore --\u003e\n\u003c!-- prettier-ignore-end --\u003e\n\n\u003c!-- ALL-CONTRIBUTORS-LIST:END --\u003e\n\n## Credits\n\nThis project builds on top of the fabulous work done by:\n\n-   [@MAlba124](https://github.com/MAlba124) for Linux support via Pipewire\n-   [@svtlabs](https://github.com/svtlabs) for [screencapturekit-rs](https://github.com/svtlabs/screencapturekit-rs)\n-   [@NiiightmareXD](https://github.com/NiiightmareXD) for [windows-capture](https://github.com/NiiightmareXD/windows-capture)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcapsoftware%2Fscap","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcapsoftware%2Fscap","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcapsoftware%2Fscap/lists"}