Connecting A PSVita to Linux machine

Questions about applications and software
Forum rules
Before you post read how to get help. Topics in this forum are automatically closed 6 months after creation.
Locked
norrin925
Level 1
Level 1
Posts: 21
Joined: Thu Nov 25, 2021 9:46 pm

Connecting A PSVita to Linux machine

Post by norrin925 »

I'm exprimenting with connecting my PSVita to my Linux machine, and am running into a few issues. I'm running Cinnamon; here's what inxi returns:

Code: Select all

System:
  Kernel: 5.15.0-33-generic x86_64 bits: 64 compiler: N/A 
  Desktop: Cinnamon 5.0.7 wm: muffin 5.0.2 dm: LightDM 1.30.0 
  Distro: Linux Mint 20.2 Uma base: Ubuntu 20.04 focal 
Machine:
  Type: Laptop System: LENOVO product: 81QG 
  v: Lenovo IdeaPad S340-15APITouch serial: <filter> Chassis: type: 10 
  v: Lenovo IdeaPad S340-15APITouch serial: <filter> 
  Mobo: LENOVO model: LNVNB161216 v: SDK0R32776 WIN serial: <filter> 
  UEFI: LENOVO v: AMCN28WW(V1.11) date: 07/13/2020 
Battery:
  ID-1: BAT1 charge: 51.6 Wh condition: 53.0/52.5 Wh (101%) volts: 12.7/11.3 model: 0x4C 
  0x47 0x43 0x00 0x32 0x30 0x 0x4C 0x31 0x38 0x4C 0x33 0x50 0x5250 
  type: Li-ion serial: <filter> status: Unknown cycles: 245 
CPU:
  Topology: Quad Core model: AMD Ryzen 5 3500U with Radeon Vega Mobile Gfx 
  bits: 64 type: MT MCP arch: Zen+ rev: 1 L2 cache: 2048 KiB 
  flags: avx avx2 lm nx pae sse sse2 sse3 sse4_1 sse4_2 sse4a ssse3 svm 
  bogomips: 33537 
  Speed: 1232 MHz min/max: 1400/2100 MHz boost: enabled Core speeds (MHz): 
  1: 1232 2: 1280 3: 1339 4: 1166 5: 1297 6: 1222 7: 1386 8: 1224 
Graphics:
  Device-1: AMD Picasso vendor: Lenovo driver: amdgpu v: kernel 
  bus ID: 03:00.0 chip ID: 1002:15d8 
  Display: x11 server: X.Org 1.20.13 driver: amdgpu,ati 
  unloaded: fbdev,modesetting,vesa resolution: 1920x1080~60Hz 
  OpenGL: renderer: AMD Radeon Vega 8 Graphics (RAVEN DRM 3.42.0 
  5.15.0-33-generic LLVM 12.0.0) 
  v: 4.6 Mesa 21.2.6 direct render: Yes 
Audio:
  Device-1: AMD Raven/Raven2/Fenghuang HDMI/DP Audio vendor: Lenovo 
  driver: snd_hda_intel v: kernel bus ID: 03:00.1 chip ID: 1002:15de 
  Device-2: AMD Raven/Raven2/FireFlight/Renoir Audio Processor 
  vendor: Lenovo driver: snd_pci_acp3x v: kernel bus ID: 03:00.5 
  chip ID: 1022:15e2 
  Device-3: AMD Family 17h HD Audio vendor: Lenovo driver: snd_hda_intel 
  v: kernel bus ID: 03:00.6 chip ID: 1022:15e3 
  Sound Server: ALSA v: k5.15.0-33-generic 
Network:
  Device-1: Qualcomm Atheros QCA9377 802.11ac Wireless Network Adapter 
  vendor: Lenovo driver: ath10k_pci v: kernel bus ID: 02:00.0 
  chip ID: 168c:0042 
  IF: wlp2s0 state: up mac: <filter> 
  Device-2: Qualcomm Atheros type: USB driver: btusb bus ID: 3-2:3 
  chip ID: 0cf3:e500 
