Skip to main content

Building from Source

This guide is for developers who want to build the Daydream OBS plugin from source code.
For most users, we recommend downloading the pre-built releases from GitHub.

Prerequisites

ToolVersion
CMake3.28 or later
Platform toolchainSee below

Platform Toolchains

PlatformToolchain
macOSXcode Command Line Tools
WindowsVisual Studio 2022
LinuxGCC 11+ or Clang 14+

macOS

Build

# Clone the repository
git clone https://github.com/daydreamlive/daydream-obs.git
cd daydream-obs

# Configure and build
cmake --preset macos
cmake --build build_macos --config Debug

Install for Development

Create a symlink for rapid iteration:
ln -sf "$(pwd)/build_macos/Debug/daydream-obs.plugin" \
  ~/Library/Application\ Support/obs-studio/plugins/
Now when you rebuild, OBS will automatically load the new version (after restart).

Build Release

cmake --build build_macos --config Release
The plugin will be at build_macos/Release/daydream-obs.plugin.

Windows

Build

# Clone the repository
git clone https://github.com/daydreamlive/daydream-obs.git
cd daydream-obs

# Configure and build
cmake --preset windows-x64
cmake --build build_windows --config Release

Install

Copy the built plugin to OBS:
copy build_windows\Release\daydream-obs.dll ^
  "%APPDATA%\obs-studio\plugins\daydream-obs\bin\64bit\"
Or open the solution in Visual Studio:
start build_windows\daydream-obs.sln

Linux

Dependencies

# Ubuntu/Debian
sudo apt install build-essential cmake libobs-dev

# Fedora
sudo dnf install gcc-c++ cmake obs-studio-devel

# Arch
sudo pacman -S base-devel cmake obs-studio

Build

# Clone the repository
git clone https://github.com/daydreamlive/daydream-obs.git
cd daydream-obs

# Configure and build
cmake --preset ubuntu-x86_64
cmake --build build_ubuntu

Install

mkdir -p ~/.config/obs-studio/plugins/daydream-obs/bin/64bit
cp build_ubuntu/daydream-obs.so \
  ~/.config/obs-studio/plugins/daydream-obs/bin/64bit/

Project Structure

daydream-obs/
├── CMakeLists.txt           # Build configuration
├── CMakePresets.json        # Platform presets
├── src/
│   ├── daydream-filter.c    # Main OBS filter
│   ├── daydream-api.c       # Daydream API client
│   ├── daydream-auth.c      # Authentication
│   ├── daydream-encoder.c   # Video encoding
│   ├── daydream-decoder.c   # Video decoding
│   ├── daydream-broadcaster.c  # WHIP client
│   └── daydream-framebuffer.c  # Frame handling
├── lib/                     # Dependencies
└── assets/                  # Images and resources

Development Tips

Logging

The plugin uses OBS’s logging system:
blog(LOG_INFO, "[Daydream] Connected to stream %s", stream_id);
blog(LOG_WARNING, "[Daydream] Reconnecting...");
blog(LOG_ERROR, "[Daydream] Failed: %s", error_message);
View logs in OBS: HelpLog FilesView Current Log

Debugging

On macOS, you can attach a debugger:
# Start OBS with debugger
lldb /Applications/OBS.app/Contents/MacOS/OBS
On Windows, attach Visual Studio to the running OBS process.

Hot Reload

OBS caches plugins, so you need to restart OBS after rebuilding. For faster iteration:
  1. Use a Debug build
  2. Symlink the plugin (macOS) or copy after each build
  3. Restart OBS to test changes

Contributing

  1. Fork the repository
  2. Create a feature branch
  3. Make your changes
  4. Submit a pull request
See the GitHub repository for contribution guidelines.

Next Steps