PSVita UDCD USB Video Class plugin (UDCD UVC)

VITA PSVita UDCD USB Video Class plugin (UDCD UVC) v1.7

PSVita UDCD USB Video Class plugin (UDCD UVC)
by xerpi

udcd.jpg


  • This is a kernel plugin that lets you stream your PSVita screen to your computer via USB.

  • The plugin uses the SceUdcd module of the PSVita OS to setup the necessary USB descriptors to simulate and behave as an USB Video Class device (like a webcam or an USB video capture card).

    The hardware color space converter of the PSVita's SoC is used to perform the conversion to the destination pixel format; then the USB controller directly performs a DMA transfer from the physical address of the resulting converted framebuffer, and therefore, saving CPU usage and power consumption.

    • 960x544 @ 30 FPS and (less than) 60 FPS
    • 896x504 @ 30 FPS and (almost) 60 FPS
    • 864x488 @ 30 FPS and 60 FPS
    • 480x272 @ 30 FPS and 60 FPS
    • 1280x720 @ 30 FPS

  • Download:

    Compilation


    Installation
    :
    1. Copy udcd_uvc.skprx to your PSVita
    2. Add udcd_uvc.skprx to taiHEN's config (ur0:/tai/config.txt or ux0:/tai/config.txt):
      Code:
      *KERNEL 
      ur0:tai/udcd_uvc.skprx
    3. Reboot your PSVita.

  • 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 the colors look wrong, set color range to full and color space to BT.601 (Rec. 601).

    If you use Windows 10 you might have to change the Camera access permissions on the Privacy Settings.

    On Linux I recommend using mplayer (mplayer tv:// -tv driver=v4l2:device=/dev/videoX:width=960:height=544).

    Audio noise fix:

    • Disable USB power supply (Settings > System)

    Note: Remember that if anything goes wrong (like PSVita not booting) you can always press L at boot to skip plugin loading.

    Note 2: No, it doesn't stream audio. For that use a 3.5mm jack to jack adapter (a ferrite bead might help reduce the electromagnetic noise).

  • v1.7
    • Increase initial delay to 15s: should help fixing issues when a lot of plugins are loaded (UDCD UVC used to not work).
    • Fix UVC payload size to be 12B as per UVC spec: should fix support on macOS and Android. Thanks to @xfangfang for spotting the issue!
    Files:
    • udcd_uvc.skprx: doesn't turn the display on/off
    • udcd_uvc_oled_off.skprx: turns the display on/off on OLED Vitas (Vita 1000)
    • udcd_uvc_lcd_off.skprx: turns the display on/off on LCD Vitas (Vita 2000)

    v1.6
    Thanks to @cuevavirus for the changes:
    • Add frame descriptor for 1280x720 (with the Sharpscale plugin, the Vita is able to submit 1280x720
      framebuffers to the kernel)
    • Dynamically allocate memory for UVC frame: allocates only as much memory as needed and only
      when needed, otherwise with a 1280x720 buffer for the UVC frame, the kernel frequently runs out
      of memory.
    • Minor code fixes

    v1.5
    • Removed unused interrupt endpoint, which seems that allocated USB bandwidth that could not be used for sending the video data. Before this change, sending a 960x544 NV12 frame took ~16ms (plus ~2.5 for CSC), now that this endpoint is removed and more bandwidth is available, sending a frame takes ~13ms.
      Colorspace conversion takes ~2.5ms, therefore, now it takes 13+2.5 = 15.5ms to send a full frame, so 60FPS can be achieved at full resolution!
    • Minor cleanups
    • Compiling with -O2
    Files:
    • udcd_uvc.skprx: doesn't turn the display on/off
    • udcd_uvc_oled_off.skprx: turns the display on/off on OLED Vitas (Vita 1000)
    • udcd_uvc_lcd_off.skprx: turns the display on/off on LCD Vitas (Vita 2000)

    v1.4
    Add OLED/LCD on/off support when connecting/disconnecting the USB (two different builds depending on OLED or LCD).
    • udcd_uvc.skprx: doesn't turn the display on/off
    • udcd_uvc_oled_off.skprx: turns the display on/off on OLED Vitas (Vita 1000)
    • udcd_uvc_lcd_off.skprx: turns the display on/off on LCD Vitas (Vita 2000)

    v1.3
    • Fix System app detection thanks to @u3shit

    v1.2
    • Fixed 480x272 support thanks to u/Kaizu_vita


SOURCE:
https://github.com/xerpi/vita-udcd-uvc
Uploaded by
tthousand
Downloads
477
Views
477
First release
Last update

Ratings

0.00 star(s) 0 ratings

More resources from tthousand

Back
Top