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.
What you’ll need
Section titled “What you’ll need”- 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.
Clone the workspace
Section titled “Clone the workspace”The edge has several path-dependency sibling crates that must live in the same parent directory before it can compile:
git clone https://github.com/Bilbycast/bilbycast-libsrt-rs.git # default SRT backendgit clone https://github.com/Bilbycast/bilbycast-fdk-aac-rs.git --recurse-submodulesgit clone https://github.com/Bilbycast/bilbycast-ffmpeg-video-rs.git --recurse-submodulesgit clone https://github.com/Bilbycast/bilbycast-rist.gitgit clone https://github.com/Bilbycast/bilbycast-bonding.gitgit clone https://github.com/Bilbycast/bilbycast-edge.gitgit clone https://github.com/Bilbycast/bilbycast-relay.gitCargo 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.
Install build-time apt packages
Section titled “Install build-time apt packages”sudo apt updatesudo apt install build-essential cmake make clang libclang-dev pkg-config \ libssl-dev g++ libdrm-dev libasound2-dev libudev-devTo match the release feature set (libx264 + libx265 software encoders, plus NVENC + NVDEC headers):
sudo apt updatesudo apt install libx264-dev libx265-dev libnuma-devx86_64 only, for the QuickSync encoder (oneVPL):
sudo apt updatesudo apt install libvpl-dev# 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 encoderscd bilbycast-edge && cargo build --release && cd ..
# Relaycd bilbycast-relay && cargo build --release && cd ..The release binaries land in each crate’s target/release/.
./bilbycast-edge/target/release/bilbycast-edge --config config.json./bilbycast-relay/target/release/bilbycast-relayFor 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.
Feature flags
Section titled “Feature flags”The most useful Cargo feature flags on the edge:
| Flag | Default | Effect |
|---|---|---|
tls | on | HTTPS + RTMPS |
webrtc | on | WebRTC WHIP / WHEP via str0m |
fdk-aac | on | In-process AAC decode and encode |
media-codecs | on | In-process video decode + thumbnail JPEG, plus Opus / MP2 / AC-3 audio encode |
replay | on | Continuous flow recording to disk + clip playback as a fresh input |
display | on (Linux) | Local-display output (HDMI / DisplayPort + ALSA) |
video-encoder-x264 | off | H.264 software transcoding via libx264 (GPL-2.0-or-later) |
video-encoder-x265 | off | HEVC software transcoding via libx265 (GPL-2.0-or-later) |
video-encoder-nvenc | off | NVIDIA NVENC H.264 / HEVC |
video-encoder-qsv | off | Intel QuickSync H.264 / HEVC (x86_64 only) |
display-nvdec | off | NVIDIA NVDEC hardware decode for the local-display output (h264_cuvid / hevc_cuvid); shares nv-codec-headers with video-encoder-nvenc |
display-qsv | off | Intel QSV hardware decode for the local-display output (h264_qsv / hevc_qsv); shares libvpl-dev with video-encoder-qsv; x86_64 only |
video-encoders-full | off | Composite 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.