For the complete documentation index, see llms.txt. This page is also available as Markdown.

USB Webcam Video on RZ/V2N

Capture video from a USB webcam on the SolidRun RZ/V2N HummingBoard IIoT and stream it to a remote PC over Ethernet, or display it locally on the 7" MIPI LCD โ€” using GStreamer and VLC.

๐ŸŽฅ Streaming USB Webcam Video on RZ/V2N

A practical, end-to-end guide for capturing video from a USB camera attached to a SolidRun RZ/V2N HummingBoard IIoT and delivering the stream either to a remote PC over Ethernet or to the local 7" LCD panel โ€” using GStreamer on the board and GStreamer or VLC on the receiver.

๐Ÿ“‹ Overview

Two delivery paths are supported. Pick the one that matches your use case:

The default codec is MJPEG over RTP โ€” supported by both cameras and requiring no hardware codec on the board. An H.264 over RTP variant is also shown for the IMX678 module, which produces H.264 natively.

The IMX678 module's USB descriptor reads Camera Vendor USB3 openMV Camera โ€” that is a firmware placeholder string. The hardware is the SF-SQ8A987-86 IMX678 module.

๐Ÿ› ๏ธ Hardware

Component
Details

๐ŸŸข SoC / board

Renesas RZ/V2N โ€” SolidRun HummingBoard IIoT

๐Ÿ–ฅ๏ธ Display

7" LCD, native 1024ร—600, MIPI-attached

๐ŸŽฆ Camera A

Logitech C922 Pro Stream Webcam ยท USB ID 046d:085c

๐ŸŽฆ Camera B

IMX678 USB3 Camera Module SF-SQ8A987-86 ยท USB ID 414c:6573

๐Ÿ“ก Camera class

USB Video Class (UVC) โ€” both cameras

๐ŸŒ Network

Onboard Ethernet on the carrier board

๐Ÿ“ฆ Prerequisites

๐ŸŸข On the RZ/V2N (Yocto image)

The image must include:

  • โœ… V4L2 kernel support (CONFIG_USB_VIDEO_CLASS=m โ€” already in the BSP defconfig)

  • โœ… v4l-utils โ€” provides v4l2-ctl

  • โœ… GStreamer core + good / bad / ugly plugin sets

  • โœ… Weston (only for Option B โ€” local LCD display)

Add to your image recipe or local.conf:

๐Ÿ’ป On the PC (receiver)

  1. Download the GStreamer installer from the official GStreamer website.

  2. Run it and select Complete Installation to include all base plugins.

  3. Add the GStreamer bin\ directory to your PATH.

  4. Allow inbound UDP on port 5000 through Windows Firewall and mark the connection as Private.

  5. (Optional) Install VLC from videolan.org if you prefer the VLC receiver.

๐Ÿ” Detecting the camera

These steps are identical for both supported cameras.

Step 1 ยท Confirm USB enumeration

Look for one of:

Step 2 ยท Load the UVC driver (if not auto-loaded)

Expected:

udev autoloads uvcvideo on hotplug once the matching kernel modules are present in /lib/modules/$(uname -r)/. The manual modprobe is only needed for the first run or if udev autoloading is disabled.

Step 3 ยท Identify the V4L2 capture node

When a single camera is plugged in, the capture node is typically /dev/video0.

To identify the correct node when multiple V4L2 sources are present:

The node whose Device Caps line includes the Video Capture flag is the right one.

Step 4 ยท List supported formats

๐ŸŽฆ Camera
Native formats
Useful resolutions

Logitech C922 Pro

MJPG, YUYV, (H.264 on some firmware)

640ร—480, 1280ร—720, 1920ร—1080 โ€” all @ 30 fps

SF-SQ8A987-86 (IMX678)

MJPG, H.264, YUYV

640ร—480, 1280ร—720, 1920ร—1080, 3776ร—2120, 3840ร—2160 โ€” all @ 30 fps

๐ŸŒ Option A โ€” Stream over Ethernet to a remote PC

Architecture

How it works:

  • The board captures MJPEG frames from /dev/video0.

  • Frames are packetized into RTP (payload type 26 = JPEG) and sent over UDP to the PC on port 5000.

  • The PC receives, depacketizes, decodes, and renders the stream.

Get the PC's IP address (ip a on Linux, ipconfig on Windows) โ€” used as <PC_IP> in every sender command below.

๐Ÿ“ค A.1 โ€” Sender: Logitech C922 (MJPEG 1280ร—720 @ 30 fps)

๐ŸŸข On the RZ/V2N:

๐Ÿ“ค A.2 โ€” Sender: SF-SQ8A987-86 (MJPEG 1920ร—1080 @ 30 fps)

