Repository navigation
Releases
Releases · nicolas-riera/ALVR-PS4
0.12.0
ALVR PS4 v0.12.0 - changes since v0.11.1
PS4 app
- PS Moves out of the camera's view are predicted, like Quest 2 controllers. Before,
a hidden PS Move kept the tracker's own estimate (good for a second, then frozen in
place), jumped up to 50-90 cm when the camera saw it again, and went "searching" in
SteamVR after 10 s. Now:- lost within arm's reach of the head (1 m) with the headset on and the controller in
hand: it keeps the tracker's estimate as long as that is likely right. The app adds up
how far the hand has probably moved since the loss: your head moving, your body
turning (times the hand's distance from the head) and the controller turning (times
the forearm). Once that reaches 20 cm (and not before 0.5 s), an arm model takes over:
the elbow stays fixed to your body, following your head's position and its turns
beyond 35 degrees (looking aside does not swing hidden hands), and the controller
pivots around it with its own rotation. It never goes searching; - put down (its accelerometer goes still for 0.5 s: a hand always shakes it a little;
or it stays quiet while the headset moves 30 cm away from it; a clear shake or turn
picks it up again): back to where the tracker's estimate last placed it (Beat Saber's inertial
estimate), gliding there, and never searching. Picked up again, everything starts
over from there; - further away, or with the headset off (proximity sensor): the tracker's position, and
searching only after 10 s AND more than 80 cm from where it was lost; - seen again: it glides to the tracked position instead of jumping, within a few frames
when it moves fast, over about 0.3 s when held still; - the first second after a loss is still the tracker's own estimate, so fast swings out
of view (Beat Saber) behave as before.
The lobby and ALVR PS4 Tracking Viewer show the predicted position (grey while hidden).
The Dev logs say "move L/R: lost ... (near: arm model allowed / far: plain rule, turning
... deg/s)", "arm model after ... s (tracker estimate likely ... m off)", "put down" /
"picked up" with the rotation speed, and "seen again after ... s, gliding ... m".
- lost within arm's reach of the head (1 m) with the headset on and the controller in
- Settings order: the trackpad settings come right after Vibration, then "Open the
settings when back in the lobby", then Performance overlay, just above Tracking (Reset). - Trackpad behaviour settings, per hand ("Left trackpad behavior": Move button and
Triangle; "Right trackpad behavior": Move button and Square):- which button touches and which clicks (by default the Move button touches and
Triangle / Square clicks). The two always differ: changing one changes the other; - for each button, how it places the point: "Default" (as before: from the pad centre,
following the controller's rotation since the press) or "Alternate", like Rec Room's
locomotion. With Alternate the point is where the controller points relative to the
headset: straight ahead = top of the pad, left = left, behind = bottom. Turning your
head while pointing the same way keeps walking the same way. The point stays at the
edge, except pointing up: within 40 degrees of straight up it comes in to the centre
(reached pointing straight up). Pointing straight down keeps the last direction; - a click also touches; with both buttons held, the click button's way places the point.
- which button touches and which clicks (by default the Move button touches and
0.11.1
ALVR PS4 v0.11.1 - changes since v0.11.0
PS4 app
- Fade to black between the lobby and the game, both ways (0.3 s out, 0.3 s in): the
lobby fades out once the first picture of the game is ready, then the game fades in;
going back to the lobby fades the game out first. A stream that stops on its own gives
way to the lobby fading in. - Settings open by themselves when you come back to the lobby from the game (new
setting "Open the settings when back in the lobby", on by default). Closing them keeps
you in the lobby, as before. - Reset tracking button at the bottom of the settings: the same tracking reset as a
trip through the PS menu, without leaving the app. - Floor kept in place after a tracking reset: a reset makes the tracker estimate the
PS Camera's tilt again, which moved the floor by a few centimetres. The app now compares
your neck height just before the reset (PS menu or Reset tracking) with the second after
it and moves the floor by the difference, when you stayed in place (less than 25 cm
sideways, 12 cm up or down). The Dev logs say "floor: re-anchored" or why not. - Worn detection from the headset's proximity sensor for the "confirm your position"
screen:hmu_mountin the headset information, read a few times per second (checked on
the console: 0 as soon as the headset is taken off, 1 when it is put on). It is trusted
once it has said "worn" during the launch; until then the headset moving is still the
clue. Every change of the headset information is logged in full. - Tracking sent to ALVR PS4 Tracking Viewer (the new PC program below): while its
window is open, the app sends it the headset, PS Moves and DualShock 4 tracking (UDP port
9955) up to 60 times a second, in the lobby and during a game. Nothing is sent otherwise.
ALVR PS4 Tracking Viewer (new PC program, installed by the setup)
- A window on the PC showing what the PS4 tracks, live: the headset as a wireframe
PS VR modelled on the real one (front unit with its silver trim and light shield, rigid
headband, rear unit, pads) with its nine blue lights where they are; the PS Moves and
DualShock 4 with their pressed buttons, triggers, sticks and touchpad, as in the lobby;
the PS Camera; on the lobby's floor grid. Something the camera does not see turns grey,
the headset's lights included. - Free camera: left drag turns around, right drag (or Shift + left drag) moves, the
wheel zooms, double-click or R resets it. - Asks for the PS4's IP address (shown in the lobby) and remembers it; it can also be
given on the command line. F2 changes it. The title bar says whether the PS4 answers, or
runs another version. - Recording and playback: a bar at the bottom records what the window shows, plays it
back (play / pause, a slider that goes where you click and follows the mouse, 5 s
steps) and saves it to a.psvrdatafile where you choose; recordings load back with Load, by dropping the file on the window, or from the
command line, without a PS4. Shortcuts: Ctrl+R record / stop, Space play / pause, L back
to live, Left / Right 5 s, Home start, Ctrl+O load, Ctrl+S save. - Installed by the PC setup in
ALVR-PS4_PC-Streamer\(the .bat carries it; no
shortcut). One portable .exe, also usable on its own.
PC setup (ALVR-PS4-Setup.bat)
- Audio cable toggle: an uninstalled cable no longer blocks it. Uninstalling Virtual
Audio Cable leaves its "Line 1" speaker and microphone in the Windows registry, marked
disabled; the toggle took them for a cable turned off in Device Manager, asked to enable
its driver and left ALVR's microphone as it was. They are now ignored when the cable's
driver device is gone (the setup no longer counts them either). Added to this release's
ALVR-PS4-Setup.bat after its publication.
Development
- ALVR PS4 Tracking Viewer lives in
companion/, built in WSL with MinGW-w64 by
tools/build_companion.sh; it compiles in the lobby renderer and the shared wire format
(client/src/trackview_proto.h).tools/make_release.pyembeds it in the setup .bat
(build it first).tools/test/lobby_preview.cpphas a mode 11 for its headset model. - The project is now under the MIT License (
LICENSE, with the third-party notices for
ALVR's foveation math and the icons). - New page
docs/psvr-technical-reference.md(linked from the README): a detailed
technical reference of the PS VR headset and the PS4's VR system as this project uses
them: the headset library, the system dialogs, the VR display mode, the reprojection
compositor, the camera tracker, the PS Move and DualShock 4, raw HID reads, audio, the
video decoder, coordinate systems, error codes and open questions. - New page
docs/ps4-video-decoder.md: the PS4 video decoder in depth (libSceVideodec2's
API and limits, how the system decoder is built, pipeline depth, bench measurements, the
hardware decoder question, libSceVideodec v1, colour conversion and paced display). - The video decoder page has a diagram (Mermaid) of the whole video pipeline, from the
camera tracking to the PSVR panel, with the time each stage takes. - Documentation review: the README pointed to the v0.10 package and now mentions Calibrate;
the PC setup page no longer says a late controller stays greyed out (the driver patch
fixes it) and explains a turned-off audio cable; troubleshooting gained the blinking
camera, the floor shifting after a tracking reset and the PSVR connection prompt, and its
stutter hint uses the performance overlay; the development page lists every source file
and every field of the Dev log line; the protocol page links ALVR's sources instead of a
local folder and says the client supports foveated encoding.
0.11.0
ALVR PS4 v0.11.0 - changes since v0.10.0
PS4 app
- Smoother stream with lower latency (automatic, no setting). Tested in Beat Saber:
about 60 ms from head motion to photons, with almost no stutter.- Frames that arrive bunched together (Wi-Fi, PC) no longer fill the small queue in
front of the decoder: a dropped frame froze the picture until the PC sent a full new
one (up to 32 times per 5 seconds in a game). Frames are only dropped if the decoder
really cannot keep up. - Each frame is shown at a time computed from the PC's very regular frame clock plus a
margin that follows the network's actual jitter, instead of as soon as it is ready:
no more repeated-then-skipped frames when frames come a little irregularly. A small
tolerance around that time removes the stutters that were left (20-40 per 5 seconds
before, 0-5 now). - Frames are handed to the headset's compositor just before it reads them: they used to
wait one more refresh (11 ms). - A safety net shows the newest frame if frames ever pile up.
- Frames that arrive bunched together (Wi-Fi, PC) no longer fill the small queue in
- 60 Hz setting: lower latency - At 60 Hz (60 fps shown twice each at
120 Hz, like PS VR games) the decoder holds each frame for less time, about 17 ms less.
60 Hz is the smoother choice for games the PC cannot run at 90 fps. - Performance overlay: a new setting shows, below the centre of the view while playing:
console (PS4 or PS4 Pro), refresh rate, bitrate, frame rate, latency, decoding time and
the wait before display, and the frames dropped, repeated, late or lost in the last second
(in orange when there are some). Off by default. - Height calibration: a "Calibrate" button in the first launch wizard and in the
settings opens a panel with two pictures; do either:- touch the floor with a PS Move's ball and pull its trigger: the floor is measured where
it really is (the PS Camera must see the floor; the DualShock 4 is not accepted, its
tracking is not precise enough); - spread your arms straight out to the sides holding both PS Moves pointing straight up
and pull both triggers: your height is measured from your arm span.
The panel shows whether the camera sees what it needs, and why an attempt was refused.
Then it goes back to the wizard or the settings with the height found, which can still be
fine-tuned with - / +. Cancel goes back without changing anything.
- touch the floor with a PS Move's ball and pull its trigger: the floor is measured where
- Your height follows the headset: the settings show the height the headset is at now
above the floor, and - / + change it from there. The height to floor conversion was
corrected (the floor was about 5 cm too low for the height entered). - First launch: no grid until the height is set: the floor is only a guess until then;
the grid appears once the height is set with - / + or measured. Confirm without touching
it places the floor from where the headset is at that moment. The game stays paused in
the lobby while the panel is open. - Headset lost / not tracked yet in the lobby: when the camera loses the headset, the
grid and the texts fade to black but the PS Camera and the controllers stay shown where
they are. Before the headset is tracked (at launch, after the PS menu), only the PS Camera
is shown, ahead, blinking blue and red. If that lasts more than 10 s while the headset
moves (worn), the PS4's "confirm your position" screen opens, once per launch (as VR
Worlds does). - Back to the lobby while playing: hold Cross on the left PS Move or Circle on the
right one (the buttons the Vive wand mapping leaves free) for 1 second: the lobby comes
back, with the settings; hold it again to return to the game. SteamVR keeps the headset
and the controllers, and game audio and the microphone keep working; the buttons are not
sent to the game meanwhile, its vibrations are ignored and the video is not decoded. - Vibration strength: a slider in the settings, from "Off" to full strength (the
default), for the PS Moves and the DualShock 4, in games and in the lobby. Releasing it
gives a sample buzz. - Long vibrations no longer stop by themselves - The PS Move stops its
motor a few seconds after the last command; a long vibration is now sent again every
second. - Scrolling settings: the rows scroll (grab the panel with the laser and drag, grab the
scroll bar on the right edge or click its track, or the DualShock 4's right stick). The
title and Close stay in place. - Play area: SteamVR now gets Sony's recommended PS VR play area (1.9 m wide, 2.4 m deep,
from the PS VR manual) instead of 2 x 2 m. Games that read the play area size see it
(SteamVR's own bounds stay hidden, as before). - Latency graphs in the ALVR dashboard: the PS4 sends ALVR its per-frame statistics,
so the dashboard's Statistics tab shows the latency and frame rate graphs. - The "open settings" hint in the lobby names only the controllers that are connected
(Start on a PS Move, Options on the DualShock 4), and asks to connect one when none is. - HEVC streams are decoded too (more slowly than H.264, which stays the setting).
- Fixed: changing only the headset prediction in the settings was not saved.
- Fixes from a full code review:
- A PS Move could keep vibrating after a game's vibration ended.
- Coming back to the game from the lobby (or after the PC reconnected) could flash, for a
frame or two, the last picture from before. - Holding both lobby buttons switched to the lobby and straight back; it now switches
once. - The extra controller prediction stayed on in the lobby after going back to it while
playing (the Moves and the lasers were drawn ahead of the hands). - The settings are saved to a temporary file first: closing the app while it saves can no
longer erase them. A save that cannot be read at start is no longer replaced with the
defaults (which also gave the PS4 a new name the PC had to trust again). - The microphone came back 3 times too slow and low-pitched when it had failed to open
once earlier; it also reopens by itself when it stops working. - The headset is opened again every second if the first try fails after it was switched
off and on (it could stay untracked until the app restarted). - A button press or release could be lost for good when the network stalled for a moment
(a trigger could stay held in SteamVR). A trigger resting near 90 % no longer clicks on
and off. - In the first launch wizard, the 20 s automatic continue also works from the
calibration, and ignores PS Moves the camera does not track. - The vibration slider no longer takes clicks meant for the scroll bar.
- Robustness against malformed data from the network (a crafted packet could crash the
app), impossible stream settings (refused with a log line instead of a crash) and memory
allocation failures.
PC setup (ALVR-PS4-Setup.bat)
- New PSVR icons in SteamVR, drawn by leonmc330 (https://github.com/leonmc330/): every
state of the headset icon (ready, off, standby, searching, alerts, low battery, error) is
made from his drawing, in SteamVR's green and grey, with his red error badge (also on the
PS Move icons). Run the setup again to get them. - The play area keeps the camera's direction. After a reconnection, ALVR turned the
play area to where the headset faced before (it recenters on the last head position it
saw, which it keeps across reconnections). The setup now sets ALVR's position and
rotation recentering to Disabled: the PS4 places the play area centre itself. Run the
setup again to get it (the PS4 stays trusted), or set both in the dashboard (Headset
tab). - Running the setup again keeps the PS4 trusted. It used to replace the ALVR settings
with the template, which forgot the trusted PS4. (The Reset .bat still starts from
scratch.) - A virtual audio cable turned off is no longer replaced - The setup
installed VB-Cable when Virtual Audio Cable was turned off with its driver unloaded; it
now counts as a cable that is turned off (ALVR's microphone off). - The ALVR dashboard started at the end of the setup, and of the tracker mode switch, now
runs as your user instead of as administrator, so SteamVR does not start as
administrator either. - The setup refuses to run from inside the ALVR streamer folder under another name (a
renamed copy of a .bat there would have reset the whole install). - An install folder given as a relative path is no longer installed under
C:\Windows\System32 after the administrator prompt; declining that prompt now says so
instead of closing. - An install interrupted during the extraction is completed on the next run.
- Firewall or SteamVR registration failures are reported instead of printing success.
Development
- Dev build log: the 5 s video line can be 512 characters and reports the display pacing
(margin, wait, late frames, compositor misses), frames never shown, and how regularly
frames arrive from the PC. The console model is logged at start. - Dev build: a "Surface test" button in the height calibration checks the floor offsets
against a tape measure, on a controller resting on a table the camera sees. tools/deploy.pyreports a failed or incomplete upload with an error (exit code 1).- Video decoding investigated: the system video decoder available to apps is software
(CPU + GPU compute) in every mode, including the PS4 Pro's own, and HEVC decodes more
slowly than H.264; the stream stays on H.264. A shorter decoder pipeline on smaller
frames decoded faster but delivered frames irregularly (judder), and was dropped.
0.10.0
ALVR PS4 v0.10.0 - changes since v0.9.3
PS4 app
- PSVR connection like official games. If the PSVR is off or unplugged, the app opens
the system's "connect your PlayStation VR" dialog (as Beat Saber does) and keeps asking
until the headset is ready, at start and while running. The old debug screen is gone. - Headset "searching" right away in SteamVR while the camera tracking is not
initialized yet (at start, or after coming back from the PS menu), instead of showing a
frozen pose. - Lobby: headset lost warning. When the camera loses the headset for 3 seconds (or
tracking is not initialized), the lobby fades to black with the message "Headset not
detected by PSCamera." It fades back when the headset is seen again. - Play area centre set when SteamVR connects: the centre goes where the headset is at
that moment (direction and floor height unchanged). Afterwards, SteamVR's own recenter
(hold Start, the system button) is the way to recenter. Can be turned off in the
settings ("Center on the headset at SteamVR start"), for example in tracker mode so that
Space Calibrator's calibration survives SteamVR restarts. - First launch wizard: on the first launch, and right after a settings Reset, a panel
asks for your height, standing straight, with a Confirm button; on the first launch the
PC is searched for only after that. It can be used with a PS Move or the DualShock 4.
Without any of them turned on, it goes on by itself after 20 seconds with 1.70 m. - 90 Hz: the PSVR now runs at 90 Hz and the PC streams 90 frames per second, at the
same resolution (new setting "Refresh rate", 90 Hz by default; 60 Hz keeps the previous
mode, the PSVR at 120 Hz with each frame shown twice). If the console refuses 90 Hz, the
app falls back to 60 by itself. The setup sets ALVR's preferred FPS to 90. - 90 Hz without drops, and 80 Mbps: at 90 Hz the PS4 dropped frames in busy scenes
(Beat Saber songs: 75-86 fps, up to 100 ms of latency). Measured with the new video
bench on a Beat Saber recording, the hardware decoder was fast enough; the app was
waiting on it the wrong way. Now 90 fps hold without drops up to about 130 Mbps, and the
time from the arrival of a frame to its display on the PS4 fell from about 45 ms to 28
ms. The setup sets ALVR's bitrate to 80 Mbps (was 60) for a sharper picture. - Faster video conversion: the decoded picture is converted at a higher priority, and
the conversion was reworked to move half as much memory (the picture is written straight
to memory, bypassing the CPU cache) with faster CPU instructions of the PS4's processor.
It lowers the latency added by the PS4 and leaves room for 90 Hz (same resolution and
bitrate). - DualShock 4 in the lobby: tracked by its light bar like the PS Moves, and shown as a
wireframe model of the real controller, in the same blocky style as the PS Moves, with
everything it reports: buttons, sticks, L2 / R2, fingers on the touchpad and vibration
(L2 / R2 drive the motors in the lobby, to try them). Options opens the settings, and it
points at them with a laser from its light bar, Cross to click. Not sent to SteamVR.
First version: its battery level is not shown yet. - Two tracked controllers, PS Moves first: the PS4 tracks only two controllers in all,
so the PS Moves come first: with both Moves on, the DualShock 4 is not tracked (its
light bar goes back to normal) and a Move turned on takes its place. An untracked
DualShock 4 is shown still, in grey, in front of the play area with "Not tracked", its
buttons still visible and working. - Other users' controllers: controllers of other users logged in on the console are
shown in the lobby with the user number, and tracked when there is room. - Settings panel in the lobby (short press on Start, or Options on the DualShock 4):
appears in front of you, used with a laser from the PS Moves (trigger to click) or the
DualShock 4 (Cross). Settings: your height (metres and feet; stand straight when you
change it, the floor is placed from the headset at your eye height, and the resulting PS
Camera height is shown and saved), headset prediction, controller prediction, resolution
and refresh rate (marked "restart required", in orange once changed: they apply when the
app is started again), centre at SteamVR start (on/off), Close, and Reset (click twice)
to restore every setting. The info panel now ends with "Press Start (PS Move) or Options
(DualShock 4) to open settings". - PS Move models in the lobby show the buttons you press at their real place, and the
trigger as a "T" that follows how far it is pulled. - PS Move battery shown under the L/R letter of each controller as 4 dots, rounded
like SteamVR's gauge (red when low, a lightning bolt while charging), and sent to
SteamVR. The PS Move only reports 6 levels, so the percentage moves in 20 % steps. - Controllers lost by the camera now show as "searching" in SteamVR (hidden) after 10
seconds instead of disconnected, and their buttons keep working. A PS Move that is off
stays disconnected. - Settings saved in the PS4's save data instead of a file in
/data/alvr-ps4: they
show up in Settings > Application Saved Data Management as "ALVR PS4 - Settings", per
user, and can be copied or deleted there like any game save. The old file is no longer
read: the first launch shows the height wizard again and the PC must trust the PS4 again
(new client name). - Headset tracking no longer "jelly" in SteamVR: the headset position sent to SteamVR
is now predicted to the moment the picture rendered with it is shown in the PSVR (40 to
70 ms later), as the official ALVR clients do. Before, SteamVR drew the world where the
head was that long ago: turning looked right (the PS4 corrects the rotation), but moving
the head made the world lag and float as if the position were smoothed. The lobby and
PSVR games were not affected. New setting "Headset prediction" (share of the latency
predicted, 40 % by default; Off = as before). - Smoother streaming (frame pacing): frames from the PC are now handed to the PSVR in
step with its display, one per refresh, like PSVR games do, with one frame kept in
reserve. Before, each frame was shown as soon as it was ready; small variations in
network, decoding and conversion times made some frames arrive a refresh late and the
next one replace them, a constant judder at 90 Hz (worse on a base PS4) that the lobby
did not have. Costs about one frame of latency (two for a moment after the PC or the
network delayed some frames). - The UDP debug logs are only sent by development builds.
PC setup (ALVR-PS4-Setup.bat)
- ALVR is downloaded again on every install and the download is deleted afterwards (no
more copy kept in the TEMP folder; the one left by earlier setups is removed). - The streamer folder is now called
ALVR-PS4_PC-Streamer(an existing
alvr_streamer_windowsfolder from an earlier setup is renamed). ALVR-PS4-Reset.batin that folder deletes everything in it and reinstalls ALVR
from scratch with the default PS4 settings (the PS4 must be trusted again).ALVR-PS4-Tracker-Mode.bat: switches to a tracker mode to use the PS Moves with
another SteamVR headset (the PSVR becomes a tracking reference, the PS Moves Vive
trackers, all in their own "PSMoves" tracking system for OpenVR Space Calibrator), and
back.ALVR-PS4-Audio-Cable-Toggle.bat: disables the virtual audio cable (VB-Cable or
Virtual Audio Cable, i.e. its extra speaker and microphone in Windows) together with
ALVR's microphone, or enables both again. Only when you run it; the setup and the reset
keep the cable as it is. Works like Disable / Enable in the Windows Sound settings.- PSVR and PS Move icons in SteamVR: the headset and the controllers get their own
status icons (off, ready, searching animation, standby, alert, low battery, error), in
SteamVR's style, so SteamVR shows them with its green/blue gradient. In tracker mode the
PS Move trackers use the PS Move icon too. - SteamVR no longer expects a battery in the PSVR headset.
ALVR driver patches
- Controllers "searching" instead of disconnected when the camera loses them, with
working buttons (see above). - Late controller activation fixed. ALVR gave SteamVR only 1 second to activate the
controllers when the PS4 connects; when SteamVR was slow (just started, many drivers,
another headset), the controllers showed up but never moved or reacted until SteamVR was
restarted. They now work as soon as SteamVR activates them.
Development
- Video bench (
tools/video_bench.py, Dev build): encodes test clips on the PC with
the same encoder settings as ALVR (from a recording made in the ALVR dashboard), plays
them on the PS4 through the real decoder and conversion, and measures decoding,
conversion and latency, to find the best stream settings. - Development builds install as a separate app, "ALVR PS4 (Dev)" (title ID ALVR00002, DEV
icon), next to the stable one.
0.9.3
Initial Release