gramps cdf82f688d Read the first instrumented take: the judder did not reproduce, no element is slow
The measurement unit existed to name which of the six scene elements eats ~140ms per
composite. The creator's Release recording (ty-20261016-1841-559-0002.mp4, 174.5s,
1920x1080@60) names none of them — the whole composite costs ~1ms:

  composites     301 per 5s = 60/s, every slot, 0 dropped, 0 stalls after warm-up
  avg render     1.0-1.1ms (worst 2.5ms) = ~7% of the 16.67ms budget
  parts          "#5 HD Pro Webcam C920 0.4ms, #5 ... raster 0.2ms, backdrop 0.2ms"
                 - the other four elements never reach the 0.1ms print floor
  C4 cache       151R/150H: half the ticks were a whole-frame BlockCopy
  webcam         30.0/s at the resolver, longest gap 50.0ms (one 60Hz frame of
                 sampling phase, not a drop)
  the FILE       29.6 distinct webcam images/s, 82% of images held exactly 2 frames,
                 longest hold 267ms (the healthy 30fps-in-60fps signature)

The two stalls are not composite cost: 124ms on the very first render (warm-up) and
53ms entering the "Chat" scene (a rebake).

So the historic slow numbers are not a slow scene but different configurations:
- Oct 9 19:48 (only bad take still on disk) was the VERTICAL tier:
  "FramePump started (1080x1920 @ 60 fps) scene='Live' comp=608x1080" - the 607x1080
  centre crop upscaled to 2M px, 92 renders/5s, avg render 45.0ms, worst 278ms.
- Oct 5 12:01 (141ms) logged no scene=/comp= at all - the suffix did not exist yet,
  so the map's "21:9 -> 1920x803" explanation stays a hypothesis, not a reading.
- Every slow window shows "cache xR/0H" (the whole-frame cache never reusing) while
  this take shows 151R/150H, and one Oct 5 take latches mid-take (1.5ms -> 3.0ms ->
  45.2ms in 15s, then stays). That latch is the lead for the next take; it is a
  hypothesis and the parts line is what will decide it.

Corrections to the map (same commit, stale facts replaced not appended):
- "It was never Debug-vs-Release" is WITHDRAWN: same 1920x1080 tier, Oct 9 = 10.4ms
  vs this Release take's 1.0ms, and Build <hash> carries no configuration - every
  pre-2026-10-16 render number is config-unknown.
- The "same scene shape" 10:01/12:01 comparison is superseded: it was an eye
  comparison of takes whose geometry was never logged.

New: scripts/webcam-cadence.py - the ground-truth probe for what the FILE holds,
beside what the pump says it did. It took three wrong readings to get right (H.264
re-encoding defeats exact-pixel comparison; a round-clip crop's corners leak 60fps
background; a fixed crop across a scene switch reads background), all recorded in
MyMistakes.md as a recipe, including an ffmpeg-native cross-check
(tblend=difference + signalstats.YAVG - the same metric, the technique already in
this repo's A/V-sync recipe) which agreed: 52.2% duplicates / 28.6 distinct/s vs
50.7% / 29.6/s on different windows of the same take.

Next: no fix is allowed yet - the creator makes a Release take in the failing
geometry (vertical 1080p60 tier first), and that take's parts line names the stage.

Docs in the same commit: ai.md (new "What the first instrumented take said" section,
the two corrections, the parts-line denominators, the tool in the inventory),
TASKS.md (reading outcome), HANDOFF.md (rewritten), MyMistakes.md (recipe).

Gates: clean build 0 warnings, full suite 428/428, scope check passed.
2026-10-16 19:05:01 -07:00
Scene strip tile artwork + on-air indicator (creator ruling 2026-10-10). Top-bar tiles now carry their own art: each canonical scene's tile is a per-scene CRT-styled image stored in the internal DB (Scene.ThumbnailAssetId - additive migration, seeded at heal from the creator's five Downloads JPGs via SceneThumbnailSeedPaths), and the preview pane keeps rendering the scene's ORIGINAL background - never the tiles. One shared on-air image (Gemini 4zajyl...jpg) replaces the staged scene's tile and follows the scene swap ('the on-air screen jumps around the top bar as the user swaps scenes'): stored as an Asset BLOB tracked by the OnAirImageAssetId Setting (EnsureOnAirImage, same contract as the alert clip) with MainViewModel.OnAirSeedPath override; RefreshSnapshotsAsync shows it for the staged scene, otherwise thumbnail-or-background art, and a staged Live with no on-air art still falls back to the green placeholder (minis never render live captures). Removed the 6px #22c55e rectangle in PreviewPane's backdrop ('green outline around the preview screen' that surfaced when a scene had no background) - the outer PreviewGlow red border is the real live signal. Doubled the scene-tile labels (FontSize 10 -> 20). Fixed a real bug this surfaced: Save()'s Asset pruner only kept Source/alert-clip rows, so the first save would have DELETED the seeded tile + on-air assets - the keep-set now includes Scene.ThumbnailAssetId and the OnAirImageAssetId Setting. New Settings/Load/Save migrations + SceneThumbnailTests (4 tests: seeded tile in strip, preview keeps original bg, Live-staged tile, no-seed fallback, on-air swap + persistence). 427 pass, 0 build warnings. (Unit: strip tiles + on-air)
2026-10-10 13:27:26 -07:00

