Vita:UDCD Video Streaming Plugin: Difference between revisions

From ConsoleMods Wiki
Jump to navigation Jump to search
(General cleanup)
(Further cleanup)
Line 1: Line 1:
Kernel plugin to stream Vita screen over USB cable, Vita appears as a USB class camera and is accessible from VLC and OBS, additionally any device that supports the USB Video class (There are apps on Android, but at this time nothing on IOS)
[https://github.com/xerpi/vita-udcd-uvc The UDCD Video streaming plugin] is a kernel plugin that allows you to stream the Vita screen over a USB cable. The Vita appears as a USB class camera and is accessible from VLC and OBS on a PC or on any other device that supports the USB Video class (such as Androids).


[https://github.com/xerpi/vita-udcd-uvc GitHub Project]
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, similar to a webcam or a 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, saving CPU usage and and reducing power consumption.


== How does it work? ==
{{Note|The plugin ''doesn't'' stream audio. For that, use a 3.5mm jack to jack adapter (a ferrite bead might help reduce the electromagnetic noise).}}
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.
== Supported Formats and Resolutions ==
 
== Supported formats and resolutions ==


* 960x544 @ 30 FPS and (less than) 60 FPS
* 960x544 @ 30 FPS and (less than) 60 FPS
Line 17: Line 14:


== Download and installation ==
== Download and installation ==
'''Download''':
'''Download''':  


* udcd_uvc.skprx - [https://github.com/xerpi/vita-udcd-uvc/releases GitHub releases page]
* udcd_uvc.skprx - [https://github.com/xerpi/vita-udcd-uvc/releases GitHub releases page]
Line 29: Line 26:
# Copy <code>udcd_uvc.skprx</code> to your PSVita
# Copy <code>udcd_uvc.skprx</code> to your PSVita
# Add <code>udcd_uvc.skprx</code> to taiHEN's config (<code>ur0:/tai/config.txt</code> or <code>ux0:/tai/config.txt</code>):
# Add <code>udcd_uvc.skprx</code> to taiHEN's config (<code>ur0:/tai/config.txt</code> or <code>ux0:/tai/config.txt</code>):
 
#:<pre>
<code>*KERNEL
#:: *KERNEL
ur0:tai/udcd_uvc.skprx</code>
#:: ur0:tai/udcd_uvc.skprx</pre>
 
# Reboot your PSVita.
# Reboot your PSVita.


== Troubleshooting ==
== Troubleshooting ==
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 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.
If you use Windows 10 you might have to change the Camera access permissions on the Privacy Settings.


On Linux I recommend using ''mplayer'' (<code>mplayer tv:// -tv driver=v4l2:device=/dev/videoX:width=960:height=544</code>).
On Linux, try using ''mplayer'' (<code>mplayer tv:// -tv driver=v4l2:device=/dev/videoX:width=960:height=544</code>).


'''Audio noise fix:'''
'''Audio noise fix:'''
Line 46: Line 42:
* Disable USB power supply (Settings > System)
* 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|Remember that if anything goes wrong (like the Vita 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).


== Turning the screen off during streaming ==
== Turning the screen off during streaming ==

Revision as of 02:57, 8 August 2022

The UDCD Video streaming plugin is a kernel plugin that allows you to stream the Vita screen over a USB cable. The Vita appears as a USB class camera and is accessible from VLC and OBS on a PC or on any other device that supports the USB Video class (such as Androids).

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, similar to a webcam or a 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, saving CPU usage and and reducing power consumption.

Exclamation-circle-fill.svgThe plugin doesn't stream audio. For that, use a 3.5mm jack to jack adapter (a ferrite bead might help reduce the electromagnetic noise).


Supported Formats and Resolutions

  • 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 and installation

Download:

Compilation

  • vitasdk is needed.

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):
    *KERNEL
    ur0:tai/udcd_uvc.skprx
  3. Reboot your PSVita.

Troubleshooting

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, try using mplayer (mplayer tv:// -tv driver=v4l2:device=/dev/videoX:width=960:height=544).

Audio noise fix:

  • Disable USB power supply (Settings > System)
Exclamation-circle-fill.svgRemember that if anything goes wrong (like the Vita not booting), you can always press L at boot to skip plugin loading.


Turning the screen off during streaming

These 2 modified projects are not on GitHub and are quite hard to find. They are included in Autoplugin 2

  • udcd_uvc OLED - For OLED screens model 1000 - Turns the screen black, turning it off
  • udcd_uvc LCD - For LCD screens model 2000+ - Turns the screen off while streaming