PSVita Home
What's New

UVC (USB Video Class) v1.1 by xerpi
Last Release: Aug 28, 2018
Downloads: 2094

PSVita as a UVC (USB Video Class) device
Name Version Released Hits DL Link QR
UVC (USB Video Class) v1.1 08/28/18 229 Download QR

Add udcd_uvc.skprx to taiHEN's config (ur0:/tai/config.txt or ux0:/tai/config.txt): *KERNEL ur0:tai/udcd_uvc.skprx
Reboot your PSVita.

So this is a project I've had in mind for a few months already and finally I've decided to put some effort into it.

Let me explain: the Vita OS has a module (SceUdcd) that allows you to setup the Vita (fat and slim) bottom USB port as any USB device by setting custom USB descriptors.
In the past, I've already used SceUdcd to make the Vita act as an standard USB HID Gamepad (check this) so I asked myself: why don't I take advantage of the power of that module and write a plugin that setups the Vita as an USB Video Class device (like a webcam or USB video capture card) and sends the screen data to the PC?
And here we are, it has taken me quite a bit of reverse engineering the Vita OS (specially the SceDisplay and SceUdcd modules) to be able to have a very alpha-stage proof of concept skprx working.

As I said it's very PoC, so don't expect it to go fast at all: the code is currently very inefficient and I'm not taking advantage of the Vita's hardware colorspace converters and image encoders at all, it's all done by CPU. Also, for now, this version will only capture the LiveArea footage.

Even though it isn't very useful at its current stage, I'm releasing this so you can test it on different OSes and report back whether it's working or not (I'm developing on Linux so that's my testing platform).

To make it easier to load this plugin I've created a Plugin loader VPK that its job is to load any skprx placed in ux0:data/tai/kplugin.skprx

Changes since PoC v6:

Fixed right screen margin glitch

More general code cleanups and improvements

If the video looks glitched, try to change the video player configuration to use the NV12 format or switch to another player (like PotPlayer or OBS). If you use Windows 10 you might have to change the Camera access permissions on the Privacy Settings.

<b>Poc v2</b>
I've improved the PSVita as a UVC (USB Video Class) device plugin lately with the following changes in this PoC v2 with respect to the first PoC:
Uses Vita's colorspace conversion hardware
Uses Vita's JPEG encoder hardware
Much improved and faster USB video frame transfer routine
After performing some timing to these three key components, the results are the following with a 960x544 framebuffer:
It takes around 2ms to perform the colorspace conversion, which is really fast
It takes from 86ms to 120ms to perform the JPEG encoding, which is too slow
It takes 2ms to send the video frame, which is fast
If we want to achieve 60FPS, a new frame would need to be ready after 16.667ms, and if you add the worst case time it currently takes (2 + 120 + 2 = 124ms) to process the frame, you'll see that 10FPS are the current expected FPS.
So this leaves us with the following conclusion: if we want a decent framerate, downscaling to 480x272 is a must. This PoC v2 version I'm releasing doesn't have said downscaling yet, as I'd like to hear your opinions/ideas first.
The install instructions are the same as the first PoC, but this time I'm uploading two skprxes, one that streams the SceShell (LiveArea) and another one that streams the games/apps as I have yet to find a way to properly decide which one to select at runtime.
Name Version Released Hits DL Link QR
UVC (USB Video Class) vPOC 6 08/06/18 210 Download QR
UVC (USB Video Class) vPOC 5 08/03/18 177 Download QR
UVC (USB Video Class) vPOC 4 08/02/18 118 Download QR
UVC (USB Video Class) vPOC 3 07/31/18 92 Download QR
udcd(Game/app video stream) vPOC 2 11/10/17 360 Download QR
udcd(SceShell (LiveArea) vPOC 2 11/10/17 337 Download QR
UVC (USB Video Class) vPOC 10/30/17 157 Download QR
UVC (USB Video Class)Plugin vPOC 10/30/17 274 Download QR
UVC (USB Video Class) v1.0 08/26/18 128 Download QR