System only briefly displays external video input when connected to capture card

I am currently trying to connect a Steam Deck to my laptop via a Narvitech NJ300. From what I can tell it is a plug-and-play UVC device.
I tried two distinct setups: one connects the Steam Deck to a powered USB-C hub, which has an HDMI to HDMI output feeding into the NJ300, and a USB-C to USB-C connector between the output of the NJ300 to my computer. The other directly connects the Deck to the NJ300 with a USB-C to HDMI connector, and connects to my computer in the same manner.
When I connect it to my laptop, however, neither VLC nor OBS can properly read the output. The output does show up, in OBS and v4l2-ctl. The game does properly display upon switching to the output, and I confirmed with some animated loading scenes and key inputs that the output is not frozen, but will only do so for roughly one second. After that, the output will go dark. The only way to get the output again is by switching the device to a built-in webcam on the laptop and back on OBS, or by restarting VLC.
I have tried it powered (with a hub connected to the Deck’s port), unpowered, with different cables, directly connected to the port, plugged into different ports on my laptop, as YU12, YV12, MJPEG, etc., and the results are the same. The only thing I haven’t tried swapping out is the capture card itself; considering its price, I would like to know if I am overlooking something first. Notably, I saw instructions for the input to be configured as YUY2, but I don’t see this option in OBS, only the three aforementioned formats.

inxi
  Kernel: 6.6.26-1-MANJARO arch: x86_64 bits: 64 compiler: gcc v: 13.2.1
    clocksource: tsc avail: acpi_pm
    parameters: BOOT_IMAGE=/boot/vmlinuz-6.6-x86_64
    root=UUID=9f1e15e1-145d-4d25-94c0-790195da9733 rw quiet apparmor=1
    security=apparmor udev.log_priority=3 sysrq_always_enabled=1 ibt=off
    iommu=soft snd_hda_intel.power_save=0 intel_iommu=igfx_off
  Desktop: KDE Plasma v: 5.27.11 tk: Qt v: 5.15.12 info: frameworks
    v: 5.115.0 wm: kwin_x11 vt: 2 dm: SDDM Distro: Manjaro base: Arch Linux
Machine:
  Type: Laptop System: Dell product: XPS 17 9710 v: N/A
    serial: <superuser required> Chassis: type: 10 serial: <superuser required>
  Mobo: Dell model: 0TXN0W v: A00 serial: <superuser required> part-nu: 0A5D
    uuid: <superuser required> UEFI: Dell v: 1.22.0 date: 08/11/2023
Battery:
  ID-1: BAT0 charge: 92.2 Wh (100.0%) condition: 92.2/95.1 Wh (97.0%)
    volts: 12.7 min: 11.4 model: SMP DELL 01RR3YM type: Li-poly serial: <filter>
    status: full
CPU:
  Info: model: 11th Gen Intel Core i7-11800H bits: 64 type: MT MCP
    arch: Tiger Lake gen: core 11 level: v4 note: check built: 2020
    process: Intel 10nm family: 6 model-id: 0x8D (141) stepping: 1
    microcode: 0x4E
  Topology: cpus: 1x cores: 8 tpc: 2 threads: 16 smt: enabled cache:
    L1: 640 KiB desc: d-8x48 KiB; i-8x32 KiB L2: 10 MiB desc: 8x1.2 MiB
    L3: 24 MiB desc: 1x24 MiB
  Speed (MHz): avg: 1131 high: 2668 min/max: 800/4600 scaling:
    driver: intel_pstate governor: powersave cores: 1: 800 2: 2434 3: 872 4: 800
    5: 800 6: 800 7: 2668 8: 800 9: 800 10: 1662 11: 800 12: 800 13: 1673
    14: 800 15: 789 16: 807 bogomips: 73744
  Flags: avx avx2 ht lm nx pae sse sse2 sse3 sse4_1 sse4_2 ssse3 vmx
  Vulnerabilities:
  Type: gather_data_sampling mitigation: Microcode
  Type: itlb_multihit status: Not affected
  Type: l1tf status: Not affected
  Type: mds status: Not affected
  Type: meltdown status: Not affected
  Type: mmio_stale_data status: Not affected
  Type: reg_file_data_sampling status: Not affected
  Type: retbleed status: Not affected
  Type: spec_rstack_overflow status: Not affected
  Type: spec_store_bypass mitigation: Speculative Store Bypass disabled via
    prctl
  Type: spectre_v1 mitigation: usercopy/swapgs barriers and __user pointer
    sanitization
  Type: spectre_v2 mitigation: Enhanced / Automatic IBRS; IBPB: conditional;
    RSB filling; PBRSB-eIBRS: SW sequence; BHI: SW loop, KVM: SW loop
  Type: srbds status: Not affected
  Type: tsx_async_abort status: Not affected
