# Metadata parsing
Source: [https://docs.qualcomm.com/doc/80-70022-50/topic/gst-ai-metadata-parser.html](https://docs.qualcomm.com/doc/80-70022-50/topic/gst-ai-metadata-parser.html)
The **gst-ai-metadata-parser-example** application receives the live video stream
input from camera, file, or RTSP source, and passes the stream to the YOLO models for object
detection and preview. The overlaid AI model output, including labels and bounding boxes, is
displayed on an HDMI display. The extracted metadata is logged to the console and used to
count the number of humans in the frame.
The following figure shows the pipeline for metadata parsing. For information about the
plugins used in the pipeline flow, see [Pipeline flow](https://docs.qualcomm.com/doc/80-70022-50/topic/gst-ai-metadata-parser.html#gst-ai-metadata-parser__section_dvc_mcp_m2c).
Figure : gst-ai-metadata-parser-example pipeline
## Sample model and label files
Table : Sample model and label files for gst-ai-metadata-parser-example
| Runtime | Model files | Label files |
| :--- | :--- | :--- |
| LiteRT | *yolox\_quantized.tflite* | *yolox.json* |
Note: To view the bounding box information along with the human
count, run the following command before running the application:
export GST_DEBUG=4Copy to clipboard
## Run the application on the target device
Use the following command to run the application:
gst-ai-metadata-parser-example --config-file=/etc/configs/config-metadata-parser.jsonCopy to clipboard
The sample application uses the
/etc/configs/config-metadata-parser.json file to read the
input parameters.
To create your own config JSON file, use [config-metadata-parser.json](https://git.codelinaro.org/clo/le/platform/vendor/qcom-opensource/gst-plugins-qti-oss/-/blob/imsdk.lnx.2.0.0.r2-rel/gst-sample-apps/gst-ai-metadata-parser-example/config-metadata-parser.json?ref_type=heads) as a
reference.
1. Ensure that you complete the [Prerequisites](https://docs.qualcomm.com/doc/80-70022-50/topic/download-model-and-label-files.html).
2. Update the config JSON file based on the model, input stream, and other
properties. For more information, see [Config JSON field description](https://docs.qualcomm.com/doc/80-70022-50/topic/gst-ai-metadata-parser.html#gst-ai-metadata-parser__section_qjx_hqq_32c).
3. Use the following format of the config-metadata-parser.json
file.
{
"file-path": "",
"model": "",
"labels": "",
"threshold": ,
"runtime": ""
}Copy to clipboard
For example, run the application using input from a camera,
YOLOX model, and human count on
console:
{
"file-path": "/etc/media/video.mp4",
"model": "/etc/models/yolox_quantized.tflite",
"labels": "/etc/labels/yolox.json",
"threshold": 40,
"runtime": "dsp"
}Copy to clipboard
4. Run the gst-ai-metadata-parser-example
application:
gst-ai-metadata-parser-example --config-file=/etc/configs/config-metadata-parser.jsonCopy to clipboard
5. To display the available help options, run the following command in the SSH
shell:
gst-ai-metadata-parser-example -hCopy to clipboard
6. To stop the use case, use CTRL +
C.
## Expected output
Figure : Expected output for gst-ai-metadata-parser-example application–object
detection

## Pipeline flow
The following table lists the plugins used in the metadata parsing
pipeline:
| Plugin | Description |
| --- | --- |
| Camera source:[qtiqmmfsrc](https://docs.qualcomm.com/doc/80-70022-50/topic/qtiqmmfsrc.html) |
Captures the live stream from camera.
Uses tee to split the stream into two for inferencing and composing.
|
| File source: filesrc |
Captures the video stream using filesrc, followed by qtdemux, which demultiplexes the stream.
Uses tee to split the stream into two for inferencing and composing.
|
| RTSP source: rtspsrc |
Captures the RTSP stream using rtspsrc, followed by rtph264depay for video extraction.
Uses tee to split the stream into two for inferencing and composing.
|
| h264parse | Parses the H.264 video. |
| [v4l2h264dec](https://docs.qualcomm.com/doc/80-70022-50/topic/v4l2h264dec.html) | Decodes the video. |
| [qtimlvconverter](https://docs.qualcomm.com/doc/80-70022-50/topic/qtimlvconverter.html) |
Receives the video stream on its sink pad.
Performs the following preprocessing on the stream data. This preprocessing is done when the model expects floating-point values as input.
Color conversion
Scaling (up or down)
Normalization
Converts the preprocessed video stream to a tensor stream on its source pad.
The tensor stream is used for inferencing in the later stages of the pipeline. |
| Inferencing plugin:[qtimltflite](https://docs.qualcomm.com/doc/80-70022-50/topic/qtimltflite.html) |
After the inference runtime receives the tensor stream on its sink pad, it runs the inference.
Produces a tensor stream with the inference results on its source pad.
|
| qtimlpostprocess | The first qtimlpostprocess plugin for detection model handles inference results from any object detection model.
Applies a threshold to the chosen number of results.
Loads the YOLOv8 module.
Produces video frames with only bounding boxes that can be overlaid on objects.
Sends these processed frames to the sink pad of qtivcomposer.
|
| qtimlpostprocess | The second qtimlpostprocess plugin for detection model does the following:
Produces the output in a text format (bounding box coordinates and labels).
This output is connected to appsink plugin where the metadata is read, parsed, and logged.
The bounding box information is used to count number of humans in each frame.
Waylandsink submits the video stream received on its sink pad to Weston.
Weston renders the video stream on a local display.
|
| | |
## Config JSON field description
The different parameters available to configure the JSON file and run the use case
are as follows:
Table : Field description–gst-ai-metadata-parser-example file
| Field | Values/description |
| :--- | :--- |
| **runtime** | Use one of the following runtimes:
cpu
gpu
dsp
|
| **Input source** | Use one of the following input sources:
camera–Primary (0) or secondary (1).
file-path–The directory path to the video file.
rtsp-ip-port–The address of the RTSP stream: rtsp://<ip>:<port>/<stream>
|
## Related information
[Object detection](https://docs.qualcomm.com/doc/80-70022-50/topic/gst-ai-object-detection.html)
**Parent Topic:** [Run AI/ML sample applications](https://docs.qualcomm.com/doc/80-70022-50/topic/ai-ml-sample-applications.html)
Last Published: Feb 20, 2026
[Previous Topic
Audio classification](https://docs.qualcomm.com/bundle/publicresource/80-70022-50/topics/audio-classification.md) [Next Topic
AI event encoder](https://docs.qualcomm.com/bundle/publicresource/80-70022-50/topics/gst-ai-event-encoder.md)