Repository navigation
Add stable Retina 4K 60 fps capture - #160
Merged
Merged
Conversation
This was referenced Aug 7, 2026
Betafer
marked this pull request as ready for review
August 7, 2026 22:10
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
A short story
First of all, thank you for TargetBridge — I genuinely enjoyed the project and its approach.
I had a 21.5-inch 2017 Retina 4K iMac next to a Mac mini M4 and wanted to reuse the iMac's excellent panel instead of buying another display. TargetBridge was the first solution I tried that felt close to turning that machine into a real monitor. While testing it daily over direct links, I experimented with a few additions. I am splitting them by purpose so each idea can be reviewed, accepted or declined independently.
This PR is only the display-quality part. The complete prototype and proposed split are described in #157; measured USB4/network path selection is separate in #159.
What this PR adds
retina4k60preset matching the 21.5-inch iMac panel: 4096 × 2304 at 60 fps, HEVC, 120 Mbps;retina4k,4096x2304andimac4kautomation aliases while preserving the existing4kalias for 3840 × 2160;Why the pacer requests more than 60 callbacks
SCStreamConfiguration.minimumFrameIntervalbehaves as a minimum interval, not a guaranteed cadence. Requesting exactly 1/60 left measurable refreshes unused on the Mac mini M4. The capture request therefore has scheduling headroom, whileTBFrameRatePacerapplies the actual 60 fps ceiling before encoding. It does not buffer frames and resets after idle gaps, so it cannot build up a burst.Validation
git diff --checkclean.The integrated prototype using this same 4K pipeline was also exercised on the actual Mac mini M4 → 2017 21.5-inch Retina 4K iMac setup for about three minutes of high-entropy full-screen motion: sender remained at 60 fps, receiver varied around 59–61 fps, with no observed pipeline backlog or dropped-frame counters. That hardware run predates this intentionally smaller branch, so the automated results above are the reproducible validation for this PR.
Deliberately out of scope
Those are kept separate so this PR can be judged strictly as a capture-quality improvement.