Skip to main content
Qualcomm ® Linux ® has various sample applications. Each application is suited for different use cases such as retail, Qualcomm ® Edge AI Box Solutions, and IP camera. The sample applications can be categorized as follows:
  • Multimedia sample applications, which show camera, video, and audio functionalities.
  • AI sample applications, which show AI and machine learning (ML) capabilities.

Prerequisites

Before you begin, set up the IQ-9075 device. To use a camera, enable camx on the device by running the following commands on the target device:

Run multimedia sample applications

The multimedia sample applications show use cases for camera, display, and video streams on the Dragonwing EVK.

Multicamera streaming or encoding (Dash cam)

Description: The gst-multi-camera-example application allows you to stream from two camera sensors simultaneously. The application composes the camera feeds side by side to display on a screen or encodes and stores the video streams to files. A few use cases that need many camera inputs are dash camera or stereo camera. You can use this application as a reference and build your use case. For example, a security system where the goal is to capture a video from several cameras. You can either view it or archive it for a future review. The following figure shows the pipeline for several camera streams. For more information about the elements used in this pipeline, see pipeline flow. Multi camera pipeline Figure: gst-multi-camera-stream-example pipeline Application: gst-multi-camera-example

Run the application

Note: In the following commands, provide the necessary parameters, such as width, height, and output type. The width and height changes are applicable to the primary camera only.
1

Complete prerequisites

Ensure that you complete the Prerequisites.
2

In the terminal of the target device, select any of the following use cases and run the respective command:

Waylandsink use case: View the Waylandsink output:
Encoder use case: View the encoder output:
3

To Stop the running use case

Press Ctrl + C.
4

In the terminal of the target device, run the following command to display the available help options:

5

In the terminal of the host computer, run the following command to pull the files from the target device:

Expected Output

The output is displayed on the screen and saved to a file.
  • If the output type is display, you can preview the stream on the display.
  • If the output type is video encoding, then the encoded files are saved at /etc/media/cam1_vid.mp4 and /etc/media/cam2_vid.mp4 for camera 1 and camera 2 respectively.
Camera Preview OutputFigure: Expected output for gst-multi-camera-example application–preview

Pipeline flow

The following table lists the plugins used in the multi camera streaming pipeline:
PipelineDescription
Preview on display
  1. qticamsrc captures video from both camera0 and camera1.
  2. Capsfilter is applied to enforce constraints on the raw video data.
  3. qtivcomposer composites the video streams and sends the composited video data to Wayland display sink.
  4. waylandsink shows the live preview.
Encoder dump on the device
  1. qticamsrc captures video from both camera0 and camera1.
  2. Capsfilter is applied to enforce constraints on the raw video data.
  3. v4l2h264enc is used to encode the video using the H.264 format.
  4. H264parse is used to parse the video.
  5. Mp4mux is used to multiplex the video into an MP4 container.
  6. Filesink is used to write the video to a file.

Multichannel video decode and compose (Video wall)

Description: The gst-concurrent-videoplay-composition application supports concurrent video playback for MP4 AVC (H.264) videos and performs composition on a video wall display. In the concurrent video playback and composition pipeline, four decode and composition pipelines run concurrently. For more information about the plugins used in this pipeline, see Pipeline flow. Single camera pipeline Figure: gst-concurrent-videoplay-composition pipeline with four streams Application: gst-concurrent-videoplay-composition

Run the application

The following table lists the use cases that are supported through the gst-concurrent-videoplay-composition application:
Use caseDescription
Video conferencing
  • Simultaneously decodes the video streams of several participants.
  • Useful in a multi-party video conference scenario where the application manages several video streams.
Surveillance systems
  • Concurrently decodes video feeds from two separate cameras.
Digital signage
  • Allows simultaneous changes or updates to centrally managed information that is electronically displayed across several locations.
To run the use cases, do the following:
1

Complete prerequisites

Ensure that you complete the Prerequisites.
2

Prepare input video files

Add at least one MP4 AVC (H.264) video file on the target device.
3

Run the use case

In the terminal of the target device, run:
Command-line parametersExamples
  • Concurrent playback of two sessions
  • Concurrent playback of four sessions
4

Stop the running use case

Press Ctrl + C.
5

In the terminal of the target device, run the following command to display the available help options:

Expected output

The individual composed streams are tiled together to display as a unified stream.Video wall OutputFigure: Expected output for gst-concurrent-videoplay-composition application

Pipeline flow

The following table lists the plugins used to run the video wall pipeline:
PluginDescription
filesrc
    Reads the video data.
qtdemux
    Demultiplexes the video data.
h264parse
    Parses the H.264 video streams.
v4l2h264dec
    Decodes the H.264 video streams.
qtivcomposer
    Composes the decoded streams and sends them over the display.
waylandsink
    Displays the composed video streams on Wayland display.

Run AI sample applications

AI sample applications show use cases for object detection, multistream inference, and parallel inferencing on input streams from a camera, video file, or Real-Time Streaming Protocol (RTSP) stream on the Dragonwing EVK.

Download and transfer AI models and labels

To run AI sample applications, download the required models and labels using one of the following methods:
  • Download the AI models from Qualcomm® AI Hub and labels from GitHub
  • Download the AI models and labels using the download_artifacts.sh script On the target device, obtain the download_artifacts.sh script, set executable permissions, and run it to download the model, media, and label files:
