gig
gig /ɡɪɡ/ noun
- a light, narrow boat carried aboard a larger vessel, such as a frigate.
- a small native client that rides alongside Frigate, streaming its cameras.
Native C++ streaming client for Frigate: it discovers every camera from the Frigate API and renders them all in a live Direct3D 11 grid, with click-to-zoom. Live view only.
The native pipeline:
- Discovery fetches
/api/config (Boost.Beast over the app's own TLS stack) and maps each camera to its go2rtc stream.ts URL. A shared TLS session cache resumes handshakes across all connections, and a shared cookie jar carries the Frigate auth token everywhere once login succeeds.
- One FFmpeg decoder per camera. The app terminates TLS itself and feeds FFmpeg the decrypted MPEG-TS through a custom AVIO callback — FFmpeg does no networking of its own. Each stream decodes H.264/H.265 through D3D11VA on the renderer's shared D3D11 device when available, falling back to software decode automatically.
- A health supervisor polls go2rtc byte counters and is the authority on liveness: it tears a decoder down when its bytes stop advancing and brings it back when they resume. FFmpeg handles its own transient reconnects in between.
- SDL owns the window. A thin D3D11 renderer keeps per-camera GPU state and draws each decoded frame letterboxed into its grid cell (or one cell filling the window in focus mode), sampling D3D11 NV12 textures directly with CPU NV12/YUV420P/BGRA fallbacks.
Build
The Windows build script uses vcpkg manifest mode, CMake, Ninja, and the static triplet by default. It creates an isolated private vcpkg checkout under build\vcpkg, installs packages under build\vcpkg-installed, and keeps the vcpkg binary cache/downloads under build. FFmpeg is built from a trimmed overlay port (vcpkg-ports/ffmpeg) that compiles only the surface gig uses — h264/hevc decoders + parsers, the mpegts demuxer, and the D3D11VA hwaccels — which roughly halves the exe.
.\scripts\build_windows.ps1
To configure without compiling:
.\scripts\build_windows.ps1 -ConfigureOnly
Useful overrides:
.\scripts\build_windows.ps1 -BuildType RelWithDebInfo
Run
The app is GUI-only — there are no command-line options or subcommands. (it also opens on F2); fill in your Frigate URL and credentials and the grid comes up. Settings are stored in the Windows registry under (the password is DPAPI-encrypted); you can also seed them by script — a minimal config for a Frigate with authentication enabled: