Skip to content

About

๐ŸŒด 30 FPS in, 60 FPS out. Real-time frame generation for GTA VI (and any 30 FPS console game) over an HDMI capture card.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

ย 

History

13 Commits

Folders and files

NameName
Last commit message
Last commit date
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

PhantomFrame

PhantomFrame

Your console runs GTA VI at 30 FPS. Your PC shows it at 60.

Real-time, motion-compensated frame generation for console gameplay captured over HDMI.
Plug in a capture card, run one command, and cruise Leonida at a smooth 60 FPS (or 120, if you're feeling reckless).


โšก Quick setup

Windows

  1. Plug your capture card into the PC and the console into the capture card.

  2. Press Start, type PowerShell and open it.

  3. Paste this line and press Enter:

    irm https://raw.githubusercontent.com/rpatty-dev/phantomframe/main/install.ps1 | iex
  4. PhantomFrame opens when the install is done. Next time, double-click Launch.bat in the PhantomFrame folder on your Desktop.

macOS

  1. Plug your capture card into the Mac and the console into the capture card.

  2. Press Cmd + Space, type Terminal and open it.

  3. Paste this line and press Return:

    curl -fsSL https://raw.githubusercontent.com/rpatty-dev/phantomframe/main/install.sh | bash
  4. Click Allow when macOS asks to use the camera (the capture card counts as one). Next time, double-click PhantomFrame on your Desktop.

Then

  • F11: fullscreen
  • HOME (\ on Mac): settings
  • Updates install automatically on launch. To force one, run the same line again. Your settings are kept.

You don't need git, Python or admin rights: the installer downloads everything it needs. Need: Windows 10/11 or macOS ยท a USB HDMI capture card ยท any GPU with OpenGL 3.3. Mac: if you clicked Don't Allow, turn the camera on for Terminal in System Settings > Privacy & Security > Camera.


๐ŸŒด What you get

Frame generation

60 FPS from 30 FPS Every real frame gets a motion-compensated in-between frame, alternating exactly 1:1.
90 / 120 / 144 FPS targets 3x and 4x generation for high refresh monitors (120 is experimental).
Display-locked pacing Frames are presented on your monitor's own refresh (DWM vblank) instead of a timer, and a phase lock keeps each frame's deadline halfway between refreshes so capture jitter can't make it skip or double.
Adaptive delay The output waits just long enough for motion vectors to be ready (90th percentile of measured flow time, from 7 ms), so latency stays as low as your PC allows.
Fast DIS optical flow at 640ร—360 on its own thread (about 1โ€“2 ms), frame building in a GPU shader.
Two flow presets ULTRAFAST (~1.7 ms) or FAST HQ (~4.2 ms, finer edges). Denser flow patches give +0.15 dB at about +1 ms.
Two latency modes 16.6 ms hold interpolation (artifact free) or 0 ms hold hybrid extrapolation (instant).
Motion smoothing Motion vectors are blended with the previous frame's, so moving edges don't wobble.
Motion blur Adjustable shutter blur along the motion, for a cinematic look.

Made for GTA VI

Vignette removal Undoes GTA VI's heavy screen-edge darkening with a curve fitted on tracked points across camera pans in real gameplay. Bright sky and water near the edges are eased off so they don't wash out to white.
Minimap kept true The minimap is drawn on top of the game's vignette, so vignette removal leaves it alone. Because the map rotates, it is crossfaded instead of warped: the best of 10 methods tested (+1.7 dB on the map, no added latency).
HUD & text lock Crosshair, HUD and subtitles are detected and protected from warping, so text never smears.
Clarity / dehaze Local contrast in the midtones cuts through Leonida's humid haze without crushing shadows.
Vibrance Lifts dull colours more than already saturated ones, so skin tones stay natural.
Contrast Optional S-curve for deeper shadows and brighter highlights.
Before / after Press B to split the screen: the left half shows the image without vignette removal and grading.

Picture cleanup

Capture card cleanup A per-frame pass removes MJPEG 8ร—8 blocking, mosquito noise and smeared colour (colour is rebuilt along luma edges, because MJPEG stores it at reduced resolution).
No flicker The cleanup runs once per captured frame, before generation, so real and generated frames get exactly the same cleaned image.
Edge-safe sharpening Contrast adaptive sharpening that backs off around text and hard edges. Off by default, since the cleanup pass already gives a clean image.

Quality of life

Settings remember themselves Every control in the settings panel is saved to settings.json the moment you change it and restored on the next launch.
Auto updates GitHub is checked on launch; a newer release installs itself using the same one-line installer. Disable it in settings.
FPS counter Small top-right counter of the measured output FPS (P hides it).
Telemetry bar Capture rate, console FPS, flow time and render rate (O). Hidden by default.
Debug views Split screen (30 FPS vs generated) and an optical flow heatmap.
Low-latency audio Capture card audio straight to your speakers, with output device switching.
Clip recording Record an 8 s clip to recordings/ for benchmarking.

Defaults

Tuned on real GTA VI gameplay. Change anything with HOME (\ on macOS); your changes are kept.

Setting Default
Target 60 FPS (2x)
Mode Frame Generation (Full)
Latency 16.6 ms hold interpolation
Flow ULTRAFAST
Sharpness 0%
Motion blur 22%
Remove game vignette 100%
Clarity / dehaze 33%
Vibrance 75%
Contrast 1%
Motion smoothing, HUD & text lock on
Telemetry bar off

๐ŸŽฎ Controls

Key Action
HOME (\ on macOS) Settings panel
F11 / F Borderless fullscreen (works with overlays)
Space Frame generation on / off
Tab Cycle mode: frame generation, raw passthrough, split screen, flow heatmap
E Switch latency mode (hold interpolation / 0 ms extrapolation)
Q Switch flow preset (ULTRAFAST / FAST HQ)
S Cycle sharpness (0, 25, 45, 75, 100%)
H HUD & text lock on / off
B Before / after split
P FPS counter on / off
O Telemetry bar on / off
R Record an 8 s test clip to recordings/
M Mute audio
A Cycle audio output device
Esc Close settings, then exit fullscreen

๐Ÿ“บ Best results: console settings

  • Video output: 1080p, not 4K. Most USB cards shrink a 4K signal badly.
  • HDR: off. Capture cards wash it out.
  • Refresh rate: 60 Hz.
  • On the PC: set your monitor to 60 Hz or 120 Hz. 60 doesn't divide evenly into 144 Hz, so frames would show for uneven lengths.

๐Ÿง  How it works

 HDMI 60 Hz โ”€โ”€โ–บ Capture thread โ”€โ”€โ–บ drop repeated frames โ”€โ”€โ–บ unique 30 FPS frames
                     โ”‚                                          โ”‚
                     โ”‚ timestamps every HDMI frame               โ–ผ
                     โ”‚ as an output "tick"               Flow thread (DIS optical flow, 960ร—540, ~5 ms)
                     โ–ผ                                          โ”‚
              Tick scheduler โ—„โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€ motion vectors โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
                     โ”‚   shows each tick after an adaptive delay (p90 flow latency)
                     โ–ผ
   on upload: deblock โ†’ denoise โ†’ colour edge rebuild (same clean image for real and generated frames)
                     โ–ผ
           GPU shader: re-anchor vectors at the in-between moment โ†’ warp both frames toward it
                       โ†’ protect HUD & minimap โ†’ motion blur โ†’ sharpen โ†’ vignette removal โ†’ grading
                     โ–ผ   presented on the display's vblank, phase locked
                 60 FPS on screen

Each unique frame from the console gives one generated midpoint tick, and each repeated HDMI frame gives one real frame tick. Output follows the capture card's own clock, so pacing stays locked to the source.


๐Ÿ“Š Measured quality

tools/bench.py replays a recorded clip. It predicts every middle frame from its neighbours with the app's real pipeline and scores the result against the real frame (PSNR, higher is better). The test was fast gameplay at about 25 px of motion per frame:

Method PSNR
Crossfade (what cheap "motion smoothing" does) 25.06 dB
PhantomFrame v1 25.27 dB
PhantomFrame (current) 26.43 dB
python tools/bench.py recordings/clip_XXXX.npy
$env:PRESET=1; python tools/bench.py recordings/clip_XXXX.npy   # score the FAST HQ flow preset

Press R in the app to record your own clip.


๐Ÿ”ง Modes

python gta6_framegen.py          # PhantomFrame frame generation (60 FPS default)
python gta6_framegen.py --lsfg   # clean 30 FPS passthrough, for use with Lossless Scaling's LSFG
python gta6_framegen.py --self-test   # 4 s check that capture, shaders and rendering work

With --lsfg the picture still gets the cleanup, vignette removal and grading, with motion blur off. Click the window, press F11, then start LSFG in Lossless Scaling. The FPS counter is hidden there because Lossless Scaling draws its own.


๐Ÿฉน Troubleshooting

Problem Fix
Black screen Close and reopen. Another app may still be holding the capture card.
Wrong camera opens Install ffmpeg (winget install ffmpeg) so the card is found by name.
Overlay tools stop working in fullscreen Use F11. It's borderless, not exclusive fullscreen.
Soft or blocky image Set the console to 1080p. A USB 2.0 card (MS2109 chip) is limited to compressed MJPEG.
Judder Set the monitor to 60 or 120 Hz, not 144.

PhantomFrame is an independent fan project. It is not affiliated with, endorsed by, or connected to Rockstar Games or Take-Two Interactive. Grand Theft Auto and GTA are trademarks of Take-Two Interactive Software. It works with any console or game that outputs 30 FPS over HDMI.

About

๐ŸŒด 30 FPS in, 60 FPS out. Real-time frame generation for GTA VI (and any 30 FPS console game) over an HDMI capture card.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages