Note
Need help? Join our discord server!
Simple and safe video recording through libobs.
Currently only tested on Windows. Linux and MacOS likely work, but they are untested. These will receive support later down the road.
The API is currently unstable and will definitely have breaking revisions in the future.
To build on Linux, you must install the libobs-dev package, as well as the bindgen dependencies.
sudo apt-get libobs-dev llvm-dev libclang-dev clang
Note
The libobs-wrapper async functionality has been removed because of all kinds of issues (#32)
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-buildNote
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 --out-dir target/debug
# for release
cargo obs-build --out-dir target/release
# for testing
cargo obs-build --out-dir target/(debug|release)/depsMore 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.
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-sources or libobs-wrapper.
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.