PSVita Home
What's New

UVC (USB Video Class) vPOC 2 by xerpi
Last Release: Nov 10, 2017
Downloads: 668

PSVita as a UVC (USB Video Class) device
Name Version Released Hits DL Link QR
udcd(Game/app video stream) vPOC 2 11/10/17 231 Download QR
udcd(SceShell (LiveArea) vPOC 2 11/10/17 204 Download QR
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

<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 10/30/17 97 Download QR
UVC (USB Video Class)Plugin vPOC 10/30/17 136 Download QR