Skip to content

Build from Source

Pre-built binaries cover most cases — see the per-product getting-started pages first. Build from source only if you need a feature flag combination the release matrix doesn’t ship, or you want to follow the development branch.

  • A Linux host with Rust stable (edition 2024 — install via rustup.rs).
  • The build-time apt packages below.
  • Roughly 5 GB of disk for the workspace + build artefacts.

The edge has several path-dependency sibling crates that must live in the same parent directory before it can compile:

Terminal window
git clone https://github.com/Bilbycast/bilbycast-libsrt-rs.git # default SRT backend
git clone https://github.com/Bilbycast/bilbycast-fdk-aac-rs.git --recurse-submodules
git clone https://github.com/Bilbycast/bilbycast-ffmpeg-video-rs.git --recurse-submodules
git clone https://github.com/Bilbycast/bilbycast-rist.git
git clone https://github.com/Bilbycast/bilbycast-bonding.git
git clone https://github.com/Bilbycast/bilbycast-edge.git
git clone https://github.com/Bilbycast/bilbycast-relay.git

Cargo resolves the sibling crates automatically via the path-dependency entries in bilbycast-edge/Cargo.toml.

The manager source is proprietary (EULA-licensed) and not publicly cloneable — install the signed pre-built tarball via Install the manager instead. The manager has no feature-flag combinations that would warrant a source build.

Terminal window
sudo apt update
sudo apt install build-essential cmake make clang libclang-dev pkg-config \
libssl-dev g++ libdrm-dev libasound2-dev libudev-dev

To match the release feature set (libx264 + libx265 software encoders, plus NVENC + NVDEC headers):

Terminal window
sudo apt update
sudo apt install libx264-dev libx265-dev libnuma-dev

x86_64 only, for the QuickSync encoder (oneVPL):

Terminal window
sudo apt update
sudo apt install libvpl-dev
Terminal window
# Edge — matches the release tarball (every video codec backend compiled in)
cd bilbycast-edge && cargo build --release --features video-encoders-full && cd ..
# Or a minimal edge — protocol bridging only, no software video encoders
cd bilbycast-edge && cargo build --release && cd ..
# Relay
cd bilbycast-relay && cargo build --release && cd ..

The release binaries land in each crate’s target/release/.

Terminal window
./bilbycast-edge/target/release/bilbycast-edge --config config.json
./bilbycast-relay/target/release/bilbycast-relay

For the manager + relay setup steps that the release tarballs guide you through (Postgres, secrets, registration tokens, systemd units), follow Install the manager and Install the relay — for the relay, substitute the path to your target/release/ binary for the tarball one.

The most useful Cargo feature flags on the edge:

FlagDefaultEffect
tlsonHTTPS + RTMPS
webrtconWebRTC WHIP / WHEP via str0m
fdk-aaconIn-process AAC decode and encode
media-codecsonIn-process video decode + thumbnail JPEG, plus Opus / MP2 / AC-3 audio encode
replayonContinuous flow recording to disk + clip playback as a fresh input
displayon (Linux)Local-display output (HDMI / DisplayPort + ALSA)
video-encoder-x264offH.264 software transcoding via libx264 (GPL-2.0-or-later)
video-encoder-x265offHEVC software transcoding via libx265 (GPL-2.0-or-later)
video-encoder-nvencoffNVIDIA NVENC H.264 / HEVC
video-encoder-qsvoffIntel QuickSync H.264 / HEVC (x86_64 only)
display-nvdecoffNVIDIA NVDEC hardware decode for the local-display output (h264_cuvid / hevc_cuvid); shares nv-codec-headers with video-encoder-nvenc
display-qsvoffIntel QSV hardware decode for the local-display output (h264_qsv / hevc_qsv); shares libvpl-dev with video-encoder-qsv; x86_64 only
video-encoders-fulloffComposite of every video codec backend — encoders (x264 + x265 + NVENC + QSV) and display HW decoders (NVDEC + QSV-decode). Used by the release tarball; runtime probe auto-detects which backends the host can actually open

Default-off encoder flags are off because they pull in extra system dependencies and (for x264 / x265) flip the binary licence to AGPL-3.0-or-later as a combined work with GPL-2.0-or-later code. The published release tarball turns them on via video-encoders-full so you don’t have to think about this — install the signed binary unless you have a reason to compile your own.