Server / Chipsets / Sophgo SG2002

CameraStack on the
Sophgo SG2002.

Ready-made camera software for the SG2002: capture, hardware encode, RTSP streaming and a standards-compliant ONVIF interface, integrated directly against the Cvitek/Sophgo MPI video pipeline SDK.

Available reference platform Class / Camera SoC

The silicon

Inside the
SG2002.

A tiny edge-AI camera SoC: RISC-V and Arm application cores on one die, a neural engine, and a 5-megapixel ISP and hardware video pipeline, with the DRAM in the package.

CPU
RISC-V C906, 1 GHz
boot-selectable Cortex-A53, + 700 MHz C906
AI engine
1 TOPS
INT8 TPU
ISP
Up to 5 MP @ 30 fps
4-lane or 2+2-lane MIPI CSI
Video encode
H.264 & H.265
5 MP @ 30 fps, plus JPEG
Memory
256 MB DRAM
in-package (SiP)

On this silicon

What runs today.

  • 01 Sensor capture through the SG2002's ISP and VPSS pipeline
  • 02 Multi-profile hardware encode, H.264 and H.265
  • 03 The full RTSP transport family: TCP, UDP, HTTP tunnelling, WebSocket and multicast
  • 04 ONVIF Device, DeviceIO, Media, Media2 (Profile S and Profile T), PTZ, Events, Imaging and Analytics services
  • 05 JPEG snapshots and OSD text overlay
  • 06 Live encoder control: frame rate and bitrate changes mid-stream, on-demand keyframes
  • 07 Encoder pause: hardware codecs engage only while clients are streaming
  • 08 Metadata streaming and events, including the ONVIF ImageTooDark tampering event

How this port works

The SG2002 has no vendor GStreamer stack; its camera and encoder are reached through the Cvitek/Sophgo MPI (Media Processing Interface) SDK. CameraStack handles platforms like this with a C producer: a custom adapter, written in C straight against the vendor SDK, that owns the media pipeline from sensor to hardware encoder and hands encoded video to the portable core. RTSP streaming and the ONVIF services run in the shared generic core which provides the core feature set shared with every other platform.

The producer implements the vendor-specific feature set in full. Encoder settings changed through ONVIF are applied live: frame rate and bitrate change mid-stream with no disconnection, and synchronisation-point requests map to on-demand IDR keyframes. JPEG snapshots and OSD text overlay run through the same pipeline. And when no client is connected the producer pauses the encoder entirely, so the hardware codecs only run, and only draw power, while someone is actually streaming.

Everything above the producer comes from the shared portable core, and this port inherits it all for free: the full RTSP transport family (interleaved TCP, UDP, HTTP tunnelling, WebSocket and multicast), metadata streaming, and eight ONVIF services, Device, DeviceIO, Media, Media2 (Profile S and Profile T), PTZ, Events, Imaging and Analytics. Events include the ONVIF ImageTooDark tampering topic, and the PTZ service made its CameraStack debut with this port.

Built on the Sophgo MPI SDK

The producer builds against the Cvitek/Sophgo MPI middleware, the same SDK used across the CV180x, CV181x and SG200x parts. Capture runs through VI, the video input module that owns the sensor and ISP; VPSS, the video processing subsystem, scales and converts each stream profile; and VENC drives the hardware H.264, H.265 and JPEG encoders. The port is proven with live multi-profile streams from a 5 MP OV5647 sensor.

sg2002 / live stream probe
$ ffprobe rtsp://<user>:<pass>@sg2002.lan:8554/onvif/Profile_1
ffprobe version 7.1.5-0+deb13u1 Copyright (c) 2007-2026 the FFmpeg developers
  ...
Input #0, rtsp, from 'rtsp://<user>:<pass>@sg2002.lan:8554/onvif/Profile_1':
  Metadata:
    title           : CameraStack Server (SG2002)
  Duration: N/A, start: 0.196467, bitrate: N/A
  Stream #0:0: Video: h264 (High), yuv420p(progressive), 1920x1080, 30 fps, 30 tbr, 90k tbn
  Stream #0:1: Data: none

The main profile runs at 1080p30. The probe's second track is the ONVIF metadata stream, carrying analytics and events alongside the video.

Field note

PTZ joins the stack.

We brought CameraStack up on SG2002 hardware as a standards-compliant network camera, and used the port to bring the ONVIF PTZ service into the core: PTZ requests from any ONVIF client driving the pan-tilt hardware.

Read the port story

Build on it

Designing an
SG2002 product?

The port work is already done, at the level of the MPI SDK your board already has. Use CameraStack Server as your complete camera stack, or as a drop-in ONVIF interface for a pipeline you already have. Evaluation builds are available to teams building real products.

Talk to us about the SG2002