# Multi format decode

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-70029-50/topic/gst-videocodec-concurrent-playback.html#section-w2j-yvf-4bc).

<?xml version="1.0" encoding="UTF-8"?>
<svg id="Layer_1" data-name="Layer 1" xmlns="http://www.w3.org/2000/svg" width="999.999999999998181" height="279.999999999999091" viewbox="0 0 999.999999999998181 279.999999999999091" aria-label="../../_images/gst_videocodec_concurrent_playback.svg">
  <g>
    <rect x=".50018310546875" y=".499877929686591" width="998.99951171875" height="279.00048828125" rx="7.5" ry="7.5" style="fill: #fafafa;"></rect>
    <path d="M991.999999999998181,1c3.85986328125,0,7,3.14013671875,7,7v263.999999999999091c0,3.85986328125-3.14013671875,7-7,7H8c-3.859874725341797,0-7-3.14013671875-7-7V8c0-3.85986328125,3.140125274658203-7,7-7h983.999999999998181M991.999999999998181,0H8C3.581750869750977,0,0,3.581756591795966,0,8v263.999999999999091c0,4.41827392578125,3.581750869750977,8,8,8h983.999999999998181c4.41827392578125,0,8-3.58172607421875,8-8V8c0-4.418243408204034-3.58172607421875-8-8-8h0Z" style="fill: #d2d7e1;"></path>
  </g>
  <g>
    <rect x="83.219721891557128" y="27.560278278900114" width="151.365694494367744" height="192.277852996485308" rx="3.99999951609243" ry="3.99999951609243" style="fill: none; stroke: #7c8aa3; stroke-miterlimit: 10;"></rect>
    <rect x="98.902569138740546" y="57.473152610285979" width="120" height="59.999992741378264" rx="4" ry="4" style="fill: #007884;"></rect>
    <text transform="translate(120.750099182128906 92.068563579115107)" style="fill: #fff; font-family: Roboto-Regular, Roboto; font-size: 16px;"><tspan x="0" y="0">Video data</tspan></text>
    <text transform="translate(136.984474182128906 50.275473712476924)" style="font-family: Roboto-Regular, Roboto; font-size: 16px;"><tspan x="0" y="0">filesrc</tspan></text>
    <rect x="423.000400167799853" y="27.560278278900114" width="151.365694494364107" height="192.277852996485308" rx="3.99999951609243" ry="3.99999951609243" style="fill: none; stroke: #7c8aa3; stroke-miterlimit: 10;"></rect>
    <text transform="translate(460.890167236328125 50.275473712476924)" style="font-family: Roboto-Regular, Roboto; font-size: 16px;"><tspan x="0" y="0">h264parse</tspan></text>
    <text transform="translate(23.881046295166016 163.749845622572138)" style="font-family: Roboto-Regular, Roboto; font-size: 16px;"><tspan x="0" y="0">MP4</tspan></text>
    <rect x="438.683247414982361" y="57.473152610285979" width="119.999999999999091" height="59.999992741378264" rx="3.999999999999996" ry="3.999999999999996" style="fill: #007884;"></rect>
    <text transform="translate(478.214385986328125 92.068563579115107)" style="fill: #fff; font-family: Roboto-Regular, Roboto; font-size: 16px;"><tspan x="0" y="0">Parse</tspan></text>
    <rect x="98.902569138740546" y="145.490534849873256" width="120" height="59.999992741380993" rx="3.99999951609243" ry="3.99999951609243" style="fill: #007884;"></rect>
    <text transform="translate(120.750099182128906 180.085966228040888)" style="fill: #fff; font-family: Roboto-Regular, Roboto; font-size: 16px;"><tspan x="0" y="0">Video data</tspan></text>
    <rect x="438.683247414982361" y="145.490534849873256" width="119.999999999999091" height="59.999992741380993" rx="3.99999951609243" ry="3.99999951609243" style="fill: #007884;"></rect>
    <text transform="translate(478.214385986328125 180.085966228040888)" style="fill: #fff; font-family: Roboto-Regular, Roboto; font-size: 16px;"><tspan x="0" y="0">Parse</tspan></text>
    <text transform="translate(935.571044921875 213.796796916517451)" style="font-family: Roboto-Regular, Roboto; font-size: 16px;"><tspan x="0" y="0">file</tspan></text>
    <text transform="translate(924.41973876953125 125.553876994642451)" style="font-family: Roboto-Regular, Roboto; font-size: 16px;"><tspan x="0" y="0">Display</tspan></text>
    <rect x="253.110061029677126" y="27.560278278900114" width="151.365694494367744" height="192.277852996485308" rx="3.99999951609243" ry="3.99999951609243" style="fill: none; stroke: #7c8aa3; stroke-miterlimit: 10;"></rect>
    <rect x="268.792908276861453" y="57.473152610285979" width="120" height="59.999992741378264" rx="4" ry="4" style="fill: #007884;"></rect>
    <text transform="translate(286.757614135742188 92.068563579115107)" style="fill: #fff; font-family: Roboto-Regular, Roboto; font-size: 16px;"><tspan x="0" y="0">Demultiplex</tspan></text>
    <text transform="translate(297.495895385742188 50.275473712476924)" style="font-family: Roboto-Regular, Roboto; font-size: 16px;"><tspan x="0" y="0">qtdemux</tspan></text>
    <rect x="268.792908276861453" y="145.490534849873256" width="120" height="59.999992741380993" rx="3.99999951609243" ry="3.99999951609243" style="fill: #007884;"></rect>
    <text transform="translate(286.757614135742188 180.085966228040888)" style="fill: #fff; font-family: Roboto-Regular, Roboto; font-size: 16px;"><tspan x="0" y="0">Demultiplex</tspan></text>
    <rect x="592.908443379343225" y="27.560278278900114" width="151.365694494365016" height="192.277852996485308" rx="3.99999951609243" ry="3.99999951609243" style="fill: none; stroke: #7c8aa3; stroke-miterlimit: 10;"></rect>
    <text transform="translate(622.97015380859375 50.275473712476924)" style="font-family: Roboto-Regular, Roboto; font-size: 16px;"><tspan x="0" y="0">v4l2h264dec</tspan></text>
    <rect x="608.591290626525733" y="57.473152610285979" width="120" height="59.999992741378264" rx="4" ry="4" style="fill: #007884;"></rect>
    <text transform="translate(641.60687255859375 92.068563579115107)" style="fill: #fff; font-family: Roboto-Regular, Roboto; font-size: 16px;"><tspan x="0" y="0">Decode</tspan></text>
    <rect x="608.591290626525733" y="145.490534849873256" width="120" height="59.999992741380993" rx="3.99999951609243" ry="3.99999951609243" style="fill: #007884;"></rect>
    <text transform="translate(641.60687255859375 180.085966228040888)" style="fill: #fff; font-family: Roboto-Regular, Roboto; font-size: 16px;"><tspan x="0" y="0">Decode</tspan></text>
    <text transform="translate(795.33258056640625 50.275473712476924)" style="font-family: Roboto-Regular, Roboto; font-size: 16px;"><tspan x="0" y="0">waylandsink</tspan></text>
    <text transform="translate(813.80133056640625 138.904684184583857)" style="font-family: Roboto-Regular, Roboto; font-size: 16px;"><tspan x="0" y="0">filesink</tspan></text>
    <rect x="779.234947464916331" y="57.473152610285979" width="120" height="59.999992741378264" rx="4" ry="4" style="fill: #007884;"></rect>
    <text transform="translate(813.35601806640625 82.548833964857295)" style="fill: #fff; font-family: Roboto-Regular, Roboto; font-size: 16px;"><tspan x="0" y="0">Display</tspan><tspan x="-7.78125" y="19.2001953125">rendering</tspan></text>
    <rect x="779.234947464916331" y="145.490534849873256" width="120" height="59.999992741380993" rx="3.99999951609243" ry="3.99999951609243" style="fill: #007884;"></rect>
    <text transform="translate(820.63726806640625 180.085966228040888)" style="fill: #fff; font-family: Roboto-Regular, Roboto; font-size: 16px;"><tspan x="0" y="0">Write</tspan></text>
    <rect x="932.298852099316719" y="75.851810269262387" width="35.999999999994543" height="25.200000000000728" rx="4" ry="4" style="fill: none; stroke: #000; stroke-linecap: round; stroke-linejoin: round; stroke-width: 2px;"></rect>
    <line x1="943.098852099312353" y1="108.251810269262933" x2="957.49885209931017" y2="108.251810269262933" style="fill: none; stroke: #000; stroke-linecap: round; stroke-linejoin: round; stroke-width: 2px;"></line>
    <line x1="950.298852099316719" y1="101.051810269263115" x2="950.298852099316719" y2="108.251810269262933" style="fill: none; stroke: #000; stroke-linecap: round; stroke-linejoin: round; stroke-width: 2px;"></line>
    <g>
      <polyline points="99.012230000619638 175.490531220561934 73.888037313795394 175.490531220561934 73.888037313795394 87.473148980975566 99.012230000619638 87.473148980975566" style="fill: none; stroke: #fff; stroke-miterlimit: 10; stroke-width: 3px;"></polyline>
      <g>
        <polyline points="93.271247863769531 175.490539550780341 73.888038635253906 175.490539550780341 73.888038635253906 87.47314453125 93.271247863769531 87.47314453125" style="fill: none; stroke: #000; stroke-miterlimit: 10;"></polyline>
        <polygon points="92.104057312011719 171.501464843749091 99.012229919433594 175.490539550780341 92.104057312011719 179.479583740233466 92.104057312011719 171.501464843749091"></polygon>
        <polygon points="92.104057312011719 91.462219238280341 99.012229919433594 87.47314453125 92.104057312011719 83.484069824217841 92.104057312011719 91.462219238280341"></polygon>
      </g>
    </g>
    <g>
      <line x1="218.902569138740546" y1="87.473148980975566" x2="268.902569138740546" y2="87.473148980975566" style="fill: none; stroke: #fff; stroke-miterlimit: 10; stroke-width: 3px;"></line>
      <g>
        <line x1="218.902572631835938" y1="87.47314453125" x2="263.161590576171875" y2="87.47314453125" style="fill: none; stroke: #000; stroke-miterlimit: 10;"></line>
        <polygon points="261.994384765625 91.462219238280341 268.902557373046875 87.47314453125 261.994384765625 83.484069824217841 261.994384765625 91.462219238280341"></polygon>
      </g>
    </g>
    <g>
      <line x1="388.792908276861453" y1="87.473148980975566" x2="438.792908276861453" y2="87.473148980975566" style="fill: none; stroke: #fff; stroke-miterlimit: 10; stroke-width: 3px;"></line>
      <g>
        <line x1="388.79290771484375" y1="87.47314453125" x2="433.051910400390625" y2="87.47314453125" style="fill: none; stroke: #000; stroke-miterlimit: 10;"></line>
        <polygon points="431.884735107421875 91.462219238280341 438.79290771484375 87.47314453125 431.884735107421875 83.484069824217841 431.884735107421875 91.462219238280341"></polygon>
      </g>
    </g>
    <g>
      <line x1="218.902569138740546" y1="175.490531220563753" x2="268.902569138740546" y2="175.490531220563753" style="fill: none; stroke: #fff; stroke-miterlimit: 10; stroke-width: 3px;"></line>
      <g>
        <line x1="218.902572631835938" y1="175.490539550780341" x2="263.161590576171875" y2="175.490539550780341" style="fill: none; stroke: #000; stroke-miterlimit: 10;"></line>
        <polygon points="261.994384765625 179.479583740233466 268.902557373046875 175.490539550780341 261.994384765625 171.501464843749091 261.994384765625 179.479583740233466"></polygon>
      </g>
    </g>
    <g>
      <line x1="388.792908276861453" y1="175.490531220563753" x2="438.792908276861453" y2="175.490531220563753" style="fill: none; stroke: #fff; stroke-miterlimit: 10; stroke-width: 3px;"></line>
      <g>
        <line x1="388.79290771484375" y1="175.490539550780341" x2="433.051910400390625" y2="175.490539550780341" style="fill: none; stroke: #000; stroke-miterlimit: 10;"></line>
        <polygon points="431.884735107421875 179.479583740233466 438.79290771484375 175.490539550780341 431.884735107421875 171.501464843749091 431.884735107421875 179.479583740233466"></polygon>
      </g>
    </g>
    <g>
      <line x1="558.700951488401188" y1="87.473148980975566" x2="608.700951488401188" y2="87.473148980975566" style="fill: none; stroke: #fff; stroke-miterlimit: 10; stroke-width: 3px;"></line>
      <g>
        <line x1="558.700927734375" y1="87.47314453125" x2="602.9599609375" y2="87.47314453125" style="fill: none; stroke: #000; stroke-miterlimit: 10;"></line>
        <polygon points="601.79278564453125 91.462219238280341 608.700927734375 87.47314453125 601.79278564453125 83.484069824217841 601.79278564453125 91.462219238280341"></polygon>
      </g>
    </g>
    <g>
      <line x1="728.591290626525733" y1="87.473148980975566" x2="778.591290626525733" y2="87.473148980975566" style="fill: none; stroke: #fff; stroke-miterlimit: 10; stroke-width: 3px;"></line>
      <g>
        <line x1="728.59130859375" y1="87.47314453125" x2="772.85028076171875" y2="87.47314453125" style="fill: none; stroke: #000; stroke-miterlimit: 10;"></line>
        <polygon points="771.68310546875 91.462219238280341 778.59130859375 87.47314453125 771.68310546875 83.484069824217841 771.68310546875 91.462219238280341"></polygon>
      </g>
    </g>
    <g>
      <line x1="558.700951488401188" y1="175.490531220561934" x2="608.700951488401188" y2="175.490531220561934" style="fill: none; stroke: #fff; stroke-miterlimit: 10; stroke-width: 3px;"></line>
      <g>
        <line x1="558.700927734375" y1="175.490539550780341" x2="602.9599609375" y2="175.490539550780341" style="fill: none; stroke: #000; stroke-miterlimit: 10;"></line>
        <polygon points="601.79278564453125 179.479583740233466 608.700927734375 175.490539550780341 601.79278564453125 171.501464843749091 601.79278564453125 179.479583740233466"></polygon>
      </g>
    </g>
    <g>
      <line x1="728.591290626525733" y1="175.490531220561934" x2="778.591290626525733" y2="175.490531220561934" style="fill: none; stroke: #fff; stroke-miterlimit: 10; stroke-width: 3px;"></line>
      <g>
        <line x1="728.59130859375" y1="175.490539550780341" x2="772.85028076171875" y2="175.490539550780341" style="fill: none; stroke: #000; stroke-miterlimit: 10;"></line>
        <polygon points="771.68310546875 179.479583740233466 778.59130859375 175.490539550780341 771.68310546875 171.501464843749091 771.68310546875 179.479583740233466"></polygon>
      </g>
    </g>
    <line x1="899.481629764646641" y1="87.473148980975566" x2="930.481629764646641" y2="87.473148980975566" style="fill: none; stroke: #000; stroke-miterlimit: 10;"></line>
    <line x1="899.481629764646641" y1="175.490531220563753" x2="930.481629764646641" y2="175.490531220563753" style="fill: none; stroke: #000; stroke-miterlimit: 10;"></line>
    <g>
      <path d="M952.464465416222083,155.506135173677649h-17.985956442198585c-2.207415305269024,0-3.996879209376857,1.789463904106015-3.996879209376857,3.996879209376857v31.975033675018494c0,2.207417211131542,1.789463904107834,3.996879209376857,3.996879209376857,3.996879209376857h23.98127525626478c2.207417211131542,0,3.996879209376857-1.789461998245315,3.996879209376857-3.996879209376857v-25.979714860952299l-9.992198023443052-9.992198023443052Z" style="fill: none; stroke: #000; stroke-linecap: round; stroke-linejoin: round; stroke-width: 2px;"></path>
      <path d="M950.466025811532745,155.506135173677649v7.993758418753714c0,2.207415305272661,1.789463904106015,3.996879209378676,3.996879209376857,3.996879209378676h7.993758418755533" style="fill: none; stroke: #000; stroke-linecap: round; stroke-linejoin: round; stroke-width: 2px;"></path>
      <path d="M942.472267392779031,173.492091615874415l9.992198023443052,5.995318814066195-9.992198023443052,5.995318814066195v-11.99063762813239Z" style="fill: none; stroke: #000; stroke-linecap: round; stroke-linejoin: round; stroke-width: 2px;"></path>
    </g>
    <g>
      <line x1="73.396822347679517" y1="131.481840100769659" x2="55.868200319803691" y2="131.481840100769659" style="fill: none; stroke: #fff; stroke-miterlimit: 10; stroke-width: 3px;"></line>
      <line x1="73.396822347679517" y1="131.481840100769659" x2="55.868200319803691" y2="131.481840100769659" style="fill: none; stroke: #000; stroke-miterlimit: 10;"></line>
    </g>
    <g>
      <rect x="25.404540336742684" y="115.47808039669053" width="30" height="30" rx="2" ry="2" style="fill: none; stroke: #000; stroke-linecap: round; stroke-linejoin: round; stroke-width: 2px;"></rect>
      <path d="M35.404540336742684,125.483080829021674c-.002778371175737-.92047055562216.741159121194869-1.668910980224609,1.661629676818848-1.671688556671143.305436452230424-.000921885170101.605254173278809.082108974456787.866703987121582.240021546684147l8.328332901000977,4.994999567665218c.790688196817428.471259752910555,1.049636205038041,1.494270960491122.578374862670898,2.284959157310368-.141755739847213.237841606140137-.340533256530762.436619122821867-.578374862670898.578374862670898l-8.328332901000977,4.994999567665218c-.787908236185103.475891431175114-1.81242148081401.222954750061035-2.288314501443892-.564953486122249-.158208211263627-.261936187744141-.241249402364701-.562373797100008-.240019162496537-.868379275005282v-9.988333384197176Z" style="fill: none; stroke: #000; stroke-linecap: round; stroke-linejoin: round; stroke-width: 2px;"></path>
    </g>
    <g>
      <text transform="translate(883.9664306640625 248.531158447264716)" style="font-family: Roboto-Regular, Roboto; font-size: 14px;"><tspan x="0" y="0">Open source</tspan></text>
      <rect x="863.715421652470468" y="236.439660685941817" width="16" height="16" rx="2" ry="2" style="fill: #007884;"></rect>
    </g>
  </g>
