# Video composition
Source: [https://docs.qualcomm.com/doc/80-70020-50/topic/gst-weston-composition-example.html](https://docs.qualcomm.com/doc/80-70020-50/topic/gst-weston-composition-example.html)
The **gst-weston-composition-example** application allows you to arrange live
camera input or offline files on the screen using the picture-in-picture (PiP) or side by
side display formats. A few use cases of this application are video conferencing and online
educational courses.
The `gst-weston-composition-example` application involves several
pipelines and elements. For more information, see [Pipeline flow](https://docs.qualcomm.com/doc/80-70020-50/topic/gst-weston-composition-example.html#gst-weston-composition-example__section_wng_xcv_4bc).
Figure : gst-weston-composition-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
The following table lists the use cases that supported through the
gst-weston-composition-example application:| Use case | Description |
| --- | --- |
| Video conferencing |
Simultaneously displays several video streams from many participants.
Videos are displayed in either PiP or side by side format.
Useful in a multi-party video conference scenario where the application manages several video streams.
|
| Online education | Enhances the learning experience by enabling the PiP or side by side display of the instructional video |
For PiP and side by side display formats, you can use [qtivcomposer](https://docs.qualcomm.com/doc/80-70020-50/topic/qtivcomposer.html) plugin. Do the following to run the use case with either of the plugins:
1. Ensure that you input a `.mp4` video file on the
target device.
2. In the terminal of the target device, run any of the following use cases:
- Compose
PiP:
gst-weston-composition-example -t 0 -i /etc/media/.mp4Copy to clipboard
Compose
side by
side:
gst-weston-composition-example -t 1 -i /etc/media/.mp4Copy to clipboard
3. To stop the use case, use CTRL +
C.
4. In the terminal of the target device, run the following command in the SSH shell
to display the available help
options:
gst-weston-composition-example --helpCopy to clipboard
The following table provides a description of the command-line
parameters:| Command-line parameter | Description |
| --- | --- |
| `-t` | Specifies the type of composition:
0 = Picture-in-picture
1 = Side by side
|
| `-i` | Specifies the absolute path to the input video file. |
## Expected output
The video is rendered as PiP and side by side display on the screen.
Figure : Expected output for gst-weston-composition-example application

## Pipeline flow
The following table lists the plugins used to run the video composition
pipeline:| Plugin | Description |
| --- | --- |
| [qtiqmmfsrc](https://docs.qualcomm.com/doc/80-70020-50/topic/qtiqmmfsrc.html) | Captures the video from a source. |
| capsfilter | Filters the video file. |
| filesrc | Reads the video data. |
| qtdemux | Demultiplexes the video data. |
| h264parse | Parses the H.264 video. |
| [v4l2h264dec](https://docs.qualcomm.com/doc/80-70020-50/topic/v4l2h264dec.html) | Decodes H.264 video from a file. |
| [qtivcomposer](https://docs.qualcomm.com/doc/80-70020-50/topic/qtivcomposer.html) | Composes the decoded video. |
| [Waylandsink](https://docs.qualcomm.com/doc/80-70020-50/topic/waylandsink.html) | Composes and renders the video on the Wayland display. |
## Related information
[Video composition use cases](https://docs.qualcomm.com/doc/80-70020-50/topic/video-composition.html)
**Parent Topic:** [Run sample applications for video and audio](https://docs.qualcomm.com/doc/80-70020-50/topic/audio-sample-applications.html)
Last Published: Jan 30, 2026
[Previous Topic
Video transformation](https://docs.qualcomm.com/bundle/publicresource/80-70020-50/topics/gst-transform-example.md) [Next Topic
Python applications](https://docs.qualcomm.com/bundle/publicresource/80-70020-50/topics/python-sample-applications.md)