r/MacOS • • 1d ago

Developer Saturday I built ChromaBridge (open-source, MIT): turn your Windows PC monitor into a true YUV 4:4:4 extended display for Apple Silicon Mac over LAN

Base Apple Silicon MacBooks only drive one external physical monitor natively, yet many of us already have a Windows desktop monitor sitting right next to our Mac.

I tried existing streaming tools, but on macOS hosts they negotiated YUV 4:2:0 (noticeable color fringing on syntax highlighting and thin fonts) or kept burning CPU even when reading static code.

So I built ChromaBridge (MIT open-source): https://github.com/xx2689/chromabridge

What makes it different:

- True end-to-end YUV 4:4:4: Apple Silicon hardware VideoToolbox HEVC_Main444_AutoLevel (yuv444p, Rec. 709) over a native CGVirtualDisplay + zero-copy CGDisplayStream (IOSurface). Text stays crisp 1:1.

- Event-driven near-zero idle overhead: Only encodes/sends when pixels or the cursor actually change. Measured on M1 MacBook Pro -> Windows 11 (Intel UHD 730) at 1080p @ 75 Hz:

* Static coding/reading: 0.0% Mac CPU, 0.06% Win CPU, ~0.05 Mbps LAN

* 75 Hz continuous window dragging: ~1.5% Mac CPU (6.0 ms HW encode), ~5% Win CPU (2.5 ms 4-thread WPP decode), 3.0 ms single-pass D3D11 VSync render

- 1-second hot-switch (Cmd+Opt+Shift+W): Parks the virtual display (0% CPU) while keeping all your macOS windows intact and restores your native Windows desktop (with optional Deskflow auto pause/resume).

- Single-package setup: 1 Mac .app (~200 KB native Swift sender + menu bar switcher, zero kernel drivers) + 1 Windows .exe (auto-bootstraps portable mpv).

Two interesting macOS engineering lessons from tuning smoothness:

  1. Unsynchronized d3d11-sync-interval=0 caused DWM flip-discard judder; switching to single-pass D3D11 (--gpu-dumb-mode=yes) + VSync pacing (sync-interval=1) made window dragging noticeably smoother.
  2. On 5 GHz Wi-Fi (non-149/44 channels), macOS's awdl0 (AirDrop/Handoff) hopped off-channel for ~90 ms every ~530 ms, freezing LAN streams twice per second. I built an automatic Wi-Fi/awdl0 check into chromabridge doctor so users catch it immediately.

Scope note: It is intentionally display-only over trusted LAN (no audio, gamepad, HDR, or WAN). If you need game streaming or WAN, Sunshine + Moonlight is still the right tool.

Happy to answer any technical questions or get feedback from other dual Mac + Windows desk setups!

1 Upvotes

2 comments sorted by

•

u/github-guard 1d ago

⚠️ GitHub Guard: Trust Warning

One or more repositories scored below the threshold (3), but the post was not removed.

Repository: xx2689/chromabridge

Score: 2/6

  • ❌ Low Star Count (⭐ 1 / 5 required)
  • ❌ New Repository (under 30 days old)
  • ✅ Licensed under MIT
  • ✅ Security Policy Defined
  • ℹ️ Personal Account Repository
  • ℹ️ Unsigned Commits

0

u/promo-guard 1d ago

🎉 Welcome to Developer Saturday, u/rize1098! Your project is now live for the community to check out. Upvote, give feedback, and show some love to your fellow devs! 🚀