Thanks to visit codestin.com
Credit goes to github.com

Skip to content

libobs-rs/libobs-rs

Repository files navigation

libobs-rs

Build Docs Coverage

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)

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 --out-dir target/debug
# for release
cargo obs-build --out-dir target/release
# for testing
cargo obs-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-sources or libobs-wrapper.

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

Video encoding and muxing through libobs in Rust

Topics

Resources

Stars

Watchers

Forks

Packages

No packages published

Contributors 6

Languages