Skip to main content

Overview

GStreamer is a powerful multimedia framework that allows for efficient video streaming and processing. The exploreHD supports multiple compression formats including hardware-accelerated H.264, MJPEG, and raw YUYV.

Requirements

You must have gstreamer installed on a Linux computer for this. You can use the following install command to get the required packages.
sudo apt install v4l-utils libgstreamer1.0-dev libgstreamer-plugins-base1.0-dev gstreamer1.0-tools gstreamer1.0-x gstreamer1.0-plugins-base gstreamer1.0-plugins-good gstreamer1.0-plugins-bad gstreamer1.0-libav gstreamer1.0-plugins-ugly

Identifying Device Nodes

When you plug in an exploreHD camera, the Linux kernel (via V4L2) typically creates four device nodes (e.g., /dev/video0 through /dev/video3).
  • MJPEG / YUYV: Usually found on the first node of the group (e.g., /dev/video0).
  • Hardware H.264: Usually found on the third node of the group (e.g., /dev/video2).
You can verify your device nodes using v4l2-ctl:
v4l2-ctl --list-devices
Look for the entry corresponding to the exploreHD. It will list the paths associated with that specific camera.

Hardware H.264 Mode

The exploreHD features built-in hardware H.264 encoding, which provides high-quality video at low bitrates with minimal CPU overhead.

Local Preview

To view the H.264 stream locally (assuming /dev/video2 is the H.264 node):
gst-launch-1.0 v4l2src device=/dev/video2 ! \
    video/x-h264,width=1920,height=1080,framerate=30/1 ! \
    h264parse ! avdec_h264 ! autovideosink

UDP Network Stream

To stream the H.264 feed over a network to another device (e.g., IP 192.168.1.50 on port 5600):
gst-launch-1.0 v4l2src device=/dev/video2 ! \
    video/x-h264,width=1920,height=1080,framerate=30/1 ! \
    h264parse ! queue ! rtph264pay config-interval=10 pt=96 ! \
    udpsink host=192.168.1.50 port=5600
To receive the stream on a different computer you can use the following:
gst-launch-1.0 -v udpsrc port=5600 ! \
    "application/x-rtp, media=(string)video, clock-rate=(int)90000, encoding-name=(string)H264, payload=(int)96" ! \
    rtph264depay ! h264parse ! avdec_h264 ! videoconvert ! autovideosink

MJPEG Mode

MJPEG mode is widely compatible and provides good quality with low latency.

Local Preview

Assuming /dev/video0 is the MJPEG node:
gst-launch-1.0 v4l2src device=/dev/video0 ! \
    image/jpeg,width=1920,height=1080,framerate=30/1 ! \
    jpegdec ! autovideosink

UDP Network Stream

To stream MJPEG over the network:
gst-launch-1.0 v4l2src device=/dev/video0 ! \
    image/jpeg,width=1920,height=1080,framerate=30/1 ! \
    rtpjpegpay ! udpsink host=192.168.1.50 port=5600

YUYV Mode

Note that due to USB bandwidth limitations, YUYV is typically limited to lower framerates at high resolutions.

Local Preview

Assuming /dev/video0 is the node:
gst-launch-1.0 v4l2src device=/dev/video0 ! \
    video/x-raw,format=YUY2,width=640,height=480,framerate=30/1 ! \
    videoconvert ! autovideosink
Refer to the exploreHD Technical Specifications to see which resolution and framerate combinations are supported in YUYV mode. At 1080p, YUYV is limited to 5 FPS.

Advanced Bitrate Control

When using H.264 mode, you can adjust the bitrate and other encoder parameters via V4L2 controls while the pipeline is running.
# Example: Set bitrate to 5Mbps
v4l2-ctl -d /dev/video2 --set-ctrl=video_bitrate=5000000