[PSVITA] PSVita USB Streaming (UVC – USB Video Class) V1.6 Released

From the developer and our friend xerpi comes a new update of UVC (USB Video Class) in version 1.6. The plugin is a project started a few months ago using reverse engineering on the PSvita OS using the PSVITA charging connector and the module SceUdcd, already quite used by the developer TheFloW. Set the PSVita as a USB Video Class device (it is a class of USB peripherals that describes devices capable of streaming video such as webcams, digital cameras, transcoders, analog video converters and digital cameras. still image) is not a trivial matter, obviously it is in the initial stages of development and some bugs or reproduction problems are always present.Great, who knows in the future what the developer will reserve for us

From xerpi

So this is a project that I have had in mind for some months now and I finally decided to put some effort into it.

Let me explain: the Vita system has a module (  SceUdcd  ) that allows you to set the basic Vita USB port (fat and slim) like any USB device by setting the custom USB descriptors.

In the past I have already used SceUdcd to make Life like a standard USB HID Gamepad (check  this  ) so I asked myself: why not take advantage of the power of that module and write a plugin that sets the PSVita as  a USB Video Class device  (like a webcam or a USB video capture card) and send screen data to your PC?

And here we are, Vita OS (especially the SceDisplay and SceUdcd modules) did some reverse engineering to me to have a very alphabetical proof of the skprx concept that works.

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

Although it is not very useful in its current phase, I am releasing this so that I can test it on different operating systems and report back if it is working or not (I am developing on Linux, so it is my test platform).

Installation  :

  1. Copy  udcd_uvc.skprxto your PSVita
  2. Add  udcd_uvc.skprxto the configuration of taiHEN (  ur0:/tai/config.txto  ux0:/tai/config.txt): *KERNEL ur0:tai/udcd_uvc.skprx
  3. Restart your PSVita.

Or simply use my homebrew Autoplugin

Video Test by  NanospeedGamer

Changelog

v1.6

Thanks to  @cuevavirus  for the changes:

  • Added the frame descriptor for 1280 × 720 (with the Sharpscale plug-in, Vita is able to send
    1280 × 720 framebuffer to the kernel)
  • Dynamic memory allocation for the UVC frame: allocates only the amount of memory needed and only
    when needed, otherwise with a 1280 × 720 buffer for the UVC frame, the kernel frequently runs out of
    memory.
  • Minor code corrections

v1.5

  • Removed the unused termination endpoint, which appears that the allocated USB bandwidth could not be used for sending video data. Prior to this change, sending an NV12 960 × 544 frame took ~ 16ms, now that this endpoint has been removed and more bandwidth is available, sending a frame takes ~ 13ms.
    Color space conversion takes ~ 2.5 ms, so now it takes 13 + 2.5 = 15.5 ms, so  60 FPS  can be achieved  at maximum resolution  !
  • Minor cleaning
  • Compiled with -O2

v1.4

Added support for OLED / LCD activation / deactivation during USB connection / disconnection (two different builds depending on OLED or LCD).

  • udcd_uvc.skprx: does not turn on / off the display
  • udcd_uvc_oled_off.skprx: activates / deactivates the display on OLED Vitas (Vita 1000)
  • udcd_uvc_lcd_off.skprx: activates / deactivates the LCD display Vitas (Vita 2000)

v1.3

Fix detection of system apps thanks to @ u3shit

v1.2

List of supported video modes:

  • 960 × 544 @ 30 FPS and (less than) 60 FPS

  • 896 × 504 @ 30 FPS and (almost) 60 FPS

  • 864 × 488 @ 30 FPS and 60 FPS

  • 480 × 272 @ 30 FPS and 60 FPS

If the video looks glitchate, try changing the configuration of the video player to use the NV12 format   or switch to another player (like PotPlayer, KMPlayer or OBS). If you are using Windows 10, you may need to change the camera’s access permissions in the privacy settings. On Linux, I recommend using  mplayer  (  mplayer tv:// -tv driver=v4l2:device=/dev/videoX:width=960:height=544).

v.1.1

  • Added 896 × 504 and 480 × 272 video modes

  • Added support for 30 FPS

  • VitaShell USB mode should work (as of VitaShell 1.95) but a reboot will be required after disabling USB to make this plugin work again

List of supported video modes:

  • 960 × 544 @ 30 FPS and (less than) 60 FPS

  • 896 × 504 @ 30 FPS and (approximately) 60 FPS

  • 480 × 272 @ 30 FPS and 60 FPS

If the video has any problems, try changing the configuration of the video player to use the NV12 format   or switch to another player (like PotPlayer or OBS). If you are using Windows 10, you may need to change the camera’s access permissions in the privacy settings.

Download :

Source
Github