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 go2rtcstream.tsURL. 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.
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.ps1To configure without compiling:
.\scripts\build_windows.ps1 -ConfigureOnlyUseful overrides:
.\scripts\build_windows.ps1 -BuildType RelWithDebInfoThe app is GUI-only — there are no command-line options or subcommands. On first run the settings dialog opens automatically (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 HKCU\Software\gig (the password is DPAPI-encrypted); you can also seed them by script — a minimal config for a Frigate with authentication enabled:
New-Item -Path 'HKCU:\Software\gig' -Force | Out-Null
Set-ItemProperty 'HKCU:\Software\gig' -Name base -Value 'https://frigate.example:8971/'
Set-ItemProperty 'HKCU:\Software\gig' -Name user -Value 'viewer'
# password is DPAPI-wrapped (CurrentUser) and stored as REG_BINARY:
Add-Type -AssemblyName System.Security
$blob = [Security.Cryptography.ProtectedData]::Protect([Text.Encoding]::UTF8.GetBytes('secret'), $null, 'CurrentUser')
Set-ItemProperty 'HKCU:\Software\gig' -Name password -Value $blob -Type BinaryLaunch gig.exe. A slim toolbar across the top shows the app name and live status (cameras up, frame rate, bandwidth, CPU) with gear / refresh / list icon buttons for Settings, Reconnect, and Log (hover for tooltips). The toolbar sits above the grid — cameras render in the area below it, undisturbed — and in single-camera zoom view it auto-hides so the image goes full-screen until you move the mouse. Each camera tile is labeled — click one to zoom it to fill the window, click again (or press Esc) to return to the grid. Settings (or F2) opens a settings dialog; Reconnect (or F5) re-logs-in, re-discovers, and rebuilds without restarting; Log toggles a full-window log view (Esc or the ✕ closes it). Esc in the grid quits. On first run (or unusable config) the settings dialog opens automatically.
Two independent layers; mix them as your setup requires:
- Frigate login (
user/password) — POSTs{base}/api/loginat startup, then carries the returnedfrigate_tokencookie on every API and video request, re-logging-in everylogin-refreshseconds (default 600) to keep the token fresh. This is the normal way to talk to Frigate's authenticated port directly. - TLS / client certificates — with no
ca/cert/keyset, server certificates are verified against the Windows certificate store, and a client certificate (from CurrentUser\MY, signed via CNG so the private key never leaves the store) is offered only if a server's TLS handshake actually requests one — the cert picker and consent prompt appear just then, once per run. Setca(andcert/keyfor client auth) to use PEM files instead, e.g. behind a client-cert-checking reverse proxy.
Server certificates are also checked against the requested hostname, and a certificate pin (trust-on-first-use) is offered if a server's cert can't be verified the normal way: a dialog shows the certificate details and its SPKI-SHA256 fingerprint, and pinning it (stored per host under pins/ in the registry) trusts that exact certificate thereafter. If a pinned certificate later changes, a louder warning distinguishes a normal renewal from possible interception. insecure disables verification and pinning entirely.
base, user, password (encrypted), login-refresh (REG_QWORD); ca, cert, key, url (single-stream mode without discovery), stream-url (override the discovered stream URL template) — all REG_SZ; software (force software decode; decode already auto-falls-back when no hardware path is usable), overlay (diagnostics tile on/off), insecure (skip server-cert verification, testing only) — REG_DWORD 0/1; poll-interval (health poll seconds), rw-timeout-us (per-connection I/O timeout) — REG_QWORD.
Set up Guided Access if the device is meant to display a permanent video wall:
- Go to Settings > Accessibility > Guided Access and turn it on.
- Set a passcode (different from the device unlock PIN, if you want).
- Open your Gig.
- Triple-click the side/power button.
- Hit Start.
The result: The device is now locked into Gig. Swiping up doesn't work, the control center is disabled, and notifications are hidden. The only way to exit back to the home screen (or access any other data) is to triple-click the hardware button and enter the Guided Access PIN.
- Justified/aspect-aware layout and a hero+spotters mode beyond the uniform grid.
- A renderer abstraction for non-Windows backends.
Issues and PRs welcome.
This is a personal, non-commercial project. Copyright (C) 2026 Marton Anka
