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) |
|
Classification |
|
Object tracking |
|
Single keypoint |
|
Ordered group of metadata |
|
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.
Custom Watermark Metadata#
gvawatermark automatically renders custom drawing primitives attached directly to GStreamer buffers
using the DLStreamer 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.
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, KeypointGroupMtd |
ROI + GstStructure params |
|
Object detection per ROI |
GstBuffer + ROI/ODMtd |
ODMtd, ClsMtd, KeypointGroupMtd |
ROI (with parent_id) + GstStructure params |
|
Object classification per ROI |
GstBuffer + ROI/ODMtd |
ClsMtd, KeypointGroupMtd |
extended ROI params |
|
Full-frame classification |
GstBuffer |
— |
GstGVATensorMeta |
|
Generic full-frame inference |
GstBuffer |
— |
GstGVATensorMeta |
|
Generic inference per ROI |
GstBuffer + ROI/ODMtd |
— |
extended ROI params |
|
Object tracking |
GstBuffer + ROI/ODMtd |
TrackingMtd |
ROI + object_id param |
|
Zone and tripwire analytics |
GstBuffer + ODMtd + TrackingMtd |
ZoneMtd (related to ODMtd), TripwireMtd (related to ODMtd) + WatermarkDrawMeta + WatermarkCircleMeta |
— |
|
Metadata → JSON |
GstBuffer + ROI/ODMtd (+ related ClsMtd, KeypointGroupMtd, TrackingMtd, ZoneMtd, TripwireMtd) + GstGVATensorMeta |
— |
GstGVAJSONMeta |
|
JSON → MQTT/Kafka/File |
GstBuffer + GstGVAJSONMeta |
— |
— |
|
Merge from multiple streams |
GstBuffer + any metadata |
ODMtd, ClsMtd, KeypointGroupMtd |
ROI + GstStructure params, GstGVATensorMeta |
|
Overlay on video |
GstBuffer + ROI/ODMtd (+ related ClsMtd, KeypointGroupMtd, TrackingMtd) + GstGVATensorMeta + WatermarkDrawMeta + WatermarkCircleMeta + WatermarkTextMeta |
— |
— |
|
VLM inference on video frames |
GstBuffer |
ClsMtd |
GstGVATensorMeta, GstGVAJSONMeta |
|
Speech recognition (Whisper) |
GstBuffer (audio) |
ClsMtd |
— |