How to record screen and save as video?

I tried using this crate:

https://crates.io/crates/windows-capture

But I am getting following when I try to run project:

Got The Flag: Yea This Works
thread 'main' panicked at src\commands\record_video.rs:102:26:
Screen Capture Failed: GraphicsCaptureApiError(BorderConfigUnsupported)```

I have following settings for recording and it seems that on the Windows 10 it cant be recorded without border as developer said:

```rust
let settings = Settings::new(
    // Item To Captue
    primary_monitor,
    // Capture Cursor Settings
    CursorCaptureSettings::WithCursor,
    // Draw Borders Settings
    DrawBorderSettings::Default,
    // The desired color format for the captured frame.
    ColorFormat::Rgba8,
    // Additional flags for the capture settings that will be passed to user defined `new` function.
    "Yea This Works".to_string(),
)
.unwrap();

Is there any better crate for screen recording so I can record without borders?

1 Like

Have you tried DrawBorderSettings::WithoutBorder instead of DrawBorderSettings::Default?

1 Like

Yes, actually thats what I want. And yea, it doesnt work. With Default it works but it has border. Developer told me that it is newer API and its working on Windows 11 and for some Windows 10 builds it wont work. So I think I can close post with solution. Thanks for helping man! :slight_smile:

This topic was automatically closed 90 days after the last reply. We invite you to open a new topic if you have further questions or comments.