# Multi-camera streaming
Source: [https://docs.qualcomm.com/doc/80-70020-50/topic/gst-multi-camera-stream-example.html](https://docs.qualcomm.com/doc/80-70020-50/topic/gst-multi-camera-stream-example.html)
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](https://docs.qualcomm.com/doc/80-70020-50/topic/gst-multi-camera-stream-example.html#gst-multi-camera-stream-example__section_jrn_bps_nbc).
Figure : gst-multi-camera-example pipeline
## Prerequisites
- [Get started with the Qualcomm IM SDK](https://docs.qualcomm.com/bundle/publicresource/topics/80-70020-51/install-sdk.html)
for your Qualcomm Linux 1.5 or Ubuntu Server.
- Activate SSH on your Qualcomm Linux or Ubuntu to sign in with SSH and connect to
the target device. For instructions see:
- [Sign in using SSH](https://docs.qualcomm.com/bundle/publicresource/topics/80-70020-254/how_to.html#use-ssh) for Qualcomm
Linux
- [Sign in using SSH](https://docs.qualcomm.com/bundle/publicresource/topics/80-90441-1/Use_Ubuntu_on_RB3_Gen2_3.html#sign-in-to-the-rb3-gen-2-console-using-ssh) for Ubuntu
Server
Note: If SSH is already set up and Wi-Fi is
connected, skip this step.
- Use the HDMI port to connect the display to the device. For instructions, see
[Set up HDMI display](https://docs.qualcomm.com/bundle/publicresource/topics/80-70020-18/samples.html).
- Sign in to the target device using SSH.
- In the terminal of the target device, run the following commands from the SSH
shell of the target device to activate the display on the host computer:
- For
Linux:
export XDG_RUNTIME_DIR=/dev/socket/weston && export WAYLAND_DISPLAY=wayland-1Copy to clipboard
- For Ubuntu Server:
export XDG_RUNTIME_DIR=/run/user/$(id -u ubuntu)/ && export WAYLAND_DISPLAY=wayland-1 Copy to clipboard
- Connect the speaker to activate the audio on the target device. For
instructions, see [Set up audio hardware](https://docs.qualcomm.com/bundle/publicresource/topics/80-70020-16/enable-audio.html).
If you face
issues in recording the audio, run the following command in the terminal of
the target
device:
pactl set-default-source pal_source_speaker_micCopy to clipboard
- If you face issues with the camera or display, see [Camera troubleshooting](https://docs.qualcomm.com/bundle/publicresource/topics/80-70020-17/troubleshooting.html) and [Display troubleshooting](https://docs.qualcomm.com/bundle/publicresource/topics/80-70020-18/debug.html).
## 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. 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:
gst-multi-camera-example -o 0 -w 1920 -h 1080Copy to clipboard
- **Encoder use case:** View the encoder
output:
gst-multi-camera-example -o 1 -w 1920 -h 1080Copy to clipboard
2. To stop the use case, use CTRL +
C.
3. In the terminal of the target device, run the following command in the SSH shell
to display the available help
options:
gst-multi-camera-example --helpCopy to clipboard
4. In the terminal of the host computer, run the following command to pull the
files from the target
device:
scp root@:/etc/media/Copy to clipboard
## 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.
Figure : Expected output for gst-multi-camera-example application–Preview

## Pipeline flow
The following table lists the plugins used in the multiple camera streaming
pipeline:| Pipeline | Description |
| --- | --- |
| Preview on display |
qtiqmmfsrc captures video from both camera0 and camera1.
Capsfilter is applied to enforce constraints on the raw video data.
qtivcomposer composites the video streams and sends the composited video data to Wayland display sink.
qtiqmmfsrc captures video from both camera0 and camera1.
Capsfilter is applied to enforce constraints on the raw video data.
v4l2h264enc is used to encode the video using the H.264 format.
H264parse is used to parse the video.
Mp4mux is used to multiplex the video into an MP4 container.
Filesink is used to write the video to a file.
|
## Related information
- [Multi-camera streaming using Python](https://docs.qualcomm.com/doc/80-70020-50/topic/multi-camera-streaming-python-sample-app.html)
- [Multi-camera/Multi-client use cases](https://docs.qualcomm.com/doc/80-70020-50/topic/multi-camera-multi-client-use-cases.html)
**Parent Topic:** [Run sample applications for a camera](https://docs.qualcomm.com/doc/80-70020-50/topic/camera-sample-applications.html)
Last Published: Jan 30, 2026
[Previous Topic
USB camera](https://docs.qualcomm.com/bundle/publicresource/80-70020-50/topics/usb-camera.md) [Next Topic
Multistream](https://docs.qualcomm.com/bundle/publicresource/80-70020-50/topics/gst-multi-stream-example.md)