not-matthias / obs-rs

Capture frames of any game using OBS.
MIT License
141 stars 23 forks source link

ProcessNotFound everytime #11

Open tanishqmanuja opened 10 months ago

tanishqmanuja commented 10 months ago
use obs_client::Capture;

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

    let window_name = "VALORANT";
    let mut capture = Capture::new(window_name);
    if let Err(error) = capture.try_launch() {
        println!("Failed to launch the capture: {:?} {:?}", window_name,error);
        return;
    }

    let mut fps = fps_counter::FPSCounter::new();
    loop {
        let (buffer, (width, height)) = capture.capture_frame::<u8>().unwrap();
        println!("{:?} | {:?}x{:?} | {:?}", fps.tick(), width, height, buffer.len());
    }
}
JeffVu-1 commented 3 months ago
use obs_client::Capture;

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

    let window_name = "VALORANT";
    let mut capture = Capture::new(window_name);
    if let Err(error) = capture.try_launch() {
        println!("Failed to launch the capture: {:?} {:?}", window_name,error);
        return;
    }

    let mut fps = fps_counter::FPSCounter::new();
    loop {
        let (buffer, (width, height)) = capture.capture_frame::<u8>().unwrap();
        println!("{:?} | {:?}x{:?} | {:?}", fps.tick(), width, height, buffer.len());
    }
}

did you ever fix this issue? I'm running this in c++ and I'm having the same issue with process not found

tanishqmanuja commented 3 months ago

Nope, i switched to another library that uses dxgi