Drives:
  Local Storage: total: 931.51 GiB used: 497.57 GiB (53.4%) 
  ID-1: /dev/sda vendor: Seagate model: ST1000LM035-1RK172 size: 931.51 GiB 
  speed: 6.0 Gb/s rotation: 5400 rpm serial: <filter> rev: LCM2 temp: 42 C 
  scheme: GPT 
Partition:
  ID-1: / size: 915.40 GiB used: 497.57 GiB (54.4%) fs: ext4 dev: /dev/sda2 
Sensors:
  Message: No sensors data was found. Is sensors configured? 
Repos:
  No active apt repos in: /etc/apt/sources.list 
  Active apt repos in: /etc/apt/sources.list.d/additional-repositories.list 
  1: deb http://de.archive.ubuntu.com/ubuntu/ bionic main universe
  2: deb https://dl.winehq.org/wine-builds/ubuntu/ impish main
  Active apt repos in: /etc/apt/sources.list.d/alexlarsson-flatpak-focal.list 
  1: deb http://ppa.launchpad.net/alexlarsson/flatpak/ubuntu focal main
  Active apt repos in: /etc/apt/sources.list.d/element-io.list 
  1: deb [signed-by=/usr/share/keyrings/element-io-archive-keyring.gpg] https://packages.element.io/debian/ default main
  Active apt repos in: /etc/apt/sources.list.d/forkotov02-ppa-focal.list 
  1: deb http://ppa.launchpad.net/forkotov02/ppa/ubuntu focal main
  Active apt repos in: /etc/apt/sources.list.d/home-ungoogled_chromium.list 
  1: deb http://download.opensuse.org/repositories/home:/ungoogled_chromium/Ubuntu_Focal/ /
  Active apt repos in: /etc/apt/sources.list.d/official-package-repositories.list 
  1: deb http://packages.linuxmint.com uma main upstream import backport #id:linuxmint_main
  2: deb http://archive.ubuntu.com/ubuntu focal main restricted universe multiverse
  3: deb http://archive.ubuntu.com/ubuntu focal-updates main restricted universe multiverse
  4: deb http://archive.ubuntu.com/ubuntu focal-backports main restricted universe multiverse
  5: deb http://security.ubuntu.com/ubuntu/ focal-security main restricted universe multiverse
  6: deb http://archive.canonical.com/ubuntu/ focal partner
Info:
  Processes: 323 Uptime: 1h 31m Memory: 9.66 GiB used: 4.06 GiB (42.1%) 
  Init: systemd v: 245 runlevel: 5 Compilers: gcc: 9.4.0 alt: 9 Shell: bash 
  v: 5.0.17 running in: gnome-terminal inxi: 3.0.38 
I'm using a plug-in for the PSVta which enables the Vita screen to be displayed in a video capture application such as OBS or VLC. For troubleshooting, the plug-in creator recommends the following:
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).

On Linux I recommend using mplayer (mplayer tv:// -tv driver=v4l2:device=/dev/videoX:width=960:height=544).
I'm having problems in a couple of video capture programs:

In VLC, I notice the PSVita is an option under the "Video Capture" options listed under "Devices" on the left, but when I double click the PSVita option, VLC crashes and closes.

In mplayer, when I enter the command given by the plug-in creator (

Code: Select all

mplayer tv:// -tv driver=v4l2:device=/dev/videoX:width=960:height=544
), the terminal returns the following result:

Code: Select all

MPlayer 1.3.0 (Debian), built with gcc-9 (C) 2000-2016 MPlayer Team
do_connect: could not connect to socket
connect: No such file or directory
Failed to open LIRC support. You will not be able to use your remote control.

Playing tv://.
TV file format detected.
Selected driver: v4l2
 name: Video 4 Linux 2 input
 author: Martin Olschewski <olschewski@zpr.uni-koeln.de>
 comment: first try, more to come ;-)
v4l2: unable to open '/dev/videoX': No such file or directory
v4l2: ioctl set mute failed: Bad file descriptor
v4l2: 0 frames successfully processed, 0 frames dropped.


