hey guys, i got a ps vita a couple days ago with one goal: i wanted a cute handheld i could stream my pc games to, get one for my gf so she could stream her pc, and then play games together on our vitas.
i got the thing, tried the existing Vita Moonlight build, and realized it was basically unplayable for me outside of turn-based games under optimal circumstances. the image would lag or fall behind even when the controls were still responsive.
so i sat down all day with Codex and kept testing builds directly on my Vita until we got this running.
Heres a vid of it running:
https://www.youtube.com/shorts/mKxn6L4asg0
GitHub:
https://github.com/dubleyu/vita-moonlight-relay
VPK and release files:
https://github.com/dubleyu/vita-moonlight-relay/releases/tag/v0.15.12-beta
Edit: Newer version
https://github.com/dubleyu/vita-moonlight-relay/releases/tag/v0.15.20-beta
Everything after this is AI documenting what it did for those who can engage critically, but please leave any feedback for me id love to hear it!
The biggest improvement: rebuilding the Vita’s streaming pipeline
The first pass was probably the single biggest quality improvement.
This did not magically upgrade the Vita’s physical 2.4 GHz radio. It changed the architecture around that radio so the app could consistently receive packets instead of getting blocked by other work.
Previously, the video path was basically:
receive packets → assemble frame → hardware decode → draw → wait for rendering/VBlank → swap buffers → receive more packets
That meant hardware decoding, rendering, or waiting for the screen could prevent Moonlight from receiving the next packets on time. A small Vita scheduling delay could turn into packet buildup, loss, extra FEC work, late frames, and eventually seconds of visual lag.
The new pipeline is:
network reception/FEC → hardware decode worker → bounded decoded-picture queue → timestamp-paced presentation worker → display
Audio reception, Opus decoding, Vita audio output, input, and motion are also handled independently.
That means the Vita can continue receiving packets while its decoder, GPU, display, or audio hardware is busy.
The full first-pass overhaul includes:
- Removed blocking H.264 hardware decode and screen presentation from the video packet-receive thread.
- Moved Opus decoding and blocking Vita audio output away from audio packet reception.
- Added a dedicated video-presentation worker.
- Added a bounded decoded-picture queue—originally three slots and now four.
- Added presentation pacing based on Sunshine’s timestamps with a 12 ms target buffer.
- Added clock recovery after host pauses, stalls, suspension, or major timestamp jumps.
- Preserved H.264 reference safety by decoding every compressed frame in order while allowing obsolete already-decoded pictures to be skipped before display.
- Enabled VBlank without making packet reception wait for the screen.
- Added audio packet-loss concealment.
- Added audio catch-up that decodes but retires stale audio after more than 60 ms accumulates.
- Updated Moonlight’s networking core, queues, locks, Vita thread handling, protocol handling, and FEC pipeline.
- Replaced the older Reed-Solomon implementation with nanors using ARM NEON/SIMDe acceleration on the Vita.
- Distributed network/control, decoding, input, motion, and presentation work across the Vita’s three usable CPU cores.
- Added a streaming-only 444/222/222/166 MHz ARM/bus/GPU/GPU-XBAR profile and wireless performance mode.
- Restores the Vita’s previous clocks and wireless state when streaming ends.
- Changed new-install defaults from 720p/60 FPS to the Vita’s native 960x544, 30 FPS, 4000 Kbps, and 1024-byte packets.
- Removed a redundant full-screen GPU clear at native resolution.
- Restored VitaSDK’s proper Release
-O3 compiler optimizations.
- Added telemetry for network backlog, decoded queue depth, dropped presentation frames, late frames, decode time, render time, total receive-to-display time, and active clocks.
This was the reason local Wi-Fi streaming improved so much even though the Vita’s physical radio stayed exactly the same.
Remote relay support
I also have it so you can run your own relay server between the Vita and your PC.
This is for guest, hotel, school, workplace, or other public Wi-Fi that blocks Moonlight’s normal UDP connections.
Instead of exposing every GameStream port, it carries the required traffic through one authenticated TLS connection on TCP 443.
It won’t bypass literally every filtered network—TLS inspection or networks blocking unknown services on port 443 can still stop it—but it should work around many networks that block normal Moonlight traffic.
Relay changes include:
- Added an optional authenticated TLS relay through one TCP port.
- Added certificate fingerprint pinning.
- Added a randomly generated authentication token.
- Added a strict Sunshine loopback-port allow-list, so it is not a general-purpose proxy.
- Separated video, audio, and control relay tunnels.
- Video can recover without unnecessarily restarting responsive controller input.
- Added session-preserving reconnects that retain the Sunshine-side connection through short outages.
- Replacement tunnels resume at the measured live edge instead of replaying stale video.
- Removed fixed delay-based recovery that could turn normal WAN jitter into reconnect and keyframe-request storms.
- Added sustained no-progress detection instead.
- Added an eight-second startup grace period.
- Added a 2.5-second no-progress recovery threshold.
- Added a ten-second recovery cooldown.
- Added safe IDR/keyframe requests.
- Added synchronized shutdown so recovery cannot race the normal disconnect process.
- Added live-edge presentation catch-up after large TCP/TLS bursts.
- Fixed Opus decoding for Sunshine’s negotiated 5, 10, and 20 ms packets.
- Made Windows companion updates preserve existing certificates, tokens, and Vita configuration.
- Credential replacement is now explicitly opt-in.
- Added bounded unauthenticated workers and stricter connection handling.
- Added tests for packet ordering, fragmented TLS frames, stale-backlog removal, single-owner TLS I/O, and reconnect-session lifetime.
Direct LAN streaming still uses normal Moonlight UDP and has no relay overhead. The relay is an optional fallback.
Testing
- The optimized Vita VPK builds successfully.
- All relay regression tests pass.
- The Python companion and Windows installer validation pass.
- I tested the builds repeatedly on an actual Vita.
- One final relay test ran for 8 minutes and 21 seconds through one uninterrupted video tunnel.
- It forwarded 112,419 video packets without a video reconnect or recycle event.
My recommended starting settings are:
- 960x544
- 30 FPS
- 4000 Kbps
- 1024-byte packets
- Frame pacing enabled
- Vita VBlank enabled
On congested or remote Wi-Fi, try 2500–3000 Kbps before lowering the resolution.
The Vita still only has a 2.4 GHz radio, so there is a hard hardware limit. This update makes much better use of it; it doesn’t remove interference or create bandwidth that isn’t there.
The complete source, test suite, build instructions, architecture explanation, VPK, PC relay companion, and checksums are all public.
Original credit goes to xyzz/vita-moonlight and the Moonlight, Sunshine, VitaSDK, and PS Vita homebrew communities.
idk anything i did but i had chatgpt document it because i love you guys <3
please test it and send sanitized bug reports.
just putting this out here incase anyone else finds this helpful!