๐ŸŸข On the RZ/V2N:

No local decode is performed for streaming. The board only captures + packetizes โ€” the receiver does the heavy decoding. 1080p MJPEG over RTP runs comfortably on the board.

If the receiver PC or network struggles, drop the capture to 720p by changing 1920 / 1080 to 1280 / 720.

๐Ÿ“ค A.3 โ€” Sender: SF-SQ8A987-86 (H.264 1920ร—1080 @ 30 fps โ€” lower bandwidth)

The IMX678 module produces H.264 natively. H.264 over RTP yields a much smaller stream than MJPEG and is the recommended path for wireless / constrained networks.

๐ŸŸข On the RZ/V2N:

The Logitech C922 also advertises H.264 on some firmware revisions, but support varies between units. Stay on MJPEG for the C922 unless v4l2-ctl --list-formats-ext confirms H.264 is present.

๐Ÿ“ฅ A.4 โ€” Receiver: GStreamer (MJPEG)

๐Ÿ“ฅ A.5 โ€” Receiver: GStreamer (H.264)

๐Ÿ’ป On the Linux PC:

๐ŸŽฌ A.6 โ€” Receiver: VLC (via SDP file)

VLC needs a Session Description (SDP) file to know how to parse an RTP-over-UDP stream.

Open the SDP in VLC:

Or from the VLC GUI: Media โ†’ Open Fileโ€ฆ and select camera.sdp.

Reduce VLC latency โ€” VLC defaults to ~1 s of network caching for smoothness. To get closer to real-time, launch with:

๐ŸŽฌ A.7 โ€” Receiver: VLC (direct RTP URL)

VLC can also open the stream directly without an SDP:

๐Ÿ–ฅ๏ธ Option B โ€” Display locally on the 7" LCD

This option renders the camera stream fullscreen on the 7" 1024ร—600 panel using Weston (the Wayland compositor included in the SolidRun image).

Architecture

๐Ÿ”ง B.1 ยท Set the Weston environment

GStreamer needs two environment variables to talk to Weston. Run these in any shell that will launch a GStreamer command:

Confirm Weston is running and the Wayland socket exists:

Why wayland-1? SolidRun's Yocto image runs Weston as wayland-1 (not the default wayland-0). Verify with the ls command above โ€” it will show the actual socket name.

๐ŸŽฅ B.2 ยท Local preview pipeline (works for both cameras)

๐ŸŸข On the RZ/V2N:

Both supported cameras are UVC-class โ€” the v4l2src element does not need camera-specific configuration. Capture at 640ร—480, software-decode JPEG, software-scale to the panel's native 1024ร—600, then fullscreen via Weston.

Stop with Ctrl-C.

๐Ÿš€ B.3 ยท Make the preview a one-shot script

Install and run:

๐Ÿ”€ B.4 ยท Stream over Ethernet and preview locally at the same time

Use tee to duplicate the MJPEG stream โ€” one branch goes to the network, the other is decoded locally for the panel:

๐ŸŸข On the RZ/V2N:

๐Ÿ“Š Performance notes

๐ŸŒ Network streaming

The board only does capture + RTP packetization for network streams โ€” no local decode. The heavy lifting happens on the receiver PC, so the RZ/V2N's CPU stays mostly idle.

๐ŸŽฆ Camera
๐Ÿ“ Resolution
๐Ÿงฌ Codec
๐Ÿ“ก Bitrate (approx)
๐Ÿง  RZ/V2N CPU
๐Ÿ“ Notes

Logitech C922

1280ร—720 @ 30

MJPEG

30โ€“60 Mbps

Low

Default for C922

Logitech C922

1920ร—1080 @ 30

MJPEG

60โ€“120 Mbps

Low

Works on wired LAN

SF-SQ8A987-86

1920ร—1080 @ 30

MJPEG

50โ€“100 Mbps

Low

Native MJPEG

SF-SQ8A987-86

1920ร—1080 @ 30

H.264

5โ€“15 Mbps

Low

Lowest bandwidth ยท best for Wi-Fi โญ

๐Ÿ–ฅ๏ธ Local LCD preview

The host pipeline (software JPEG decode + software color convert + SHM copy to Weston) is what limits sustained display rate.

๐Ÿ“ Resolution
๐ŸŽฌ Behavior on 1024ร—600 panel

640ร—480 MJPEG

โœ… Smooth 30 fps โ€” recommended default

1280ร—720 MJPEG

๐ŸŸก Generally smooth, slightly higher CPU

1920ร—1080 MJPEG

๐Ÿ”ด Visibly slow (~10 fps) โ€” CPU-bound