Exiting... (End of file)
Any ideas what I can do to get this to work?
Last edited by LockBot on Wed Jan 04, 2023 11:00 pm, edited 1 time in total.
Reason: Topic automatically closed 6 months after creation. New replies are no longer allowed.
rene
Level 20
Level 20
Posts: 12212
Joined: Sun Mar 27, 2016 6:58 pm

Re: Connecting A PSVita to Linux machine

Post by rene »

The X in videoX is to be replaced with a number; usually it'll be 0; device=/dev/video0. If not, ls -l /dev/video* to see which device nodes in fact exist.
norrin925
Level 1
Level 1
Posts: 21
Joined: Thu Nov 25, 2021 9:46 pm

Re: Connecting A PSVita to Linux machine

Post by norrin925 »

rene wrote: Mon Jul 04, 2022 4:31 pm The X in videoX is to be replaced with a number; usually it'll be 0; device=/dev/video0. If not, ls -l /dev/video* to see which device nodes in fact exist.
Thanks for the quick reply! I tried plugging in a number (0) as you said, and mplayr started running in the terminal but nothing else really happened. I hit esc after about 30 seconds or so:

Code: Select all

mplayer tv:// -tv driver=v4l2:device=/dev/video0:width=960:height=544
MPlayer 1.3.0 (Debian), built with gcc-9 (C) 2000-2016 MPlayer Team
do_connect: could not connect to socket
connect: No such file or directory
Failed to open LIRC support. You will not be able to use your remote control.

Playing tv://.
TV file format detected.
Selected driver: v4l2
 name: Video 4 Linux 2 input
 author: Martin Olschewski <olschewski@zpr.uni-koeln.de>
 comment: first try, more to come ;-)
v4l2: your device driver does not support VIDIOC_G_STD ioctl, VIDIOC_G_PARM was used instead.
Selected device: Integrated Camera: Integrated C
 Capabilities:  video capture  streaming
 supported norms:
 inputs: 0 = Camera 1;
 Current input: 0
 Current format: MJPEG
