Skip to content

davegullo/obs-hang

 
 

Repository files navigation

OBS Plugin Template

Introduction

The plugin template is meant to be used as a starting point for OBS Studio plugin development. This specific implementation provides an OBS Studio source plugin that receives and decodes media streams using the MoQ (Media over QUIC) protocol.

It includes:

  • Boilerplate plugin source code
  • A CMake project file
  • GitHub Actions workflows and repository actions

MoQ Hang Source

This plugin implements a "Hang Source" that connects to MoQ servers to receive live video and audio streams. The source supports:

  • MoQ Protocol Integration: Connects to MoQ servers using the libmoq library for reliable, low-latency media transport over QUIC
  • Hardware-Accelerated Video Decoding: Uses VA-API (Video Acceleration API) for efficient hardware-accelerated video decoding
  • Audio Decoding: Leverages FFmpeg libraries for high-quality audio decoding and processing
  • Thread-Safe Operation: Implements proper threading with mutexes and condition variables for concurrent video/audio processing
  • OBS Integration: Fully integrated as an OBS source with async video rendering and audio output capabilities

Key Components

  • hang-source.c/h: Main source implementation handling MoQ connections, stream management, and OBS integration
  • vaapi-decoder.c/h: Hardware-accelerated video decoding using VA-API
  • audio-decoder.c/h: Audio decoding and processing using FFmpeg
  • MoQ Callbacks: Handles catalog reception, video/audio frame processing, and error management

Configuration

The source accepts two main configuration parameters:

  • URL: MoQ server endpoint (e.g., https://moq-server.example.com)
  • Broadcast: Path to the broadcast stream on the MoQ server

The plugin requires libmoq, VA-API, and FFmpeg dependencies to be available on the system.

Supported Build Environments

Platform Tool
Windows Visual Studio 17 2022
macOS XCode 16.0
Windows, macOS CMake 3.30.5
Ubuntu 24.04 CMake 3.28.3
Ubuntu 24.04 ninja-build
Ubuntu 24.04 pkg-config
Ubuntu 24.04 build-essential

Quick Start

An absolute bare-bones Quick Start Guide is available in the wiki.

Documentation

All documentation can be found in the Plugin Template Wiki.

Suggested reading to get up and running:

GitHub Actions & CI

Default GitHub Actions workflows are available for the following repository actions:

  • push: Run for commits or tags pushed to master or main branches.
  • pr-pull: Run when a Pull Request has been pushed or synchronized.
  • dispatch: Run when triggered by the workflow dispatch in GitHub's user interface.
  • build-project: Builds the actual project and is triggered by other workflows.
  • check-format: Checks CMake and plugin source code formatting and is triggered by other workflows.

The workflows make use of GitHub repository actions (contained in .github/actions) and build scripts (contained in .github/scripts) which are not needed for local development, but might need to be adjusted if additional/different steps are required to build the plugin.

Retrieving build artifacts

Successful builds on GitHub Actions will produce build artifacts that can be downloaded for testing. These artifacts are commonly simple archives and will not contain package installers or installation programs.

Building a Release

To create a release, an appropriately named tag needs to be pushed to the main/master branch using semantic versioning (e.g., 12.3.4, 23.4.5-beta2). A draft release will be created on the associated repository with generated installer packages or installation programs attached as release artifacts.

Signing and Notarizing on macOS

Basic concepts of codesigning and notarization on macOS are explained in the correspodning Wiki article which has a specific section for the GitHub Actions setup.

About

moq R&D

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • CMake 51.1%
  • C 40.3%
  • Shell 8.6%