For โ‰ฅ720p smooth on the LCD, two upstream improvements are needed (not in the default image):

  1. Hardware H.264 decode (v4l2h264dec or the Renesas codec plugin) โ€” drops decode CPU to near zero.

  2. Weston dmabuf support โ€” eliminates the per-frame SHM memcpy.

Neither is required for the 640ร—480 default path.

๐Ÿ”ง Troubleshooting

โŒ modprobe: ERROR: could not insert 'uvcvideo': Exec format error

Cause: the .ko was built against a different kernel-source state than the running Image.

Fix: rebuild kernel and modules in lockstep from the same source state:

Copy both arch/arm64/boot/Image and /tmp/rzv2n-mods/lib/modules/<ver>/ to the board, then reboot.

Avoid this class of failure entirely by adding to the defconfig:

โŒ Stream is choppy ยท "A lot of buffers are being dropped"

Cause: the pipeline was launched without a caps filter, so v4l2src negotiated the camera's default (often 4K YUYV uncompressed at 30 fps โ€” ~474 MB/s of raw video).

Fix: always pin format and resolution with image/jpeg,width=...,height=...,framerate=30/1 between v4l2src and the decoder.

โš ๏ธ Could not bind to zwp_linux_dmabuf_v1

Cause: Weston in this image does not advertise the dmabuf protocol.

Effect: waylandsink falls back to SHM buffers โ€” one extra memcpy per frame.

Verdict: safe to ignore at 640ร—480; becomes a measurable cost at 1080p+.

โš ๏ธ uvcvideo: Non-zero status (-71) in video completion handler

A single occurrence at stream start is benign โ€” the UVC alternate-setting switch as the camera negotiates its USB bandwidth allocation.

If the message repeats continuously during streaming, suspect:

  • ๐Ÿ”Œ Cable quality

  • โšก Insufficient hub power (especially with USB3 cameras drawing >500 mA)

  • ๐Ÿ“ก USB signal integrity (long cables, passive hubs)

โŒ Device '/dev/videoX' is not a capture device. Capabilities: 0x4a00000

Cause: targeting the UVC metadata node (typically /dev/video1 on the IMX678 module).

Capability bits 0x4a00000 = META_CAPTURE | STREAMING | EXT_PIX_FORMAT โ€” note no VIDEO_CAPTURE (bit 0x1).

Fix: use /dev/video0 โ€” the node whose Device Caps includes the Video Capture flag:

โŒ Receiver shows a black window โ€” no video

Checklist:

โš ๏ธ fpsdisplaysink reports impossibly low fps

Cause: fpsdisplaysink overrides its inner sink's sync=false back to sync=true, dropping late frames against the pipeline clock. The rendered fps it reports is sink-survival rate, not source delivery rate.

Fix โ€” for an accurate source-rate measurement:

Total time / 300 = actual source fps.

โŒ Camera enumerates but no /dev/video* appears

If dmesg shows new high-speed USB device but no follow-up idVendor= / Product= lines, the descriptor read failed.

This is a USB-host issue, not a driver issue. Suspect cable / hub / power.

๐Ÿš€ Quick reference

๐ŸŸข On the RZ/V2N

Task
Command / Section

๐Ÿ” Detect camera

lsusb

๐Ÿ“ฅ Load UVC driver

modprobe uvcvideo

๐Ÿ“‹ List V4L2 nodes

v4l2-ctl --list-devices

๐Ÿ“ List supported formats

v4l2-ctl -d /dev/video0 --list-formats-ext

๐Ÿ“ก Stream MJPEG to PC (C922)

see ยงA.1

๐Ÿ“ก Stream MJPEG to PC (IMX678)

see ยงA.2

๐Ÿ“ก Stream H.264 to PC (IMX678)

see ยงA.3

๐Ÿ–ฅ๏ธ Show preview on 7" LCD

usb-camera-preview

๐Ÿ”€ Stream + local preview

see ยงB.4

โน๏ธ Stop preview

Ctrl-C

๐Ÿ’ป On the PC

Task
Command / Section

๐Ÿ“ฅ Receive MJPEG (Linux / Windows)

see ยงA.4

๐Ÿ“ฅ Receive H.264 (Linux)

see ยงA.5

๐ŸŽฌ Receive via VLC (SDP file)

see ยงA.6 โ€” vlc camera.sdp

๐ŸŽฌ Receive via VLC (direct URL)

see ยงA.7 โ€” vlc rtp://@:5000

๐Ÿ“š See also โ€” for a deeper dive into the IMX678 module on RZ/V2N (kernel module install, driver detection, format reference), see the companion document "USB Camera on RZ/V2N โ€” IMX678 USB3 Module (SF-SQ8A987-86)".

Last updated