To run object detection, parallel inferencing, and multistream inferencing AI use cases, the application uses the following AI models:

AI object detection

Description: The gst-ai-object-detection application allows you to detect objects within images and videos. The use cases show the execution of YOLOv5, YOLOv8 and YOLOX on Qualcomm AI HW accelerator. The following figure shows the pipeline, which receives the input from a live camera feed, file, USB source, or an RTSP stream, preprocesses it, runs inferences on AI hardware. The results are either displayed on the screen, saved as an encoded MP4 file, or streamed over the RTSP server. For information about the plugins used in the pipeline flow, see Pipeline flow Pipeline Diagram Application: gst-ai-object-detection
When the software image includes the qticamsrc plugin, the camera framework uses it by default. If absent, the framework switches to libcamera instead. Since Config #1 lacks support for qticamsrc, the system defaults to libcamera.

Input and Output Capabilities

Sample Model and Label Files

Run the application on the target device

1

Download artifacts

Ensure that you download all the required artifacts to the target device.
2

Run the application

The sample application uses the /etc/configs/config_detection.json file to read the input parameters.To display all available options:
To stop the use case, press CTRL + C.

Configurations

The gst-ai-object-detection application uses the /etc/configs/config_detection.json file. Update its properties to match your model, input stream, and output. See Config JSON Field Description for all fields.
For USB camera input, set the video-format, resolution, and framerate parameters in the config file to match the camera capabilities, see Configure USB camera.
The snpe-tensors field applies only to the SNPE runtime. To retrieve the output tensor names for a DLC model, open the model in Netron.
When using DLC models from the AI Hub, the snpe-tensors field is optional.
Camera source, LiteRT model, DSP runtime

Expected Output

Detected objects with bounding boxes and labels are overlaid on the video and displayed on the local display.Output Diagram

Pipeline Flow

The following table lists the plugins used in the object detection pipeline:

Config JSON Field Description

Parallel AI inference

Description: The gst-ai-parallel-inference application allows you to perform object detection, object classification, pose detection, and image segmentation on an input stream from different sources such as a camera, a file, or an RTSP network. The use cases implement the LiteRT models for object detection, image segmentation, classification, and pose detection. The following figure shows the pipeline, which receives input streams from a camera, file, or an RTSP stream, performs the parallel inferencing for the four use cases, and displays the results side by side on the screen.
This application isn’t supported in Config #1 for the QLI 2.0 release because CPU runtime is not supported.
For information about the plugins used in this pipeline, see Pipeline flow. Pipeline Diagram Application: gst-ai-parallel-inference

Input and Output Capabilities

Sample Model and Label Files

Run the application on the target device

1

Download artifacts

Ensure that you download all the required artifacts to the target device.
2

Run the application

The sample application uses the /etc/configs/config-parallel-inference.json file to read the input parameters.To display all available options:
To stop the use case, press CTRL + C.

Configurations

The gst-ai-parallel-inference application uses the /etc/configs/config-parallel-inference.json file. Update its properties to match your model, input stream, and output. See Config JSON Field Description for all fields.
For QCS6490, if file-path and rtsp-ip-port are not present in the configuration file, then the camera input is selected.
File source, LiteRT model, DSP runtime

Expected Output

After performing the four parallel inferences, the results are displayed side by side on the screen.Pipeline Diagram

Pipeline Flow

The following table lists the plugins used in the metadata parser pipeline:

Config JSON Field Description

Multistream inference

Description: The gst-ai-multistream-inference application shows AI inference (object detection and classification) on up to 32 input streams coming from camera, file, or RTSP stream. The following figure shows the pipeline, which receives several input streams, preprocesses them, runs AI inferences, combines the streams, and merges them all into a single video output. The maximum number of input streams supported on each SoC as verified on 1080P and 720P are follows:
  • QCS6490–8
  • Dragonwing IQ-8275–16
  • Dragonwing IQ-9075–32
    This application isn’t supported in Config #1 for the QLI 2.0 release because CPU runtime is not supported.
    The output is displayed on an HDMI display, saved as an H.264 encoded MP4 file, or converted into an RTSP stream.
For information about the plugins used in this pipeline, see Pipeline flow. Pipeline Diagram Application: gst-ai-multistream-inference

Input and Output Capabilities

Sample Model and Label Files

Run the application on the target device

1

Download artifacts

Ensure that you complete the Prerequisites. This downloads all required artifacts to the target device.
2

Run the application

The sample application uses the /etc/configs/config-multistream-inference.json file to read the input parameters.To display all available options:
To stop the use case, press CTRL + C.

Configurations

The gst-ai-multistream-inference application uses the /etc/configs/config-multistream-inference.json file. Update its properties to match your model, input stream, and output. See Config JSON Field Description for all fields.
If a drop in performance is observed, you can use YOLOv8 LiteRT model. For YOLOv8 export instructions, see Prerequisites.
Object Detection on 8 H.264 file inputs, LiteRT model, DSP runtime

Expected Output

Pipeline Diagram

Pipeline Flow

The following table lists the plugins used in the metadata parser pipeline:

Config JSON Field Description