23 releases (12 breaking)

0.13.0 Sep 23, 2024
0.12.0 May 4, 2024
0.11.5 Sep 4, 2023
0.11.2 Jun 22, 2023
0.2.0 Dec 29, 2020

#28 in Video

Download history 279/week @ 2024-08-07 154/week @ 2024-08-14 165/week @ 2024-08-21 202/week @ 2024-08-28 317/week @ 2024-09-04 170/week @ 2024-09-11 300/week @ 2024-09-18 254/week @ 2024-09-25 228/week @ 2024-10-02 264/week @ 2024-10-09 344/week @ 2024-10-16 207/week @ 2024-10-23 162/week @ 2024-10-30 252/week @ 2024-11-06 159/week @ 2024-11-13 65/week @ 2024-11-20

662 downloads per month
Used in 3 crates

MIT license

300KB
6.5K SLoC

OBWS - The obws (obvious) remote control library for OBS

Build Status Repository Documentation Code Coverage

Remote control OBS with the obs-websocket plugin from Rust 🦀.

Usage

Add obws to your project with cargo add obws@0.13.0 or add it manually to your Cargo.toml:

[dependencies]
obws = "0.13.0"

In addition, you will need to use the latest tokio runtime to use this library as it makes heavy use of async/await and is bound to this runtime.

Example

Here we connect to a OBS instance, get some version information and log in to access the whole API and lastly print out a list of available scenes.

For more usage instructions see the docs or check out the examples.

use anyhow::Result;
use obws::Client;

#[tokio::main]
async fn main() -> Result<()> {
    // Connect to the OBS instance through obs-websocket.
    let client = Client::connect("localhost", 4455, Some("password")).await?;

    // Get and print out version information of OBS and obs-websocket.
    let version = client.general().version().await?;
    println!("{version:#?}");

    // Get a list of available scenes and print them out.
    let scene_list = client.scenes().list().await?;
    println!("{scene_list:#?}");

    Ok(())
}

License

This project is licensed under MIT License (or http://opensource.org/licenses/MIT).

Dependencies

~7–16MB
~210K SLoC