Skip to content

sshcrack/libobs-rs

 
 

Repository files navigation

libobs-rs

Build Docs Coverage

Documentation is available here

Note

Need help? Join our discord server!

Simple and safe video recording through libobs.

Currently only tested on Windows and Linux (Ubuntu Wayland / X11). MacOS doesn't work right now, but we are working on that. The API is currently unstable and will definitely have breaking revisions in the future.

Note

The libobs-wrapper async functionality has been removed because of all kinds of issues (#32)

Prerequisites

Make sure that the OBS binaries are in your target directory. There's even a tool to help you build OBS from source!
Install the tool

cargo install cargo-obs-build

Note

There is now a standalone libobs-bootstrapper crate that can download and install OBS binaries at runtime, which is useful for distributing applications without requiring users to install OBS separately. See the libobs-bootstrapper documentation for more details.

Add the following to your Cargo.toml

[package.metadata]
# The libobs version to use (can either be a specific version or "latest")
# This is optional; if not specified, the version will be selected based on the libobs crate version.
# libobs-version="31.0.3"
# The directory in which to store the OBS build (optional)
# libobs-cache-dir="../obs-build"

Install OBS in your target directory. This uses the original signed OBS binaries.

# for debugging
cargo obs-build build --out-dir target/debug
# for release
cargo obs-build build --out-dir target/release
# for testing
cargo obs-build build --out-dir target/(debug|release)/deps

More details can be found in the cargo-obs-build documentation.

Note

You can specify a GITHUB_TOKEN environment variable to increase the rate limit when downloading releases from GitHub. This is especially useful for CI environments.

Quick Start

Below is an example that will record video-only footage of an exclusive fullscreen application. Note that the API is extremely limited right now, but you can already record both video and audio with full control over the output already. If you need more, libobs is exposed.

Examples are located in the examples directory. Documentation is also available for libobs-simple or libobs-wrapper.

Documentation

Disclaimer

This project is not affiliated with, endorsed by, or associated with the OBS Project or OBS Studio.
OBS and OBS Studio are trademarks of their respective owners.
The developers of this project are independent and not part of the OBS Studio team in any capacity.

About

Updated Rust bindings for libobs

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Rust 61.5%
  • C 36.0%
  • C++ 1.6%
  • Other 0.9%