Skip to main content
This section covers Python-based multimedia sample applications that demonstrate camera streaming, video playback, and transformation on Qualcomm platforms.

Config 1: Supported Camera Slots by Platform

Connect the IMX577 MIPI camera sensor to the CAM3 slot of the RB3 device.

Prerequisites

See the Prerequisites section in the Python AI page for device setup, Wi-Fi, artifact download, and enabling qticamsrc and libcamera.

Multimedia Applications

Camera encoding

The gst-camera-encode.py application allows you to record and encode a single camera stream. For information about the plugins used in this pipeline, see Pipeline flow. camera encode pipeline Application: gst-camera-encode.py
1

Complete prerequisites

Ensure that you complete the Prerequisites.
2

Run the application

To display all available options:
3

Pull output from device

Expected output

The output is saved in a file at /etc/media/recording.mp4.

Pipeline flow


Camera Streaming using OpenCV

The gst-camera-opencv-resize.py application uses OpenCV APIs to capture a camera frame from a live camera stream and apply color conversion or resize. The output is displayed on the screen. For information about the plugins used in this pipeline, see Pipeline flow. camera resize pipeline Application: gst-camera-opencv-resize.py
1

Complete prerequisites

Ensure that you complete the Prerequisites.
2

Run the application

To display all available options:

Expected output

The stream is displayed on the screen.Camera Resize Output

Troubleshoot GTK backend failure in root mode

When running a GTK-based application as root, GTK may fail to initialize the backend. Export the active display session before running:

Pipeline flow


Concurrent video playback (video wall) using Python

The gst-concurrent-videoplay-composition.py application supports concurrent video playback for MP4 AVC (H.264) videos and performs composition on a video wall display. For information about the plugins used in this pipeline, see Pipeline flow. concurrent playback pipeline Application: gst-concurrent-videoplay-composition.py
1

Complete prerequisites

Ensure that you complete the Prerequisites.
2

Run the application

To change the number of sessions, update -c with 2, 4, 8, or 16.To display all available options:

Expected output

The individual composed streams are tiled together to display as a unified stream.Concurrent Playback Output

Pipeline flow


Video transformation using OpenCV

The gst-opencv-transform.py application captures and transforms a video frame then displays the video on the screen using the OpenCV VideoCapture() function. For information about the plugins used in this pipeline, see Pipeline flow. camera transform pipeline Application: gst-opencv-transform.py
1

Complete prerequisites

Ensure that you complete the Prerequisites.
2

Run the application

To display all available options:

Expected output

The stream is displayed on the screen.Camera Transform Output

Pipeline flow


Multi-camera streaming using Python

The gst-multi-camera-stream-example.py application streams from two camera sensors simultaneously, composing the feeds side by side or encoding to files. For information about the plugins used in this pipeline, see Pipeline flow. multi camera streaming pipeline Application: gst-multi-camera-stream-example.py
This application isn’t supported in the Config #1 of the QLI 2.0 RC3 release.
1

Complete prerequisites

Ensure that you complete the Prerequisites.
2

Run the application

  • Preview on display:
  • Encode to file:
To display all available options:

Expected output

For the video composition pipeline, the output is displayed as a preview.Multi Camera Streaming Output

Pipeline flow


Decode JPEG images using Python

The gst-jpg-image-decode.py application decodes JPEG images and displays them on a screen. For information about the plugins used in this pipeline, see Pipeline flow. jpeg decode pipeline Application: gst-jpg-image-decode.py
1

Complete prerequisites

Ensure that you complete the Prerequisites.
2

Run the application

To display all available options:

Expected output

The decoded images are displayed on the screen.JPEG Decode Output

Pipeline flow


Transform and encode a camera stream

The gst-camera-rotate-downscale-file.py application rotates, downscales, and encodes a camera stream, saving the result to a file. For information about the plugins used in this pipeline, see Pipeline flow. camera transform encode pipeline Application: gst-camera-rotate-downscale-file.py
1

Complete prerequisites

Ensure that you complete the Prerequisites.
2

Run the application

To display all available options:

Expected output

The output is saved to a file at /etc/media/test.mp4.

Pipeline flow


Troubleshooting

Download the model manually from IoT — Qualcomm AI Hub and push it to the device:
Remount the file system with read/write permissions:For Qualcomm Linux:
For Ubuntu Server: