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.gst-camera-encode.py
Try me
Try me
Complete prerequisites
Ensure that you complete the Prerequisites.
Expected output
The output is saved in a file at/etc/media/recording.mp4.Pipeline flow
| Plugin | Description |
|---|---|
qticamsrc | Captures the camera live stream. Capsfilter enforces constraints on raw video data. |
v4l2h264enc | Encodes the video using H.264 format. |
h264parse | Parses the encoded video. |
mp4mux | Multiplexes the video into an MP4 container. |
filesink | Writes the video to a file. |
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.gst-camera-opencv-resize.py
Try me
Try me
Complete prerequisites
Ensure that you complete the Prerequisites.
Expected output
The stream is displayed on the screen.
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
| Plugin | Description |
|---|---|
qticamsrc | Captures the video stream and feeds it into the capsfilter. |
capsfilter | Enforces constraints on the raw video data. |
queue | Buffers video data. |
qtivtransform | Transforms the video data. |
waylandsink | Displays the video stream on the Wayland display. |
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.gst-concurrent-videoplay-composition.py
Try me
Try me
Complete prerequisites
Ensure that you complete the Prerequisites.
Expected output
The individual composed streams are tiled together to display as a unified stream.
Pipeline flow
| Plugin | Description |
|---|---|
filesrc | Reads the video data. |
qtdemux | Demultiplexes the video data. |
h264parse | Parses H.264 video streams. |
v4l2h264dec | Decodes H.264 video streams. |
qtivcomposer | Composes decoded streams and sends to display. |
waylandsink | Displays the video stream on the Wayland display. |
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 OpenCVVideoCapture() function.
For information about the plugins used in this pipeline, see Pipeline flow.
gst-opencv-transform.py
Try me
Try me
Complete prerequisites
Ensure that you complete the Prerequisites.
Expected output
The stream is displayed on the screen.
Pipeline flow
| Plugin | Description |
|---|---|
filesrc | Reads the video data. |
qtdemux | Demultiplexes the video data. |
h264parse | Parses H.264 video streams. |
v4l2h264dec | Decodes H.264 video streams. |
qtivtransform | Transforms the video data. |
videoconvert | Converts video frames from one format to another. |
capsfilter | Enforces constraints on the video data. |
waylandsink | Displays the video stream on the Wayland display. |
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.gst-multi-camera-stream-example.py
This application isn’t supported in the Config #1 of the QLI 2.0 RC3 release.
Try me
Try me
Complete prerequisites
Ensure that you complete the Prerequisites.
Expected output
For the video composition pipeline, the output is displayed as a preview.
Pipeline flow
| Pipeline | Description |
|---|---|
| Preview on display | qticamsrc (cam0 + cam1) → capsfilter → qtivcomposer → waylandsink |
| Encoder dump | qticamsrc (cam0 + cam1) → capsfilter → v4l2h264enc → h264parse → mp4mux → filesink |
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.gst-jpg-image-decode.py
Try me
Try me
Complete prerequisites
Ensure that you complete the Prerequisites.
Expected output
The decoded images are displayed on the screen.
Pipeline flow
| Plugin | Description |
|---|---|
multifilesrc | Reads video data from sequentially named files. |
capsfilter | Enforces constraints on the video data. |
jpegdec | Decodes the JPEG video stream. |
videoconvert | Converts video frames from one format to another. |
waylandsink | Displays the video stream on the Wayland display. |
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.gst-camera-rotate-downscale-file.py
Try me
Try me
Complete prerequisites
Ensure that you complete the Prerequisites.
Expected output
The output is saved to a file at/etc/media/test.mp4.Pipeline flow
| Plugin | Description |
|---|---|
qticamsrc | Captures the video stream. |
qtivtransform | Rotates and downscales the video stream. |
v4l2h264enc | Encodes H.264 video. |
h264parse | Parses the encoded H.264 video stream. |
mp4mux | Multiplexes the stream into an MP4 container. |
filesink | Writes the video data to a file. |
Troubleshooting
Model not available after running the download script?
Model not available after running the download script?
Download the model manually from IoT — Qualcomm AI Hub and push it to the device:
Running sample applications from the UART shell
Running sample applications from the UART shell
Remount the file system with read/write permissions:For Qualcomm Linux:For Ubuntu Server:
Cannot locate the qticamsrc plugin?
Cannot locate the qticamsrc plugin?
GStreamer logging and debugging
GStreamer logging and debugging
