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.
๐ ๏ธ Hardware
๐ข 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โ providesv4l2-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)
Download the GStreamer installer from the official GStreamer website.
Run it and select Complete Installation to include all base plugins.
Add the GStreamer
bin\directory to yourPATH.Allow inbound UDP on port
5000through Windows Firewall and mark the connection as Private.(Optional) Install VLC from videolan.org if you prefer the VLC receiver.
Firewall reminder โ many "stream not appearing" reports on Windows are caused by Windows Defender Firewall silently dropping incoming UDP packets. Verify the network profile is Private and that GStreamer / VLC has firewall permission.
๐ 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:
Step 3 ยท Identify the V4L2 capture node
When a single camera is plugged in, the capture node is typically /dev/video0.
The IMX678 module exposes a second node /dev/video1 for UVC metadata. Do not use it for video โ it will return not a capture device with capability bits 0x4a00000. Use /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
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 port5000.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.
Always start the receiver before the sender. UDP is connectionless; any packets the receiver isn't ready for are silently dropped.
๐ค 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:
๐ค 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:
๐ฅ 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.
๐ฌ A.7 โ Receiver: VLC (direct RTP URL)
VLC can also open the stream directly without an SDP:
VLC cannot always auto-detect the JPEG payload format from the RTP stream alone. If the window stays black with rtp://@:5000, fall back to the SDP file method in ยงA.6.
๐ฅ๏ธ 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:
๐ฅ 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.
Verified output: Smooth 30 fps on the 1024ร600 panel, no buffer drops, clean shutdown.
๐ 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:
Combined load โ the network branch is cheap (capture + packetize), but the local-preview branch still does software JPEG decode + scale. If you see slowdown on the panel, drop the capture resolution to 640ร480.
๐ 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.
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.
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
๐ง 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.
โ 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
๐ 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
๐ฅ 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
Last updated