Toggle menu
Toggle personal menu
Not logged in
Your IP address will be publicly visible if you make any edits.

UDCD UVC Vita: Difference between revisions

From GameBrew
 
(5 intermediate revisions by the same user not shown)
Line 1: Line 1:
{{#seo:
{{#seo:
|title=Vita Homebrew Apps (Plugins) - GameBrew!
|title=Vita Homebrew Apps (Plugins) - GameBrew
|title_mode=append
|title_mode=append
|image=udcduvcvita.jpg
|image=udcduvcvita2.png
|image_alt=UDCD UVC
|image_alt=UDCD UVC
}}
}}
{{Infobox Vita Homebrews
{{Infobox Vita Homebrews
|title=UDCD UVC
|title=UDCD UVC
|image=udcduvcvita.jpg
|image=udcduvcvita2.png
|description=Allows PSVITA streaming via USB.
|description=Allows PS Vita streaming via USB.
|author=xerpi
|author=xerpi
|lastupdated=2020/09/23
|lastupdated=2020/09/23
Line 15: Line 15:
|license=Mixed
|license=Mixed
|download=https://dlhb.gamebrew.org/vitahomebrews/udcduvcvita.7z
|download=https://dlhb.gamebrew.org/vitahomebrews/udcduvcvita.7z
|website=
|website=https://gbatemp.net/threads/release-psvita-usb-streaming-uvc-usb-video-class.513997/page-2
|source=https://github.com/xerpi/vita-udcd-uvc
|source=https://github.com/xerpi/vita-udcd-uvc
}}
}}
'''UDCD UVC''' is a plugin allowing PSVITA streaming via USB.
PSVita UDCD USB Video Class plugin (UDCD UVC) is a kernel plugin that lets you stream your PS Vita screen to your computer via USB.


==What is PSVita UDCD USB Video Class plugin?==
==Installation==
This is a kernel plugin that lets you stream your PSVita screen to your computer via USB.
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).
 
How to install:
* Copy udcd_uvc.skprx to your PS Vita.
* Add udcd_uvc.skprx to taiHEN's config (ur0(ux0):tai/config.txt)
 
*KERNEL
ur0:tai/udcd_uvc.skprx