tv.c: norm_from_string(pal): Bogus norm parameter, setting default.
v4l2: ioctl enum norm failed: Inappropriate ioctl for device
Error: Cannot set norm!
Selected input hasn't got a tuner!
v4l2: ioctl set mute failed: Invalid argument
==========================================================================
Opening video decoder: [ffmpeg] FFmpeg's libavcodec codec family
libavcodec version 58.54.100 (external)
Selected video codec: [ffmjpeg] vfm: ffmpeg (FFmpeg MJPEG)
==========================================================================
v4l2: ioctl streamon failed: Protocol error
Audio: no sound
Starting playback...
[mjpeg @ 0x7fe0f3120260]No JPEG data found in image
Error while decoding frame!
[mjpeg @ 0x7fe0f3120260]No JPEG data found in image
Error while decoding frame!
[mjpeg @ 0x7fe0f3120260]No JPEG data found in image
Error while decoding frame!
[mjpeg @ 0x7fe0f3120260]No JPEG data found in image
Error while decoding frame!
[mjpeg @ 0x7fe0f3120260]No JPEG data found in image
Error while decoding frame!
[mjpeg @ 0x7fe0f3120260]No JPEG data found in image
Error while decoding frame!
[mjpeg @ 0x7fe0f3120260]No JPEG data found in image
Error while decoding frame!
[mjpeg @ 0x7fe0f3120260]No JPEG data found in image
Error while decoding frame!
[mjpeg @ 0x7fe0f3120260]No JPEG data found in image
Error while decoding frame!
V:   0.0   9/  9 ??% ??% ??,?% 0 0 
[mjpeg @ 0x7fe0f3120260]No JPEG data found in image
Error while decoding frame!
V:   0.0  10/ 10 ??% ??% ??,?% 0 0 
[mjpeg @ 0x7fe0f3120260]No JPEG data found in image
Error while decoding frame!
V:   0.0  11/ 11 ??% ??% ??,?% 0 0 
[mjpeg @ 0x7fe0f3120260]No JPEG data found in image
Error while decoding frame!
V:   0.0  12/ 12 ??% ??% ??,?% 0 0 
[mjpeg @ 0x7fe0f3120260]No JPEG data found in image
Error while decoding frame!
V:   0.0  13/ 13 ??% ??% ??,?% 0 0 
[mjpeg @ 0x7fe0f3120260]No JPEG data found in image
Error while decoding frame!
V:   0.0  14/ 14 ??% ??% ??,?% 0 0 
[mjpeg @ 0x7fe0f3120260]No JPEG data found in image
Error while decoding frame!
V:   0.0  15/ 15 ??% ??% ??,?% 0 0 
[mjpeg @ 0x7fe0f3120260]No JPEG data found in image
Error while decoding frame!
V:   0.0  16/ 16 ??% ??% ??,?% 0 0 
[mjpeg @ 0x7fe0f3120260]No JPEG data found in image
Error while decoding frame!
V:   0.0  17/ 17 ??% ??% ??,?% 0 0 
[mjpeg @ 0x7fe0f3120260]No JPEG data found in image
Error while decoding frame!
V:   0.0  18/ 18 ??% ??% ??,?% 0 0 
[mjpeg @ 0x7fe0f3120260]No JPEG data found in image
Error while decoding frame!
V:   0.0  19/ 19 ??% ??% ??,?% 0 0 
[mjpeg @ 0x7fe0f3120260]No JPEG data found in image
Error while decoding frame!
V:   0.0  20/ 20 ??% ??% ??,?% 0 0 
[mjpeg @ 0x7fe0f3120260]No JPEG data found in image
Error while decoding frame!
V:   0.0  21/ 21 ??% ??% ??,?% 0 0 
[mjpeg @ 0x7fe0f3120260]No JPEG data found in image
Error while decoding frame!
V:   0.0  22/ 22 ??% ??% ??,?% 0 0 
[mjpeg @ 0x7fe0f3120260]No JPEG data found in image
Error while decoding frame!
V:   0.0  23/ 23 ??% ??% ??,?% 0 0 
[mjpeg @ 0x7fe0f3120260]No JPEG data found in image
Error while decoding frame!
V:   0.0  24/ 24 ??% ??% ??,?% 0 0 
[mjpeg @ 0x7fe0f3120260]No JPEG data found in image
Error while decoding frame!
V:   0.0  25/ 25 ??% ??% ??,?% 0 0 
[mjpeg @ 0x7fe0f3120260]No JPEG data found in image
Error while decoding frame!
V:   0.0  26/ 26 ??% ??% ??,?% 0 0 
[mjpeg @ 0x7fe0f3120260]No JPEG data found in image
Error while decoding frame!
V:   0.0  27/ 27 ??% ??% ??,?% 0 0 
[mjpeg @ 0x7fe0f3120260]No JPEG data found in image
Error while decoding frame!
V:   0.0  28/ 28 ??% ??% ??,?% 0 0 
[mjpeg @ 0x7fe0f3120260]No JPEG data found in image
Error while decoding frame!
V:   0.0  29/ 29 ??% ??% ??,?% 0 0 
[mjpeg @ 0x7fe0f3120260]No JPEG data found in image
Error while decoding frame!
V:   0.0  30/ 30 ??% ??% ??,?% 0 0 
[mjpeg @ 0x7fe0f3120260]No JPEG data found in image
Error while decoding frame!
V:   0.0  31/ 31 ??% ??% ??,?% 0 0 
[mjpeg @ 0x7fe0f3120260]No JPEG data found in image
Error while decoding frame!
V:   0.0  32/ 32 ??% ??% ??,?% 0 0 
[mjpeg @ 0x7fe0f3120260]No JPEG data found in image
Error while decoding frame!
V:   0.0  33/ 33 ??% ??% ??,?% 0 0 
[mjpeg @ 0x7fe0f3120260]No JPEG data found in image
Error while decoding frame!
V:   0.0  34/ 34 ??% ??% ??,?% 0 0 
[mjpeg @ 0x7fe0f3120260]No JPEG data found in image
Error while decoding frame!
V:   0.0  35/ 35 ??% ??% ??,?% 0 0 
[mjpeg @ 0x7fe0f3120260]No JPEG data found in image
Error while decoding frame!
V:   0.0  36/ 36 ??% ??% ??,?% 0 0 
[mjpeg @ 0x7fe0f3120260]No JPEG data found in image
Error while decoding frame!
V:   0.0  37/ 37 ??% ??% ??,?% 0 0 
[mjpeg @ 0x7fe0f3120260]No JPEG data found in image
Error while decoding frame!
V:   0.0  38/ 38 ??% ??% ??,?% 0 0 
[mjpeg @ 0x7fe0f3120260]No JPEG data found in image
Error while decoding frame!
V:   0.0  39/ 39 ??% ??% ??,?% 0 0 
[mjpeg @ 0x7fe0f3120260]No JPEG data found in image
Error while decoding frame!
V:   0.0  40/ 40 ??% ??% ??,?% 0 0 
[mjpeg @ 0x7fe0f3120260]No JPEG data found in image
Error while decoding frame!
V:   0.0  41/ 41 ??% ??% ??,?% 0 0 
[mjpeg @ 0x7fe0f3120260]No JPEG data found in image
Error while decoding frame!
V:   0.0  42/ 42 ??% ??% ??,?% 0 0 
v4l2: ioctl set mute failed: No such device
v4l2: 0 frames successfully processed, 0 frames dropped.

