GithubHelp home page GithubHelp logo

stankye / obs-rs Goto Github PK

View Code? Open in Web Editor NEW

This project forked from not-matthias/obs-rs

0.0 0.0 0.0 459 KB

Capture frames of any game using OBS.

License: MIT License

C++ 1.22% C 1.48% Rust 97.30%

obs-rs's Introduction

obs-rs

Capture frames of any game using OBS.

Features

This projects uses the graphics-hook implementation from the obs-studio project, to capture frames of any game.

  • The graphics hook is signed and whitelisted by all anti-cheats as it's used by streamers and content creators as well.
  • Works for many graphics APIs (D3D9, D3D10, D3D11, Vulkan, ...) and thus also for many different games.
  • This implementation is extremely fast, because it only copies the pixels from the framebuffer. On my machine, this crate is almost 5 times faster compared to an implementation using BitBlt.

Example

use obs_client::Capture;

fn main() {
    simple_logger::SimpleLogger::new()
        .with_level(log::LevelFilter::Warn)
        .init()
        .unwrap();

    let mut capture = Capture::new("Rainbow Six");
    if capture.try_launch().is_err() {
        println!("Failed to launch the capture");
        return;
    }

    loop {
        let _ = capture.capture_frame::<u8>();
        std::thread::sleep(std::time::Duration::from_secs(5));
    }
}

obs-rs's People

Contributors

not-matthias avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.