=== How does UDCD UVC work? ===
==User guide==
The plugin uses the [https://wiki.henkaku.xyz/vita/SceUdcd SceUdcd] module of the PSVita OS to setup the necessary USB descriptors to simulate and behave as an [https://en.wikipedia.org/wiki/USB_video_device_class USB Video Class] device (like a webcam or an USB video capture card).
===How does it work===
The plugin uses the [https://wiki.henkaku.xyz/vita/SceUdcd SceUdcd] module of the PS Vita OS to setup the necessary USB descriptors to simulate and behave as an [https://en.wikipedia.org/wiki/USB_video_device_class USB Video Class] device (like a webcam or an USB video capture card).


The [https://wiki.henkaku.xyz/vita/IFTU_Registers 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.
The [https://wiki.henkaku.xyz/vita/IFTU_Registers hardware color space converter] of the PS Vita'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 on UDCD UVC Plugin ==
===Supported formats and Resolutions===
* 960x544 @ 30 FPS and (less than) 60 FPS
* 960x544 @ 30 FPS and (less than) 60 FPS
* 896x504 @ 30 FPS and (almost) 60 FPS
* 896x504 @ 30 FPS and (almost) 60 FPS
Line 35: Line 46:
* 1280x720 @ 30 FPS
* 1280x720 @ 30 FPS


== How To Download and Install UDCD UVC ==
===Troubleshooting===
'''Download''':
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).
* udcd_uvc.skprx on gamebrew or [https://github.com/xerpi/vita-udcd-uvc/releases here].
 
If you use Windows 10 you might have to change the Camera access permissions on the Privacy Settings.
 
On Linux it is recommended using mpv (<code>mpv tv:// --tv-device=/dev/videoX --tv-width=960 --tv-height=544</code>) or mplayer (<code>mplayer tv:// -tv driver=v4l2:device=/dev/videoX:width=960:height=544</code>).


'''Compilation'''
Audio noise fix - Disable USB power supply (Settings &gt; System).
* [https://vitasdk.org/ vitasdk] is needed.


'''Installation''':
Note: Remember that if anything goes wrong (like PS Vita not booting) you can always press L at boot to skip plugin loading.
# 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>):


<pre>*KERNEL
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).
ur0:tai/udcd_uvc.skprx</pre>


==Media==
==Media==
'''PS Vita Video Output Over USB - No New Hardware Needed''' ([https://www.youtube.com/watch?v=zlD-so1WQ14 Blaine Locklair]) <br>
<youtube>zlD-so1WQ14</youtube>
<youtube>zlD-so1WQ14</youtube>


==Screenshot==
==Compatibility==
[[image:udcduvcvita.jpg|600px]]
Firmware base: 3.60
 
== UDCD UVC: 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 I recommend using ''mplayer'' (<code>mplayer tv:// -tv driver=v4l2:device=/dev/videoX:width=960:height=544</code>).
 
'''Audio noise fix:'''
 
* Disable USB power supply (Settings &gt; 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).


==Changelog==
==Changelog==
'''(v.1.7)'''
'''v1.7'''
*Increase initial delay to 15s: should help fixing issues when a lot of plugins are loaded (UDCD UVC used to not work).
*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!
*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)


'''(v.1.6)'''
'''v1.6'''
*Add frame descriptor for 1280x720 (with the Sharpscale plugin, the Vita is able to submit 1280x720 framebuffers to the kernel).
*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.
*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
*Minor code fixes.


'''(v.1.5)'''
'''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.
*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!
*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
*Minor cleanups.
*Compiling with -O2
*Compiling with -O2.


'''(v.1.4)'''
'''v1.4'''
*Add OLED/LCD on/off support when connecting/disconnecting the USB (two different builds depending on OLED or LCD).
*Add OLED/LCD on/off support when connecting/disconnecting the USB (two different builds depending on OLED or LCD).


'''(v.1.3)'''
'''v1.3'''
*Fix System app detection thanks to @u3shit
*Fix System app detection thanks to @u3shit.
 
'''(v.1.2)'''
*Fixed 480x272 support thanks to [https://www.reddit.com/user/Kaizu_vita u/Kaizu_vita]


'''(v.1.0)'''
'''v1.2'''
* First Release.
*Fixed 480x272 support thanks to [https://www.reddit.com/user/Kaizu_vita u/Kaizu_vita].


== External links ==
==External links==
* Github - https://github.com/xerpi/vita-udcd-uvc
* GitHub - https://github.com/xerpi/vita-udcd-uvc
* GBAtemp - https://gbatemp.net/threads/release-psvita-usb-streaming-uvc-usb-video-class.513997/page-2
* Reddit - https://www.reddit.com/r/vitahacks/comments/iy5ct1/release_v17_usb_streaming_udcd_uvc_fixes_macos/
* Reddit - https://www.reddit.com/r/vitahacks/comments/ad4xld/v12_psvita_usb_streaming_uvc_usb_video_class/
* VitaDB - https://vitadb.rinnegatamante.it/#/info/395
* VitaDB - https://vitadb.rinnegatamante.it/#/info/395

Latest revision as of 00:56, 10 Ocak 2023

UDCD UVC
Udcduvcvita2.png
General
Authorxerpi
TypePlugins
Version1.7
LicenseMixed
Last Updated2020/09/23
Links
Download
Website
Source

PSVita UDCD USB Video Class plugin (UDCD UVC) is a kernel plugin that lets you stream your PS Vita screen to your computer via USB.

Installation

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).

How to install:

  • Copy udcd_uvc.skprx to your PS Vita.
  • Add udcd_uvc.skprx to taiHEN's config (ur0(ux0):tai/config.txt)
*KERNEL
ur0:tai/udcd_uvc.skprx

User guide

How does it work

The plugin uses the SceUdcd module of the PS Vita 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 PS Vita'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

  • 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

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 it is recommended using mpv (mpv tv:// --tv-device=/dev/videoX --tv-width=960 --tv-height=544) or 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 PS 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).

Media

PS Vita Video Output Over USB - No New Hardware Needed (Blaine Locklair)

Compatibility

Firmware base: 3.60

Changelog

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.

v1.6

  • 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.

v1.4

  • Add OLED/LCD on/off support when connecting/disconnecting the USB (two different builds depending on OLED or LCD).

v1.3

  • Fix System app detection thanks to @u3shit.

v1.2

External links

Advertising: