Metadata#
Overview#
DL Streamer is transitioning to the GStreamer Analytics metadata library as the primary way to represent inference results. The legacy metadata API remains functional but is deprecated.
GStreamer Analytics Metadata#
This is the recommended metadata API for new code. All metadata for a
buffer is stored inside a single GstAnalyticsRelationMeta container with
typed entries (GstAnalyticsMtd) connected by relations (CONTAIN,
IS_PART_OF, RELATE_TO).
Key types:
Type |
Description |
|---|---|
|
Object detection (bbox, label, confidence) |
|
3D object detection (oriented box, class, confidence, sensor modality) — DL Streamer extension |
|
Classification |
|
Object tracking |
|
Single keypoint |
|
Ordered group of metadata |
|
Semantic segmentation (class-index mask) |
|
Raw tensor payload — generic |
|
Static keypoint layout registry — DL Streamer extension |
|
Zone presence (zone ID) — DL Streamer extension |
|
Tripwire crossing (tripwire ID, direction) — DL Streamer extension |
For the full API documentation, keypoint descriptor details, and code
examples, see GStreamer Analytics Metadata.
You can also check out our post at discourse.gstreamer.org
for input from GStreamer community.
Custom Watermark Metadata#
gvawatermark automatically renders custom drawing primitives attached directly to GStreamer buffers
using the DL Streamer watermark metadata types.
Key types:
Type |
Description |
|---|---|
|
Polygon or polyline defined by an ordered list of (x, y) coordinate pairs (max 128 pairs) |
|
Circle defined by center (cx, cy), radius, color, and thickness |
|
Text label at position (x, y) with font, scale, color, and optional background |
For the full API documentation, see Watermark Metadata.
3D Sensor Metadata#
DL Streamer’s 3D pipelines (LiDAR and mmWave radar) carry metadata at two levels:
3D detections — oriented 3D bounding boxes are stored as
GstAnalytics3DODMtdinside the buffer’sGstAnalyticsRelationMeta.Raw-sensor metadata — standalone
GstMetatypes attached directly to the buffer that describe the sensor frame and its low-level results:
Key types:
Type |
Description |
|---|---|
|
3D object detection — oriented box (x, y, z, l, w, h, yaw, pitch, roll), class, confidence, sensor modality. |
|
Raw LiDAR frame framing: point count, frame/stream id, timestamps. The point cloud itself lives in the buffer payload. |
|
Radar signal-processing results: point clouds, clusters, and per-object tracks. |
GstAnalytics3DODMtd is documented in GStreamer Analytics Metadata.
For the raw-sensor LidarMeta and GstRadarProcessMeta types,
see 3D Sensor Metadata.
Legacy Metadata (deprecated)#
DEPRECATED: The legacy metadata API based on
GstVideoRegionOfInterestMeta,GstGVATensorMeta, andGstGVAJSONMetais deprecated and will be removed in the future. New code should use the GStreamer Analytics API described below.
The legacy API attaches
GstVideoRegionOfInterestMeta
to buffers with bounding box coordinates (x, y, w, h) and a
GList *params of GstStructure entries holding additional inference results
(detection confidence, classification labels, keypoints, etc.).
Two additional custom metadata types are defined:
GstGVATensorMeta — raw tensor output from
gvainferenceGstGVAJSONMeta — JSON conversion output from
gvametaconvert
For reference documentation of the legacy API, see Legacy Metadata.
Element input/output summary#
Element |
Description |
Input |
Output (Analytics) |
Output (Legacy) |
|---|---|---|---|---|
|
Object detection on full frame |
GstBuffer |
ODMtd, ClsMtd, GstAnalyticsGroupMtd, GstAnalyticsKeypointMtd, GstAnalyticsTensorMtd |
ROI + GstStructure params |
|
Object detection per ROI |
GstBuffer + ROI + ODMtd |
ODMtd, ClsMtd, GstAnalyticsGroupMtd, GstAnalyticsKeypointMtd, GstAnalyticsTensorMtd |
ROI (with parent_id) + GstStructure params |
|
Object classification per ROI |
GstBuffer + ROI + ODMtd |
ClsMtd, GstAnalyticsGroupMtd, GstAnalyticsKeypointMtd, GstAnalyticsSegmentationMtd, GstAnalyticsTensorMtd |
extended ROI params |
|
Full-frame classification |
GstBuffer |
ClsMtd, GstAnalyticsGroupMtd, GstAnalyticsKeypointMtd, GstAnalyticsSegmentationMtd, GstAnalyticsTensorMtd |
GstGVATensorMeta |
|
Generic full-frame inference |
GstBuffer |
GstAnalyticsTensorMtd |
GstGVATensorMeta |
|
Generic inference per ROI |
GstBuffer + ROI + ODMtd |
GstAnalyticsTensorMtd |
extended ROI params |
|
Object tracking |
GstBuffer + ROI + ODMtd |
TrackingMtd |
ROI + object_id param |
|
Zone and tripwire analytics |
GstBuffer + ODMtd + TrackingMtd |
ZoneMtd, TripwireMtd, WatermarkDrawMeta, WatermarkCircleMeta |
— |
|
Metadata → JSON |
GstBuffer + ROI + ODMtd + ClsMtd + GstAnalyticsGroupMtd + GstAnalyticsKeypointMtd + TrackingMtd + GstAnalyticsSegmentationMtd + GstAnalyticsTensorMtd + ZoneMtd + TripwireMtd + 3DODMtd + LidarMeta + GstRadarProcessMeta + GstAnalyticsBatchMeta + GstGVATensorMeta |
— |
GstGVAJSONMeta |
|
JSON → MQTT/Kafka/File |
GstBuffer + GstGVAJSONMeta |
— |
— |
|
Merge from multiple streams |
GstBuffer + ROI + GstGVATensorMeta + ODMtd + ClsMtd + GstAnalyticsGroupMtd + GstAnalyticsKeypointMtd + GstAnalyticsSegmentationMtd + GstAnalyticsTensorMtd |
ODMtd, ClsMtd, GstAnalyticsGroupMtd, GstAnalyticsKeypointMtd, GstAnalyticsSegmentationMtd, GstAnalyticsTensorMtd |
ROI + GstStructure params, GstGVATensorMeta |
|
Overlay on video |
GstBuffer + ROI + ODMtd + ClsMtd + GstAnalyticsGroupMtd + GstAnalyticsKeypointMtd + TrackingMtd + GstAnalyticsSegmentationMtd + GstAnalyticsTensorMtd + GstGVATensorMeta + WatermarkDrawMeta + WatermarkCircleMeta + WatermarkTextMeta |
— |
— |
|
VLM inference on video frames |
GstBuffer |
ClsMtd |
GstGVAJSONMeta |
|
Speech recognition (Whisper) |
GstBuffer (audio) |
ClsMtd |
— |
|
Merge streams into one batch |
GstBuffer (per stream) + metadata |
GstAnalyticsBatchMeta (container) |
— |
|
Split batch back to per-stream buffers |
GstAnalyticsBatchMeta (container) |
per-stream GstBuffer + metadata |
— |
|
mmWave radar signal processing |
GstBuffer |
GstRadarProcessMeta |
— |
|
Live LiDAR capture from a device → point cloud |
— (source element) |
LidarMeta |
— |
|
Parse raw LiDAR frame → point cloud |
GstBuffer |
LidarMeta |
— |
|
3D detection on LiDAR |
GstBuffer + LidarMeta |
3DODMtd |
— |
|
Fuse camera 2D with 3D (LiDAR/radar) |
GstAnalyticsBatchMeta + ODMtd + 3DODMtd + GstRadarProcessMeta |
3DODMtd + TrackingMtd |
— |
|
Render camera 2D + 3D point cloud, overlay detections |
GstAnalyticsBatchMeta + ODMtd + 3DODMtd + TrackingMtd |
— |
— |