# Multi format decode
Source: [https://docs.qualcomm.com/doc/80-70020-50/topic/gst-videocodec-concurrent-playback.html](https://docs.qualcomm.com/doc/80-70020-50/topic/gst-videocodec-concurrent-playback.html)
The **gst-videocodec-concurrent-playback** application supports concurrent video
playback for AVC (H.264) and HEVC (H.265) videos. It demonstrates the concurrent decoding
capabilities of the Qualcomm Linux video engine, which can process different video codecs
simultaneously.
As shown in the following figure, the sample application uses H.264 and H.265 videos,
both encapsulated in MP4 containers. The pipeline involves several elements for
concurrent video playback. For more information about these elements, see [Pipeline flow](https://docs.qualcomm.com/doc/80-70020-50/topic/gst-videocodec-concurrent-playback.html#gst-concurrent-videoplayback__section_w2j_yvf_4bc).
Figure : gst-videocodec-concurrent-playback 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 are supported through the
gst-videocodec-concurrent-playback application:| Use case | Description |
| --- | --- |
| 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, each employing a different encoding method. |
To run the use cases, do the following:
1. Ensure that you input `MP4 AVC (H.264)` and `HEVC
(H.265)` video files on the target device.
2. In the terminal of the target device, use the following command to run the use
case:
gst-videocodec-concurrent-playback -i /etc/media/.mp4 -i /etc/media/.mp4 -o /etc/media/.yuvCopy to clipboard
The following table provides a description of the command-line
parameters: | Command-line parameter | Description |
| --- | --- |
| `-i` | Specifies the absolute path to the H.264 and H.265 input video files. Ensure that the H.264 input file is specified before H.265. |
| `-o` | Specifies the absolute path to the H.265 output YUV file. |
For example, for concurrent playback of multi-format videos, use the
following
command:
gst-videocodec-concurrent-playback -i /etc/media/.mp4 -i /etc/media/.mp4 -o /etc/media/.yuvCopy 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-videocodec-concurrent-playback --helpCopy to clipboard
Note: Due to the large size of YUV data, it's recommended to run
this use case for a short duration (less than 5 seconds) to avoid exhausting the
storage space.
## Expected output
- The H.264 video is displayed to the Wayland display.
- The H.265 HEVC video is written to the YUV file.
To play the YUV file, do the
following:
1. Pull the YUV dump file from the device.
2. Use a YUV player running on the host to play the video.
For example,
select the `YUV420planarNV12` format, and use
`1920 & 1088` as the stride and scan
lines.
Note: If a default YUV player isn't
available on the host computer, use [https://sourceforge.net/projects/raw-yuvplayer/](https://sourceforge.net/projects/raw-yuvplayer/).
## Pipeline flow
The following table lists the plugins used to run the multi format
encode/decode pipeline:| Plugin | Description |
| --- | --- |
| filesrc | Reads the video data. |
| qtdemux | Demultiplexes the video data. |
| h264parse | Parses the H.264 video stream. |
| h265parse | Parses the H.265 video stream. |
| [v4l2h264dec](https://docs.qualcomm.com/doc/80-70020-50/topic/v4l2h264dec.html) | Decodes the H.264 video stream using Video4Linux. |
| [v4l2h265dec](https://docs.qualcomm.com/doc/80-70020-50/topic/v4l2h265dec.html) | Decodes the H.265 video stream using Video4Linux. |
| [Waylandsink](https://docs.qualcomm.com/doc/80-70020-50/topic/waylandsink.html) | Displays the H.264 video stream on Wayland display. |
| filesink | Writes the H.265 video to a YUV file for playback. |
**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
Smart codec](https://docs.qualcomm.com/bundle/publicresource/80-70020-50/topics/smart-codec.md) [Next Topic
Audio-video playback](https://docs.qualcomm.com/bundle/publicresource/80-70020-50/topics/gst-audio-video-playback.md)