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 *-full release feature set you need the dev headers for every backend video-encoders-full compiles in — x264 + x265 (software encoders), VAAPI (encode + decode), and QSV (x86_64). Most come from apt:
sudo apt updatesudo apt install libx264-dev libx265-dev libnuma-dev \ libva-dev libvpl-devlibva-dev is required by both video-encoder-vaapi and video-decoder-vaapi; libvpl-dev (oneVPL) covers video-encoder-qsv + video-decoder-qsv and is x86_64 only — omit it on aarch64 (Intel QuickSync is x86_64-only, and the aarch64 *-full artefact excludes QSV).
video-encoders-full also compiles in NVENC (video-encoder-nvenc) and NVDEC (video-decoder-nvdec), which need the NVIDIA codec headers. Ubuntu does not package these — they must be cloned and installed from source before the full build will compile:
git clone https://git.videolan.org/git/ffmpeg/nv-codec-headers.gitcd nv-codec-headers && sudo make install && cd ..Without both the VAAPI headers and the NVENC/NVDEC headers in place, --features video-encoders-full fails to compile. (You don’t need an NVIDIA GPU or driver to build — the headers are enough; NVENC/NVDEC simply stay dormant at runtime on hosts without the driver.)
ARM Rockchip SBCs (RK3568 / RK3588 — NanoPi R5S/R6S, Orange Pi 5, Radxa Rock 5B) only, for the RKMPP hardware H.264 / HEVC encode + decode and the RGA DRM_PRIME→sysmem transfer (rga-transfer). Neither rockchip_mpp nor librga is in stock Ubuntu, so add the maintained Rockchip multimedia PPA first:
sudo add-apt-repository -y ppa:jjriek/rockchip-multimediasudo apt updatesudo apt install librockchip-mpp-dev librga-dev libdrm-devOnly the userspace dev package is needed to build — the VPU (/dev/mpp_service) is a runtime dependency, so this compiles on any aarch64 host, not just a Rockchip board.
# 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 ..
# Edge with Rockchip RKMPP hardware encode + decode (RK3568 / RK3588 only)# rga-transfer is the RGA DRM_PRIME->sysmem copy that fixes RK3588 display stutter —# the feature that distinguishes the aarch64-linux-rockchip release artefact.cd bilbycast-edge && cargo build --release \ --features "video-encoder-rkmpp video-decoder-rkmpp rga-transfer display" && 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) |
video-decoder-nvdec |
off | NVIDIA NVDEC hardware decode for the local-display output (h264_cuvid / hevc_cuvid); shares nv-codec-headers with video-encoder-nvenc |
video-decoder-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-encoder-vaapi |
off | VAAPI H.264 / HEVC encode (h264_vaapi / hevc_vaapi) — AMD (Mesa radeonsi) or Intel (iHD); royalty-free. Needs libva-dev + libdrm-dev; Linux only |
video-decoder-vaapi |
off | VAAPI hardware decode for the local-display output; zero-copy DMA-BUF / KMS scanout. Same deps as video-encoder-vaapi; Linux only |
video-encoder-rkmpp |
off | Rockchip RKMPP hardware H.264 / HEVC encode (h264_rkmpp / hevc_rkmpp, 8-bit 4:2:0) on aarch64 RK3568 / RK3588. Needs librockchip-mpp-dev; not in video-encoders-full (Rockchip-only, links dynamically). Shipped prebuilt as the aarch64-linux-rockchip release artefact |
video-encoders-full |
off | Composite of every x86_64 / generic-aarch64 video codec backend — encoders (x264 + x265 + NVENC + QSV + VAAPI) and HW decoders (NVDEC + QSV-decode + VAAPI-decode). Used by the *-full release tarballs; runtime probe auto-detects which backends the host can actually open. Excludes RKMPP (Rockchip-only — see video-encoder-rkmpp) |
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.