LlamaCasty

LlamaCasty — livestream smarter

A free, open-source Windows app for streaming live to YouTube and recording to your PC. Native Windows (C# / WPF / .NET 8). Website: https://llamacasty.com

LlamaCasty — main window with scenes, sources, and live preview

Why I built it

I'm Gramps. I've been gaming since 1981, and these days I stream The Division 2 on YouTube.

When I started streaming, I did what everybody does: I installed the big, general-purpose streaming tools. They're excellent software — powerful, flexible, and built to handle every platform, every camera rig, and every plugin anyone has ever dreamed up. That breadth is exactly what makes them great, and it's also what makes them a lot to learn. Before my first stream I was reading setup guides, picking encoders, balancing audio by hand, and wiring up scenes from scratch. The tools were ready for anything. I just wanted to go live.

Most streamers I talk to are in the same spot. They don't need a tool for every platform and every setup — they need one that's ready for theirs. So I built LlamaCasty around three choices:

  • One platform, done properly. LlamaCasty streams to YouTube and only YouTube. That focus lets it be built around how YouTube Live actually works — your channel, your chat, Super Chats and memberships, Shorts-style vertical video, and the YouTube Partner Program — instead of treating YouTube as one destination among many.
  • Ready the moment you open it. Five scenes (Starting, Live, BRB, Chat, Ending) are set up, your game and voice are balanced with auto-ducking and voice polish built in, and YouTube's settings are filled in. You arrange things by dragging them, then press Go Live.
  • Calm while you're live. A private Test Stream to practice, a layout that locks while you're on air, and warnings only when YouTube reports a real problem.

The general-purpose tools are the right choice when you need everything. LlamaCasty is for when you just want to get your show on air.

Free, and staying that way

LlamaCasty is free forever: no watermark, no branding on your stream, no subscription, no LlamaCasty account. It's also open source (see License) — enjoy it, explore it, experiment with it. If it earns a spot in your setup and you'd like to say thanks, there's a coffee jar and a merch store linked from https://llamacasty.com. Completely optional, never expected, and the app will never ask.

How it's built

LlamaCasty is built through AI-assisted pair programming, under the direction of a developer with decades of experience. Architecture, product direction, and quality gates are human-owned; AI speeds up the implementation. The repo's memory map (below) is how that collaboration stays honest from one session to the next.

Requirements

  • 64-bit Windows 10 or 11. (The bundled FFmpeg and ONNX Runtime are 64-bit only.)
  • A YouTube channel, to stream. LlamaCasty links an existing channel with "Sign in with Google" — it doesn't create accounts. Recording to an .mp4 works without signing in.
  • Working sound in Windows. Desktop and game audio come from your default output automatically; you choose your mic in the app. LlamaCasty doesn't diagnose or repair Windows audio — if it doesn't sound right in Windows, fix it there first.

Build from source

The internal project, assembly, and namespace names are still ytLive (the app was renamed to LlamaCasty; the internals weren't). Building needs Windows and the .NET 8 SDK.

  1. Fetch the bundled FFmpeg (not in git — ~135 MB, pinned and SHA-256-verified): scripts/fetch-ffmpeg.sh

  2. Add your own Google OAuth client. Helpers/OAuthCredentials.cs is gitignored. Create a "Desktop app" OAuth client with the YouTube Data API v3 enabled in Google Cloud Console, then:

    namespace ytLive.Helpers;
    
    public static class OAuthCredentials
    {
        public const string ClientId = "your-client-id.apps.googleusercontent.com";
        public const string ClientSecret = "your-client-secret";
    }
    
  3. Build and run:

    dotnet build ytLive.csproj
    dotnet run --project ytLive.csproj
    

Version roadmap

v1 is the finished product (no v1.x releases are planned). Everything still in the queue lands in v1; anything not on the feature list is on the "Out of product — permanently" list in TASKS.md — read that before asking for a feature.

What v1 ships: the five-scene control surface, webcam + screen capture, media + web + text sources, chat on stream, the social bar, mic/desktop audio with auto-ducking and TRAX background music, local recording, quality tiers including vertical 9:16, one-click go-live + scheduling, stream resilience, monetization awareness (YPP tracker), animated alerts, and webcam background removal and blur — all free and ungated.

Structure

Path Role
Models/ Scene, Source, WebcamSceneConfig, SceneElement, SceneCatalog, QualityOption, StreamConfig/Health, chat, Socials, BroadcastMetadata, Music, MicStatus, BackgroundEffect
ViewModels/ MainViewModel (partial classes per area) + dialogs: GoLive, CameraPicker, MicPicker, HotkeyConfig, Socials, LiveBroadcastForm
Services/ YouTube (OAuth, streams/broadcasts, chat polling), LayoutStore (SQLite), capture (camera/screen-capture/media-file via FFmpeg), SceneCompositor + FramePump, FFmpeg encoder + RTMP, audio pipeline (WASAPI loopback + mic, mixer, filters, ducker, limiter, TRAX), background effects (ONNX person segmentation), SocialValidator, notifications, hotkeys, SceneGraph, ChatOverlayLayer
Helpers/ ViewModelBase, RelayCommand, ImageCache, AppLog, TokenStore (DPAPI), OAuthCredentials (gitignored), converters
Themes/ Controls.xaml — the dark-theme control styles, merged once in App.xaml
MainWindow.xaml Dark-theme control surface: thumbnails + central preview, two-state left panel (layers/properties ↔ live chat), top bar, footer
tools/ Offline helper tools (e.g. selfie-seg/ — converts and verifies the background-effects model)

Docs (memory map)

schema.md defines the conventions; ai.md is the AI/session guide; TASKS.md is the task queue; HANDOFF.md is the current state. Each code directory carries an index.md.

License

LlamaCasty is free software, released under the GNU General Public License v3.0 or later (LICENSE) with three additional terms permitted by GPL-3.0 section 7 (ADDITIONAL-TERMS.md):

  • Keep the credit — any copy, modified or not, shows "Based on LlamaCasty by Gramps — https://llamacasty.com" in its About screen.
  • Rename your fork — modified versions are marked as modified and use a different name.
  • No trademark rights — the LlamaCasty name and llama logo aren't licensed. The icon and logo files are all rights reserved and aren't covered by the GPL.

The scene backgrounds and default alert video are AI-generated placeholders, licensed with the code — replace them with your own. Bundled third-party components keep their own licenses: see THIRD-PARTY-NOTICES.txt.

Source code: https://llgit.llamachile.tube/gramps/LlamaCasty

S
Description
Creator-proof live-streaming and recording app for YouTube — native Windows (C# / WPF / .NET 8). One-click go-live, visual scene building.
Readme
58 MiB
Languages
C# 97.7%
Python 1.5%
Shell 0.8%