Graphics:
  Device-1: Intel TigerLake-H GT1 [UHD Graphics] vendor: Dell driver: i915
    v: kernel arch: Gen-12.1 process: Intel 10nm built: 2020-21 ports:
    active: eDP-1 empty: DP-1, DP-2, DP-3, DP-4 bus-ID: 00:02.0
    chip-ID: 8086:9a60 class-ID: 0300
  Device-2: NVIDIA GA106M [GeForce RTX 3060 Mobile / Max-Q] vendor: Dell
    driver: nvidia v: 550.67 alternate: nouveau,nvidia_drm non-free: 550.xx+
    status: current (as of 2024-04; EOL~2026-12-xx) arch: Ampere code: GAxxx
    process: TSMC n7 (7nm) built: 2020-2023 pcie: gen: 1 speed: 2.5 GT/s
    lanes: 8 link-max: gen: 4 speed: 16 GT/s lanes: 16 bus-ID: 01:00.0
    chip-ID: 10de:2520 class-ID: 0300
  Device-3: Realtek Integrated_Webcam_HD driver: uvcvideo type: USB rev: 2.0
    speed: 480 Mb/s lanes: 1 mode: 2.0 bus-ID: 3-11:5 chip-ID: 0bda:5510
    class-ID: fe01 serial: <filter>
  Display: x11 server: X.Org v: 21.1.12 compositor: kwin_x11 driver: X:
    loaded: modesetting,nvidia unloaded: nouveau alternate: fbdev,nv,vesa
    dri: iris gpu: i915 display-ID: :0 screens: 1
  Screen-1: 0 s-res: 3840x2400 s-dpi: 266 s-size: 366x229mm (14.41x9.02")
    s-diag: 432mm (17")
  Monitor-1: eDP-1 model: Sharp 0x14d6 built: 2020 res: 3840x2400 hz: 60
    dpi: 266 gamma: 1.2 size: 366x229mm (14.41x9.02") diag: 432mm (17")
    ratio: 16:10 modes: 3840x2400
  API: EGL v: 1.5 hw: drv: intel iris drv: nvidia platforms: device: 0
    drv: nvidia device: 1 drv: iris device: 3 drv: swrast gbm: drv: kms_swrast
    surfaceless: drv: nvidia x11: drv: iris inactive: wayland,device-2
  API: OpenGL v: 4.6.0 compat-v: 4.5 vendor: intel mesa v: 24.0.2-manjaro1.1
    glx-v: 1.4 direct-render: yes renderer: Mesa Intel UHD Graphics (TGL GT1)
    device-ID: 8086:9a60 memory: 61.07 GiB unified: yes
  API: Vulkan v: 1.3.279 layers: 5 device: 0 type: discrete-gpu name: NVIDIA
    GeForce RTX 3060 Laptop GPU driver: nvidia v: 550.67 device-ID: 10de:2520
    surfaces: xcb,xlib device: 1 type: integrated-gpu name: Intel UHD Graphics
    (TGL GT1) driver: mesa intel v: 24.0.2-manjaro1.1 device-ID: 8086:9a60
    surfaces: xcb,xlib
Audio:
  Device-1: Intel Tiger Lake-H HD Audio vendor: Dell
    driver: sof-audio-pci-intel-tgl
    alternate: snd_hda_intel,snd_sof_pci_intel_tgl bus-ID: 00:1f.3
    chip-ID: 8086:43c8 class-ID: 0401
  Device-2: NVIDIA GA106 High Definition Audio vendor: Dell
    driver: snd_hda_intel v: kernel pcie: gen: 4 speed: 16 GT/s lanes: 8
    link-max: lanes: 16 bus-ID: 01:00.1 chip-ID: 10de:228e class-ID: 0403
  Device-3: Conexant Systems (Rockwell) Hi-Res Audio
    driver: hid-generic,snd-usb-audio,usbhid type: USB rev: 2.0 speed: 12 Mb/s
    lanes: 1 mode: 1.1 bus-ID: 3-2:43 chip-ID: 0572:1b08 class-ID: 0300
    serial: <filter>
  API: ALSA v: k6.6.26-1-MANJARO status: kernel-api with: aoss
    type: oss-emulator tools: alsactl,alsamixer,amixer
  Server-1: JACK v: 1.9.22 status: off tools: N/A
  Server-2: PipeWire v: 1.0.3 status: active with: 1: pipewire-pulse
    status: active 2: pipewire-media-session status: active 3: pipewire-alsa
    type: plugin tools: pactl,pw-cat,pw-cli
Network:
  Device-1: Intel Tiger Lake PCH CNVi WiFi vendor: Rivet Networks
    driver: iwlwifi v: kernel bus-ID: 00:14.3 chip-ID: 8086:43f0 class-ID: 0280
  IF: wlp0s20f3 state: up mac: <filter>
  Info: services: NetworkManager, systemd-timesyncd, wpa_supplicant
Bluetooth:
  Device-1: Intel AX201 Bluetooth driver: btusb v: 0.8 type: USB rev: 2.0
    speed: 12 Mb/s lanes: 1 mode: 1.1 bus-ID: 3-14:6 chip-ID: 8087:0026
    class-ID: e001
  Report: rfkill ID: hci0 rfk-id: 1 state: down bt-service: enabled,running
    rfk-block: hardware: no software: yes address: see --recommends
Drives:
  Local Storage: total: 1.86 TiB used: 725.68 GiB (38.0%)
  SMART Message: Unable to run smartctl. Root privileges required.
  ID-1: /dev/nvme0n1 maj-min: 259:0 vendor: KIOXIA model: KXG60PNV2T04 NVMe
    2048GB size: 1.86 TiB block-size: physical: 512 B logical: 512 B
    speed: 31.6 Gb/s lanes: 4 tech: SSD serial: <filter> fw-rev: 10704103
    temp: 31.9 C scheme: GPT
Partition:
  ID-1: / raw-size: 64 GiB size: 61.94 GiB (96.79%) used: 44.25 GiB (71.4%)
    fs: ext4 dev: /dev/nvme0n1p2 maj-min: 259:2
  ID-2: /boot/efi raw-size: 300 MiB size: 299.4 MiB (99.80%)
    used: 284 KiB (0.1%) fs: vfat dev: /dev/nvme0n1p1 maj-min: 259:1
  ID-3: /home raw-size: 1.73 TiB size: 1.7 TiB (98.37%)
    used: 681.43 GiB (39.0%) fs: ext4 dev: /dev/nvme0n1p4 maj-min: 259:4
Swap:
  Kernel: swappiness: 60 (default) cache-pressure: 100 (default) zswap: yes
    compressor: zstd max-pool: 20%
  ID-1: swap-1 type: partition size: 68.79 GiB used: 0 KiB (0.0%)
    priority: -2 dev: /dev/nvme0n1p3 maj-min: 259:3
Sensors:
  System Temperatures: cpu: 49.0 C mobo: 39.0 C
  Fan Speeds (rpm): cpu: 1354
Info:
  Memory: total: 64 GiB note: est. available: 62.53 GiB used: 9.74 GiB (15.6%)
  Processes: 390 Power: uptime: 1d 3h 31m states: freeze,mem,disk
    suspend: s2idle wakeups: 0 hibernate: platform avail: shutdown, reboot,
    suspend, test_resume image: 24.96 GiB services: org_kde_powerdevil,upowerd
    Init: systemd v: 255 default: graphical tool: systemctl
  Packages: 1750 pm: pacman pkgs: 1741 libs: 476 tools: pamac pm: flatpak
    pkgs: 0 pm: snap pkgs: 9 Compilers: clang: 16.0.6 gcc: 13.2.1 alt: 12
    Shell: Zsh v: 5.9 default: Bash v: 5.2.26 running-in: yakuake inxi: 3.3.34```
VLC output
VLC media player 3.0.20 Vetinari (revision 3.0.20-0-g6f0d0ab126b)
[00005591008ee5e0] main libvlc: Running vlc with the default interface. Use 'cvlc' to use vlc without interface.
[mjpeg @ 0x7f9a3c01d740] No JPEG data found in image
[mjpeg @ 0x7f9a3c01d740] No JPEG data found in image```
OBS output when resetting input source to get the image to show up briefly. No errors were reported.
info: v4l2-input: /dev/video3 seems to not support video capture
info: v4l2-input: /dev/video1 seems to not support video capture
info: v4l2-input: /dev/video8 seems to not support video capture
info: v4l2-input: Found device 'Integrated_Webcam_HD: Integrate' at /dev/video2
info: v4l2-input: Found device 'Integrated_Webcam_HD: Integrate' at /dev/video0
info: v4l2-input: Stepwise and Continuous framerates are currently hardcoded
info: v4l2-input: Stepwise and Continuous framerates are currently hardcoded
info: v4l2-input: Pixelformat: Motion-JPEG (available)
info: v4l2-input: Pixelformat: RGB3 (Emulated) (unavailable)
info: v4l2-input: Pixelformat: BGR3 (Emulated) (available)
info: v4l2-input: Pixelformat: YU12 (Emulated) (available)
info: v4l2-input: Pixelformat: YV12 (Emulated) (available)
info: v4l2-input: Stepwise and Continuous framerates are currently hardcoded
info: v4l2-input: Found input 'Camera 1' (Index 0)
info: v4l2-input: Pixelformat: Motion-JPEG (available)
info: v4l2-input: Pixelformat: RGB3 (Emulated) (unavailable)
info: v4l2-input: Pixelformat: BGR3 (Emulated) (available)
info: v4l2-input: Pixelformat: YU12 (Emulated) (available)
info: v4l2-input: Pixelformat: YV12 (Emulated) (available)
info: v4l2-input: Stepwise and Continuous framerates are currently hardcoded
info: v4l2-input: Stepwise and Continuous framerates are currently hardcoded
info: v4l2-input: Start capture from /dev/video7
info: v4l2-input: Input: 0
info: v4l2-input: Resolution: 1920x1080
info: v4l2-input: Pixelformat: YU12
info: v4l2-input: Linesize: 1920 Bytes
info: v4l2-input: Framerate: 60.00 fps
info: v4l2-input: /dev/video7: select timeout set to 83333 (5x frame periods)```
v4l2-ctl --list-devices
Integrated_Webcam_HD: Integrate (usb-0000:00:14.0-11):
        /dev/video0
        /dev/video1
        /dev/video2
        /dev/video3
        /dev/media0
        /dev/media1

NarviCapture U3 HD60 4K Device: (usb-0000:00:14.0-3):
        /dev/video7
        /dev/video8
        /dev/media2```

The outputs seem to indicate that the device just stops sending data, which is odd. That could be power related, but you say you’ve tried it with a powered dock. It’s possible that there’s some quirk on the device given that it doesn’t officially support Linux - can you verify if it works with a Windows or Mac machine? Or perhaps try opening it in a webcam viewer (like Cheese) to see if it’s a configuration issue on either VLC or OBS?

However, the above is kind-of clutching at straws. Assuming the device is getting enough power, it sounds more like a faulty device than anything else.

If you do end up replacing it, I’d recommend going for something that officially supports Linux. I know a few that do, and honestly, the NJ300 seems kind-of expensive for the specification that it has (I think it gets beaten by a Genki Shadowcast 2 for example, which is half the price).

I mostly wanted it for the HDMI passthrough, as the Steam Deck screen switches off when it outputs to another screen. I just tried the Genki Shadowcast 2 and it works perfectly with the caveat of not having passthrough, and viewing it on the output screen carries several frames of delay.
I can stream over network via the Steam Link feature, and point OBS to that output instead, but it’s obviously reliant on connectivity.

I took the only UVC device I have, my phone, and tried it with VLC. And it worked.

You are much more familiar with V42L than I am. But I knew UVC supported compressed video. So I was possibly going down a rabbit hole, wondering if there was an issue there. Using an unknown codec to the kernel, I was thinking?

https://www.kernel.org/doc/html/v6.6/userspace-api/media/v4l/videodev.html
(Under compressed formats, there’s a lot! And some…)

Since there is no information about this Narvitech device and this so called UVC support, that makes it pretty hard.

Might even be worth contacting their support. (But I have a feeling you may need to speak Mandarin.) But it at least lets them know customers are looking for Linux support.

The fact that a different device works suggests that either there’s a quirk preventing the NJ300 from working under Linux, or you have a faulty unit. Given the NJ300 is supposed to outputting MJPEG, which is really well supported, I’d lean more to it being a faulty unit.

As for passthrough, HDMI splitters are a really cheap workaround for that. Yes, it’s nice to have everything in one device, but if budget is a concern a Shadowcast 2 + an HDMI splitter is a decent setup. Just make sure that the splitter mirrors outputs and you should be good.

Even with a splitter I’d need another screen to output to afterwards, no? I only have this deck and my laptop. My laptop doesn’t take HDMI input, so I’d have to bring another screen to get the capture card method working, and that’d be inconvenient as I travel a lot.
I returned the cards for now, I wonder if I can use an ethernet cable (with USB-C adapters on both sides) to speed up the steam link connection… it works over a network connection, I’ll probably need to ask for help when I set it up in a day or two.

I guess knowing the use case would have helped - I assumed it was for capture, but I’m guessing you wanted to use the laptop as a screen for the Deck? In which case, pretty much any solution will involve a few frames of latency because you’ve got an encode/decode stack to navigate.

One thing that might work is using your laptop as a Wifi hotspot and using Steam Link. That’s got downsides (you’ll may need another way of accessing the Internet - most likely, tethering your phone over USB-C and using it as a Wifi adapter), but I suspect that’s one of the lowest latency ways you can get a display signal from the Deck onto the laptop. Or you could, you know, use the screen on the Deck :slight_smile:

Sorry about not being clear. The intent is indeed to capture on the laptop. The problem is that connecting the Deck in gaming mode to any capture card causes the Deck’s screen to turn black. This is intended behavior according to the FAQ. As desktop mode is just an X server, and gaming mode has quite a few optimizations for performance, I would prefer to use gaming mode. This in turn necessitates an external monitor, bringing us back to the passthrough problem.

Right, I will admit I’m a little confused on why Shadowcast + HDMI Splitter isn’t acceptable then, as that’s a solution that only requires the external monitor, same as the original NJ300.

On the Steam Deck turning off its screen: one option would be to run Gamescope (Steam Deck’s game mode compositor) under the desktop environment. That will net you pretty much all optimisations on desktop mode, while still being having being able to output on the USB-C port.

The goal was to somehow drop the external screen altogether, for input lag and travel efficiency reasons. I will look into the Gamescope method though. I recently tried the naive method of using steam play with the laptop and deck linked via an ethernet cable. It didn’t seem to net any appreciable latency improvement, likely because I didn’t set up the network properly in the first place.

Steam Play will always add some latency for the same reason as any of the hardware solutions: the video has to navigate an encode/decode stack before it gets displayed. While a poor network connection will add more latency, I’d be very surprised if the latency added by Steam Play is less than a capture card.

To accomplish what you’re after, you could try a higher end external capture device which might have faster hardware in it, thus minimising latency. However, you should probably try and figure out what level of latency you’re sensitive to first, because that seems important to know.

The other thing is to have a laptop that has a video input for its screen, although that’s obviously a vastly more expensive solution - and I’m only aware of a single laptop that supports that (the Minisforum V3).

Ultimately though, I don’t think there’s much that can be done. Laptops aren’t normally set up in a way that makes what you want possible or easy.