</svg>
**Figure : gst-videocodec-concurrent-playback pipeline**

## 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 | <ul class="simple"><br><li><p>Simultaneously decodes the video streams of several participants.</p></li><br><li><p>Useful in a multi-party video conference scenario where the application manages several video streams.</p></li><br></ul> |
| 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 complete the [Prerequisites](https://docs.qualcomm.com/doc/80-70029-50/topic/mm_sample_apps_prerequisites.html).
2. Input `MP4 AVC (H.264)` and `HEVC (H.265)` video files on the target device.
3. In the terminal of the target device, use the following command to run the use case:

> 
> 
> gst-videocodec-concurrent-playback -i /etc/media/<h264_file>.mp4 -i /etc/media/<h265_file>.mp4 -o /etc/media/<test>.yuv
>         Copy 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/<h264_file>.mp4 -i /etc/media/<h265_file>.mp4 -o /etc/media/<test>.yuv
>         Copy to clipboard
4. To stop the use case, use **CTRL + C**.
5. 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 --help
        Copy 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 videocodec concurrent playback 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-70029-50/topic/v4l2h264dec.html) | Decodes the H.264 video stream using Video4Linux. |
| [v4l2h265dec](https://docs.qualcomm.com/doc/80-70029-50/topic/v4l2h265dec.html) | Decodes the H.265 video stream using Video4Linux. |
| [Waylandsink](https://docs.qualcomm.com/doc/80-70029-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. |

Last Published: Jun 03, 2026

[Previous Topic
Smart codec](https://docs.qualcomm.com/bundle/publicresource/80-70029-50/topics/smart-codec.md) [Next Topic
Audio-video playback](https://docs.qualcomm.com/bundle/publicresource/80-70029-50/topics/gst-audio-video-playback.md)