# Multi format encode/decode
Source: [https://docs.qualcomm.com/doc/80-70014-50/topic/gst-videocodec-concurrent-playback.html](https://docs.qualcomm.com/doc/80-70014-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 figure, the sample application uses H.264 and H.265 videos, both
encapsulated in MP4 containers. The pipeline involves multiple elements for concurrent
video playback. For more information on these elements, see [Pipeline flow](https://docs.qualcomm.com/doc/80-70014-50/topic/gst-videocodec-concurrent-playback.html#gst-concurrent-videoplayback__section_w2j_yvf_4bc).
Figure : gst-videocodec-concurrent-playback pipeline

This video shows how to decode and play multiple AVC-coded MP4 videos concurrently, and
effectively use composition for creating dynamic video wall displays.
## Prerequisites
- Enable SSH in Permissive mode to securely access your host device. For
instructions, see [How to SSH?](https://docs.qualcomm.com/bundle/publicresource/topics/80-70014-254/how_to.html#how-to-ssh-)
- Use the following command to enter the SSH shell and execute the use
cases:
ssh root@Copy to clipboard
- Run the following command to enable the Permissive
mode:
setenforce 0Copy to clipboard
- Run the following command to enable the
display:
export XDG_RUNTIME_DIR=/dev/socket/weston && export WAYLAND_DISPLAY=wayland-1Copy to clipboard
- Run the following command to push the files from host
machine:
scp root@:/opt/Copy to clipboard
## Use cases
The table lists the use cases that supported through the
gst-videocodec-concurrent-playback application:| Use case | Description |
| --- | --- |
| Video conferencing |
Simultaneously decodes the video streams of multiple participants.
This is beneficial in a multi-party video conference scenario where the application manages multiple video streams.
|
| Surveillance systems | Concurrently decodes video feeds from two separate cameras, each employing a different encoding method. |
To execute the use cases, do the following:
1. Load the video files onto the device.
2. Use the following syntax command to run the use
case:
gst-videocodec-concurrent-playback -i /opt/.mp4 -i /opt/.mp4 -o /opt/.yuvCopy to clipboard
The 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. The H.264 input file should be specified first. |
| `-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 /opt/.mp4 -i /opt/.mp4 -o /opt/.yuvCopy to clipboard
To
stop the use case, press CTRL +
C.
Note: To avoid a large YUV data dump on the device, run this use
case for short durations.
## 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,
you can select `YUV420planarNV12` format, and use
`1920 & 1088` as stride and scan
lines.
Note: If there no default YUV player
available on the host, you can use [https://sourceforge.net/projects/raw-yuvplayer/](https://sourceforge.net/projects/raw-yuvplayer/).
## Pipeline flow
The table lists the plugins used to execute 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-70014-50/topic/v4l2h264dec.html) | Decodes the H.264 video stream using Video4Linux. |
| [v4l2h265dec](https://docs.qualcomm.com/doc/80-70014-50/topic/v4l2h265dec.html) | Decodes the H.265 video stream using Video4Linux. |
| [Waylandsink](https://docs.qualcomm.com/doc/80-70014-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:** [Sample applications for video and audio](https://docs.qualcomm.com/doc/80-70014-50/topic/audio-sample-applications.html)
Last Published: Oct 27, 2025
[Previous Topic
Video wall](https://docs.qualcomm.com/bundle/publicresource/80-70014-50/topics/gst-concurrent-videoplay-composition.md) [Next Topic
Audio-video playback](https://docs.qualcomm.com/bundle/publicresource/80-70014-50/topics/gst-audio-video-playback.md)