Exiting... (Quit)
Should I have waited?
rene
Level 20
Level 20
Posts: 12212
Joined: Sun Mar 27, 2016 6:58 pm

Re: Connecting A PSVita to Linux machine

Post by rene »

norrin925 wrote: Mon Jul 04, 2022 4:47 pm Should I have waited?
No, seems you shouldn't; "something" is not right as to the data received from the capture device. It's interpreted to be MJPEG -- but errors out on seemingly each frame. Why I couldn't tell you; does the "plugin" create other /dev/videoX devices? If so, try that/those -- but if not this is furthermore a topic fully specific to that Vita UDCD plugin which I'd and likely not anyone else here has any idea about; you may want to contact the developer directly if there's no other capture device such as /dev/video1 exported also (which may provide for data in a different format).
norrin925
Level 1
Level 1
Posts: 21
Joined: Thu Nov 25, 2021 9:46 pm

Re: Connecting A PSVita to Linux machine

Post by norrin925 »

rene wrote: Mon Jul 04, 2022 4:54 pm
norrin925 wrote: Mon Jul 04, 2022 4:47 pm Should I have waited?
No, seems you shouldn't; "something" is not right as to the data received from the capture device. It's interpreted to be MJPEG -- but errors out on seemingly each frame. Why I couldn't tell you; does the "plugin" create other /dev/videoX devices? If so, try that/those -- but if not this is furthermore a topic fully specific to that Vita UDCD plugin which I'd and likely not anyone else here has any idea about; you may want to contact the developer directly if there's no other capture device such as /dev/video1 exported also (which may provide for data in a different format).
I'll ask him, thn. Before I do, though, what about sstarting it up in VLC? Would it be having the same problem as with mplayer? I should note that the Vita's screen is captured just fine in OBS.
rene
Level 20
Level 20
Posts: 12212
Joined: Sun Mar 27, 2016 6:58 pm

Re: Connecting A PSVita to Linux machine

Post by rene »

I have in VLC no "devices on the left" but of course you can try Media -> Open Capture device (and make sure that the correct /dev/video0 or other is selected). If it immediately crashes though, again no idea. Would still be very specific to the source which I can't test. A general option might be as to VLC to sudo apt-get purge --autoremove vlc and reinstall it as a flatpak (i.e., "the (Flathub) version") from Software Manager. Have noticed before that the Ubuntu 20.04 / Mint 20.x repository version sort of sucks. But that's just generic...
rene
Level 20
Level 20
Posts: 12212
Joined: Sun Mar 27, 2016 6:58 pm

Re: Connecting A PSVita to Linux machine

Post by rene »

Oh, let me add that I've in a few situations had success using mpv rather than mplayer itself; sudo apt-get install mpv. It is -- or was; I believe I recently noticed it was forked back again... -- a successor to mplayer that may work better. Same command line...
Locked

Return to “Software & Applications”