# Video playback use cases

Source: [https://docs.qualcomm.com/doc/80-70022-50/topic/video-playback-use-cases.html](https://docs.qualcomm.com/doc/80-70022-50/topic/video-playback-use-cases.html)

The video playback use cases show the playback of the 4K video stream from a file,
        which is in a media container format such as MP4.

- Before you run the use cases, ensure that you complete the preconditions mentioned
                in [GStreamer command-line use cases](https://docs.qualcomm.com/doc/80-70022-50/topic/gstreamer-application-use-cases.html).
- Run all the commands in the SSH shell of the target device.
- To stop the use case,  use CTRL +
                C.

Note: To play the YUV file, pull the YUV dump from the device and play
            with a YUV player on the host computer. For example, you can select
                `YUV420planarNV12` format, and use `1920 & 1088`
            as stride and scanlines.

## Single stream video playback (H.264)

- Decode and display a single stream
                        (H.264):

        gst-launch-1.0 -e filesrc location=/opt/<h264_file>.mp4 ! qtdemux ! queue ! h264parse ! v4l2h264dec capture-io-mode=4 output-io-mode=4 ! waylandsink fullscreen=trueCopy to clipboard

Figure : Pipeline to decode and display a single stream (H.264)
                        
                        <?xml version="1.0" encoding="UTF-8"?>
<svg xmlns="http://www.w3.org/2000/svg" width="940" height="146.266117095947266" viewbox="0 0 940 146.266117095947266">
  <g id="Layer_1" data-name="Layer 1">
    <g>
      <rect x=".5" y=".500186920166016" width="939" height="145.26611328125" rx="7.5" ry="7.5" style="fill: #fafafa;"></rect>
      <path d="M932,1c3.8597412109375,0,7,3.140235900878906,7,7v130.266117095947266c0,3.859771728515625-3.1402587890625,7-7,7H8c-3.859771728515625,0-7-3.140228271484375-7-7V8c0-3.859764099121094,3.140228271484375-7,7-7h924M932,0H8C3.581771850585938,0,0,3.581768035888672,0,8v130.266117095947266c0,4.418243408203125,3.581771850585938,8,8,8h924c4.4183349609375,0,8-3.581756591796875,8-8V8c0-4.418231964111328-3.5816650390625-8-8-8h0Z" style="fill: #d2d7e1;"></path>
    </g>
  </g>
  <g id="Layer_2" data-name="Layer 2">
    <text transform="translate(439.60546875 31.382291793823242)" style="font-family: Roboto-Bold, Roboto; font-size: 16px; font-weight: 700;"><tspan x="0" y="0">GST BIN</tspan></text>
    <g>
      <g>
        <rect x="20" y="49.602092742919922" width="160" height="50" rx="4" ry="4" style="fill: #007884;"></rect>
        <text transform="translate(78.082061767578125 78.108802795410156)" style="fill: #fff; font-family: Roboto-Regular, Roboto; font-size: 16px;"><tspan x="0" y="0">filesrc</tspan></text>
      </g>
      <g>
        <line x1="180" y1="74.602092742919922" x2="199.976654052734375" y2="74.602092742919922" style="fill: none; stroke: #000; stroke-miterlimit: 10;"></line>
        <polygon points="198.955352783203125 78.092525482177734 205 74.602092742919922 198.955352783203125 71.111660003662109 198.955352783203125 78.092525482177734"></polygon>
      </g>
      <g>
        <rect x="205" y="49.602092742919922" width="160" height="50" rx="4" ry="4" style="fill: #007884;"></rect>
        <text transform="translate(253.703166961669922 78.108802795410156)" style="fill: #fff; font-family: Roboto-Regular, Roboto; font-size: 16px;"><tspan x="0" y="0">qtdemux</tspan></text>
      </g>
      <g>
        <line x1="365" y1="74.602092742919922" x2="384.97662353515625" y2="74.602092742919922" style="fill: none; stroke: #000; stroke-miterlimit: 10;"></line>
        <polygon points="383.955322265625 78.092525482177734 390 74.602092742919922 383.955322265625 71.111660003662109 383.955322265625 78.092525482177734"></polygon>
      </g>
      <g>
        <rect x="390" y="49.602092742919922" width="160" height="50" rx="4" ry="4" style="fill: #007884;"></rect>
        <text transform="translate(432.207061767578125 78.108802795410156)" style="fill: #fff; font-family: Roboto-Regular, Roboto; font-size: 16px;"><tspan x="0" y="0">h264parse</tspan></text>
      </g>
      <g>
        <line x1="550" y1="74.602092742919922" x2="569.97662353515625" y2="74.602092742919922" style="fill: none; stroke: #000; stroke-miterlimit: 10;"></line>
        <polygon points="568.955322265625 78.092525482177734 575 74.602092742919922 568.955322265625 71.111660003662109 568.955322265625 78.092525482177734"></polygon>
      </g>
      <g>
        <rect x="575" y="49.602092742919922" width="160" height="50" rx="4" ry="4" style="fill: #007884;"></rect>
        <text transform="translate(609.378936767578125 78.108802795410156)" style="fill: #fff; font-family: Roboto-Regular, Roboto; font-size: 16px;"><tspan x="0" y="0">v4l2h264dec</tspan></text>
      </g>
      <g>
        <line x1="735" y1="74.602092742919922" x2="754.97662353515625" y2="74.602092742919922" style="fill: none; stroke: #000; stroke-miterlimit: 10;"></line>
        <polygon points="753.955322265625 78.092525482177734 760 74.602092742919922 753.955322265625 71.111660003662109 753.955322265625 78.092525482177734"></polygon>
      </g>
      <g>
        <rect x="760" y="49.602092742919922" width="160" height="50" rx="4" ry="4" style="fill: #007884;"></rect>
        <text transform="translate(796.09771728515625 78.108802795410156)" style="fill: #fff; font-family: Roboto-Regular, Roboto; font-size: 16px;"><tspan x="0" y="0">waylandsink</tspan></text>
      </g>
    </g>
    <g>
      <text transform="translate(841.5096435546875 126.693576812744141)" style="font-family: Roboto-Regular, Roboto; font-size: 14px;"><tspan x="0" y="0">Open source</tspan></text>
      <rect x="821.25858739359137" y="114.602092742919922" width="16" height="16" rx="2" ry="2" style="fill: #007884;"></rect>
    </g>
  </g>
</svg>
- Decode and save a stream to a file
                        (H.264):

        gst-launch-1.0 -e filesrc location=/opt/<h264_file>.mp4 ! qtdemux ! queue ! h264parse ! v4l2h264dec capture-io-mode=4 output-io-mode=4 ! video/x-raw, format=NV12 ! filesink location="/opt/video.yuv"Copy to clipboard

Figure : Pipeline to decode and save a stream to a file (H.264)
                        
                        <?xml version="1.0" encoding="UTF-8"?>
<svg id="Layer_2" data-name="Layer 2" xmlns="http://www.w3.org/2000/svg" width="940" height="146.266115188598633" viewbox="0 0 940 146.266115188598633">
  <g>
    <rect x=".5" y=".499910354614258" width="939" height="145.26611328125" rx="7.5" ry="7.5" style="fill: #fafafa;"></rect>
    <path d="M932,1c3.8597412109375,0,7,3.140233993530273,7,6.999998092651367v130.266117095947266c0,3.859771728515625-3.1402587890625,7-7,7H8c-3.859771728515625,0-7-3.140228271484375-7-7V7.999998092651367c0-3.859764099121094,3.140228271484375-6.999998092651367,7-6.999998092651367h924M932,0H8C3.581771850585938,0,0,3.581766128540039,0,7.999998092651367v130.266117095947266c0,4.418243408203125,3.581771850585938,8,8,8h924c4.4183349609375,0,8-3.581756591796875,8-8V7.999998092651367c0-4.418231964111328-3.5816650390625-7.999998092651367-8-7.999998092651367h0Z" style="fill: #d2d7e1;"></path>
  </g>
  <g>
    <text transform="translate(841.5096435546875 126.693574905395508)" style="font-family: Roboto-Regular, Roboto; font-size: 14px;"><tspan x="0" y="0">Open source</tspan></text>
    <rect x="821.25858739359137" y="114.602090835571289" width="16" height="16" rx="2" ry="2" style="fill: #007884;"></rect>
  </g>
  <text transform="translate(439.60546875 32.657405853271484)" style="font-family: Roboto-Bold, Roboto; font-size: 16px; font-weight: 700;"><tspan x="0" y="0">GST BIN</tspan></text>
  <g>
    <g>
      <rect x="20" y="50.877206802368164" width="160" height="50" rx="4" ry="4" style="fill: #007884;"></rect>
      <text transform="translate(78.082061767578125 79.383916854858398)" style="fill: #fff; font-family: Roboto-Regular, Roboto; font-size: 16px;"><tspan x="0" y="0">filesrc</tspan></text>
    </g>
    <g>
      <line x1="180" y1="75.877206802368164" x2="199.976654052734375" y2="75.877206802368164" style="fill: none; stroke: #000; stroke-miterlimit: 10;"></line>
      <polygon points="198.955352783203125 79.367639541625977 205 75.877206802368164 198.955352783203125 72.386774063110352 198.955352783203125 79.367639541625977"></polygon>
    </g>
    <g>
      <rect x="205" y="50.877206802368164" width="160" height="50" rx="4" ry="4" style="fill: #007884;"></rect>
      <text transform="translate(253.703166961669922 79.383916854858398)" style="fill: #fff; font-family: Roboto-Regular, Roboto; font-size: 16px;"><tspan x="0" y="0">qtdemux</tspan></text>
    </g>
    <g>
      <line x1="365" y1="75.877206802368164" x2="384.97662353515625" y2="75.877206802368164" style="fill: none; stroke: #000; stroke-miterlimit: 10;"></line>
      <polygon points="383.955322265625 79.367639541625977 390 75.877206802368164 383.955322265625 72.386774063110352 383.955322265625 79.367639541625977"></polygon>
    </g>
    <g>
      <rect x="390" y="50.877206802368164" width="160" height="50" rx="4" ry="4" style="fill: #007884;"></rect>
      <text transform="translate(432.207061767578125 79.383916854858398)" style="fill: #fff; font-family: Roboto-Regular, Roboto; font-size: 16px;"><tspan x="0" y="0">h264parse</tspan></text>
    </g>
    <g>
      <line x1="550" y1="75.877206802368164" x2="569.97662353515625" y2="75.877206802368164" style="fill: none; stroke: #000; stroke-miterlimit: 10;"></line>
      <polygon points="568.955322265625 79.367639541625977 575 75.877206802368164 568.955322265625 72.386774063110352 568.955322265625 79.367639541625977"></polygon>
    </g>
    <g>
      <rect x="575" y="50.877206802368164" width="160" height="50" rx="4" ry="4" style="fill: #007884;"></rect>
      <text transform="translate(609.378936767578125 79.383916854858398)" style="fill: #fff; font-family: Roboto-Regular, Roboto; font-size: 16px;"><tspan x="0" y="0">v4l2h264dec</tspan></text>
    </g>
    <g>
      <line x1="735" y1="75.877206802368164" x2="754.97662353515625" y2="75.877206802368164" style="fill: none; stroke: #000; stroke-miterlimit: 10;"></line>
      <polygon points="753.955322265625 79.367639541625977 760 75.877206802368164 753.955322265625 72.386774063110352 753.955322265625 79.367639541625977"></polygon>
    </g>
    <g>
      <rect x="760" y="50.877206802368164" width="160" height="50" rx="4" ry="4" style="fill: #007884;"></rect>
      <text transform="translate(814.56646728515625 79.383916854858398)" style="fill: #fff; font-family: Roboto-Regular, Roboto; font-size: 16px;"><tspan x="0" y="0">filesink</tspan></text>
    </g>
  </g>
</svg>

## Single stream video playback (H.265)

- Decode and display a single stream
                        (H.265):

        gst-launch-1.0 -e filesrc location=/opt/<h265_file>.mp4 ! qtdemux ! queue ! h265parse ! v4l2h265dec capture-io-mode=4 output-io-mode=4 ! video/x-raw, format=NV12 ! waylandsink fullscreen=trueCopy to clipboard

Figure : Pipeline to decode and display a single stream (H.265)
                        
                        <?xml version="1.0" encoding="UTF-8"?>
<svg xmlns="http://www.w3.org/2000/svg" width="940" height="146.266122817993164" viewbox="0 0 940 146.266122817993164">
  <g id="Layer_1" data-name="Layer 1">
    <g>
      <rect x=".5" y=".500253677368164" width="939" height="145.265625" rx="7.5" ry="7.5" style="fill: #fafafa;"></rect>
      <path d="M932,.999998092651367c3.8597412109375,0,7,3.140235900878906,7,7v130.266124725341797c0,3.859756469726562-3.1402587890625,7-7,7H8c-3.859771728515625,0-7-3.140243530273438-7-7V7.999998092651367C1,4.140233993530273,4.140228271484375.999998092651367,8,.999998092651367h924M932,0H8C3.581771850585938,0,0,3.581766128540039,0,7.999998092651367v130.266124725341797c0,4.418228149414062,3.581771850585938,8,8,8h924c4.4183349609375,0,8-3.581771850585938,8-8V7.999998092651367c0-4.418231964111328-3.5816650390625-7.999998092651367-8-7.999998092651367h0Z" style="fill: #d2d7e1;"></path>
    </g>
    <g>
      <text transform="translate(841.5096435546875 126.693582534790039)" style="font-family: Roboto-Regular, Roboto; font-size: 14px;"><tspan x="0" y="0">Open source</tspan></text>
      <rect x="821.25858739359137" y="114.602090835571289" width="16" height="16" rx="2" ry="2" style="fill: #007884;"></rect>
    </g>
  </g>
  <g id="Layer_2" data-name="Layer 2">
    <text transform="translate(439.60546875 31.536167144775391)" style="font-family: Roboto-Bold, Roboto; font-size: 16px; font-weight: 700;"><tspan x="0" y="0">GST BIN</tspan></text>
    <g>
      <g>
        <rect x="20" y="49.75596809387207" width="160" height="50" rx="4" ry="4" style="fill: #007884;"></rect>
        <text transform="translate(78.082061767578125 78.262678146362305)" style="fill: #fff; font-family: Roboto-Regular, Roboto; font-size: 16px;"><tspan x="0" y="0">filesrc</tspan></text>
      </g>
      <g>
        <line x1="180" y1="74.75596809387207" x2="199.976654052734375" y2="74.75596809387207" style="fill: none; stroke: #000; stroke-miterlimit: 10;"></line>
        <polygon points="198.955352783203125 78.246400833129883 205 74.75596809387207 198.955352783203125 71.265535354614258 198.955352783203125 78.246400833129883"></polygon>
      </g>
      <g>
        <rect x="205" y="49.75596809387207" width="160" height="50" rx="4" ry="4" style="fill: #007884;"></rect>
        <text transform="translate(253.703166961669922 78.262678146362305)" style="fill: #fff; font-family: Roboto-Regular, Roboto; font-size: 16px;"><tspan x="0" y="0">qtdemux</tspan></text>
      </g>
      <g>
        <line x1="365" y1="74.75596809387207" x2="384.97662353515625" y2="74.75596809387207" style="fill: none; stroke: #000; stroke-miterlimit: 10;"></line>
        <polygon points="383.955322265625 78.246400833129883 390 74.75596809387207 383.955322265625 71.265535354614258 383.955322265625 78.246400833129883"></polygon>
      </g>
      <g>
        <rect x="390" y="49.75596809387207" width="160" height="50" rx="4" ry="4" style="fill: #007884;"></rect>
        <text transform="translate(432.207061767578125 78.262678146362305)" style="fill: #fff; font-family: Roboto-Regular, Roboto; font-size: 16px;"><tspan x="0" y="0">h265parse</tspan></text>
      </g>
      <g>
        <line x1="550" y1="74.75596809387207" x2="569.97662353515625" y2="74.75596809387207" style="fill: none; stroke: #000; stroke-miterlimit: 10;"></line>
        <polygon points="568.955322265625 78.246400833129883 575 74.75596809387207 568.955322265625 71.265535354614258 568.955322265625 78.246400833129883"></polygon>
      </g>
      <g>
        <rect x="575" y="49.75596809387207" width="160" height="50" rx="4" ry="4" style="fill: #007884;"></rect>
        <text transform="translate(609.378936767578125 78.262678146362305)" style="fill: #fff; font-family: Roboto-Regular, Roboto; font-size: 16px;"><tspan x="0" y="0">v4l2h264dec</tspan></text>
      </g>
      <g>
        <line x1="735" y1="74.75596809387207" x2="754.97662353515625" y2="74.75596809387207" style="fill: none; stroke: #000; stroke-miterlimit: 10;"></line>
        <polygon points="753.955322265625 78.246400833129883 760 74.75596809387207 753.955322265625 71.265535354614258 753.955322265625 78.246400833129883"></polygon>
      </g>
      <g>
        <rect x="760" y="49.75596809387207" width="160" height="50" rx="4" ry="4" style="fill: #007884;"></rect>
        <text transform="translate(796.09771728515625 78.262678146362305)" style="fill: #fff; font-family: Roboto-Regular, Roboto; font-size: 16px;"><tspan x="0" y="0">waylandsink</tspan></text>
      </g>
    </g>
  </g>
</svg>
- Decode and save a stream to a file
                        (H.265):

        gst-launch-1.0 -e filesrc location=/opt/<h265_file>.mp4 ! qtdemux ! queue ! h265parse ! v4l2h265dec capture-io-mode=4 output-io-mode=4 ! video/x-raw, format=NV12 ! filesink location="/opt/video.yuv"Copy to clipboard

Figure : Pipeline to decode and save a stream to a file (H.265)
                        
                        <?xml version="1.0" encoding="UTF-8"?>
<svg xmlns="http://www.w3.org/2000/svg" width="940" height="146.266122817993164" viewbox="0 0 940 146.266122817993164">
  <g id="Layer_1" data-name="Layer 1">
    <g>
      <rect x=".5" y=".500253677368164" width="939" height="145.265625" rx="7.5" ry="7.5" style="fill: #fafafa;"></rect>
      <path d="M932,.999998092651367c3.8597412109375,0,7,3.140235900878906,7,7v130.266124725341797c0,3.859756469726562-3.1402587890625,7-7,7H8c-3.859771728515625,0-7-3.140243530273438-7-7V7.999998092651367C1,4.140233993530273,4.140228271484375.999998092651367,8,.999998092651367h924M932,0H8C3.581771850585938,0,0,3.581766128540039,0,7.999998092651367v130.266124725341797c0,4.418228149414062,3.581771850585938,8,8,8h924c4.4183349609375,0,8-3.581771850585938,8-8V7.999998092651367c0-4.418231964111328-3.5816650390625-7.999998092651367-8-7.999998092651367h0Z" style="fill: #d2d7e1;"></path>
    </g>
    <g>
      <text transform="translate(841.5096435546875 126.693582534790039)" style="font-family: Roboto-Regular, Roboto; font-size: 14px;"><tspan x="0" y="0">Open source</tspan></text>
      <rect x="821.25858739359137" y="114.602090835571289" width="16" height="16" rx="2" ry="2" style="fill: #007884;"></rect>
    </g>
  </g>
  <g id="Layer_2" data-name="Layer 2">
    <text transform="translate(439.60546875 31.536167144775391)" style="font-family: Roboto-Bold, Roboto; font-size: 16px; font-weight: 700;"><tspan x="0" y="0">GST BIN</tspan></text>
    <g>
      <g>
        <rect x="20" y="49.75596809387207" width="160" height="50" rx="4" ry="4" style="fill: #007884;"></rect>
        <text transform="translate(78.082061767578125 78.262678146362305)" style="fill: #fff; font-family: Roboto-Regular, Roboto; font-size: 16px;"><tspan x="0" y="0">filesrc</tspan></text>
      </g>
      <g>
        <line x1="180" y1="74.75596809387207" x2="199.976654052734375" y2="74.75596809387207" style="fill: none; stroke: #000; stroke-miterlimit: 10;"></line>
        <polygon points="198.955352783203125 78.246400833129883 205 74.75596809387207 198.955352783203125 71.265535354614258 198.955352783203125 78.246400833129883"></polygon>
      </g>
      <g>
        <rect x="205" y="49.75596809387207" width="160" height="50" rx="4" ry="4" style="fill: #007884;"></rect>
        <text transform="translate(253.703166961669922 78.262678146362305)" style="fill: #fff; font-family: Roboto-Regular, Roboto; font-size: 16px;"><tspan x="0" y="0">qtdemux</tspan></text>
      </g>
      <g>
        <line x1="365" y1="74.75596809387207" x2="384.97662353515625" y2="74.75596809387207" style="fill: none; stroke: #000; stroke-miterlimit: 10;"></line>
        <polygon points="383.955322265625 78.246400833129883 390 74.75596809387207 383.955322265625 71.265535354614258 383.955322265625 78.246400833129883"></polygon>
      </g>
      <g>
        <rect x="390" y="49.75596809387207" width="160" height="50" rx="4" ry="4" style="fill: #007884;"></rect>
        <text transform="translate(432.207061767578125 78.262678146362305)" style="fill: #fff; font-family: Roboto-Regular, Roboto; font-size: 16px;"><tspan x="0" y="0">h265parse</tspan></text>
      </g>
      <g>
        <line x1="550" y1="74.75596809387207" x2="569.97662353515625" y2="74.75596809387207" style="fill: none; stroke: #000; stroke-miterlimit: 10;"></line>
        <polygon points="568.955322265625 78.246400833129883 575 74.75596809387207 568.955322265625 71.265535354614258 568.955322265625 78.246400833129883"></polygon>
      </g>
      <g>
        <rect x="575" y="49.75596809387207" width="160" height="50" rx="4" ry="4" style="fill: #007884;"></rect>
        <text transform="translate(609.378936767578125 78.262678146362305)" style="fill: #fff; font-family: Roboto-Regular, Roboto; font-size: 16px;"><tspan x="0" y="0">v4l2h264dec</tspan></text>
      </g>
      <g>
        <line x1="735" y1="74.75596809387207" x2="754.97662353515625" y2="74.75596809387207" style="fill: none; stroke: #000; stroke-miterlimit: 10;"></line>
        <polygon points="753.955322265625 78.246400833129883 760 74.75596809387207 753.955322265625 71.265535354614258 753.955322265625 78.246400833129883"></polygon>
      </g>
      <g>
        <rect x="760" y="49.75596809387207" width="160" height="50" rx="4" ry="4" style="fill: #007884;"></rect>
        <text transform="translate(814.56646728515625 78.262678146362305)" style="fill: #fff; font-family: Roboto-Regular, Roboto; font-size: 16px;"><tspan x="0" y="0">filesink</tspan></text>
      </g>
    </g>
  </g>
</svg>

## Single stream video playback (VP9)

The use cases show the playback of a 4K video stream from a file of media container
                format such as webm.

- Decode and display a single stream
                        (VP9):

        gst-launch-1.0 -e filesrc location=/opt/<vp9_file>.webm ! matroskademux ! v4l2vp9dec capture-io-mode=4 output-io-mode=4 ! video/x-raw, format=NV12 ! waylandsink fullscreen=trueCopy to clipboard

Figure : Pipeline to decode and display a single stream (VP9)
                        
                        <?xml version="1.0" encoding="UTF-8"?>
<svg id="Layer_2" data-name="Layer 2" xmlns="http://www.w3.org/2000/svg" width="755" height="146.266002655029297" viewbox="0 0 755 146.266002655029297">
  <g>
    <rect x=".5" y=".499904632568359" width="754" height="145.26611328125" rx="7.499999999999948" ry="7.499999999999948" style="fill: #fafafa;"></rect>
    <path d="M747,1c3.85980224609375,0,7,3.14019775390625,7,7v130.266002655029297c0,3.85980224609375-3.14019775390625,7-7,7H8c-3.85980224609375,0-7-3.14019775390625-7-7V8c0-3.85980224609375,3.14019775390625-7,7-7h739M747,0H8C3.581695556640625,0,0,3.581699371337891,0,8v130.266002655029297c0,4.418289184570312,3.581695556640625,8,8,8h739c4.41827392578125,0,8-3.581710815429688,8-8V8c0-4.418300628662109-3.58172607421875-8-8-8h0Z" style="fill: #d2d7e1;"></path>
  </g>
  <g>
    <text transform="translate(656.5096435546875 126.693538665771484)" style="font-family: Roboto-Regular, Roboto; font-size: 14px;"><tspan x="0" y="0">Open source</tspan></text>
    <rect x="636.25858739359137" y="114.602027893065497" width="16" height="16" rx="2" ry="2" style="fill: #007884;"></rect>
  </g>
  <text transform="translate(347.10546875 32.657400131225586)" style="font-family: Roboto-Bold, Roboto; font-size: 16px; font-weight: 700;"><tspan x="0" y="0">GST BIN</tspan></text>
  <g>
    <g>
      <rect x="20" y="50.877201080322266" width="160" height="50" rx="4" ry="4" style="fill: #007884;"></rect>
      <text transform="translate(78.082073211669922 79.3839111328125)" style="fill: #fff; font-family: Roboto-Regular, Roboto; font-size: 16px;"><tspan x="0" y="0">filesrc</tspan></text>
    </g>
    <g>
      <line x1="180" y1="75.877201080322266" x2="199.976654052734375" y2="75.877201080322266" style="fill: none; stroke: #000; stroke-miterlimit: 10;"></line>
      <polygon points="198.955352783203125 79.367633819580078 205 75.877201080322266 198.955352783203125 72.386768341064453 198.955352783203125 79.367633819580078"></polygon>
    </g>
    <g>
      <rect x="205" y="50.877201080322266" width="160" height="50" rx="4" ry="4" style="fill: #007884;"></rect>
      <text transform="translate(227.085968017578125 79.3839111328125)" style="fill: #fff; font-family: Roboto-Regular, Roboto; font-size: 16px;"><tspan x="0" y="0">matroskademux</tspan></text>
    </g>
    <g>
      <line x1="365" y1="75.877201080322266" x2="384.97662353515625" y2="75.877201080322266" style="fill: none; stroke: #000; stroke-miterlimit: 10;"></line>
      <polygon points="383.955322265625 79.367633819580078 390 75.877201080322266 383.955322265625 72.386768341064453 383.955322265625 79.367633819580078"></polygon>
    </g>
    <g>
      <rect x="390" y="50.877201080322266" width="160" height="50" rx="4" ry="4" style="fill: #007884;"></rect>
      <text transform="translate(429.406280517578125 79.3839111328125)" style="fill: #fff; font-family: Roboto-Regular, Roboto; font-size: 16px;"><tspan x="0" y="0">v4l2vp9dec</tspan></text>
    </g>
    <g>
      <line x1="550" y1="75.877201080322266" x2="569.97662353515625" y2="75.877201080322266" style="fill: none; stroke: #000; stroke-miterlimit: 10;"></line>
      <polygon points="568.955322265625 79.367633819580078 575 75.877201080322266 568.955322265625 72.386768341064453 568.955322265625 79.367633819580078"></polygon>
    </g>
    <g>
      <rect x="575" y="50.877201080322266" width="160" height="50" rx="4.000000000000019" ry="4.000000000000019" style="fill: #007884;"></rect>
      <text transform="translate(611.09771728515625 79.3839111328125)" style="fill: #fff; font-family: Roboto-Regular, Roboto; font-size: 16px;"><tspan x="0" y="0">waylandsink</tspan></text>
    </g>
  </g>
</svg>
- Decode and save a stream to a file
                        (VP9):

        gst-launch-1.0 -e filesrc location=/opt/<vp9_file>.webm ! matroskademux ! v4l2vp9dec capture-io-mode=4 output-io-mode=4 ! video/x-raw, format=NV12 ! filesink  location="/opt/video.yuv"Copy to clipboard

Figure : Pipeline to decode and save a stream to a file (VP9)
                        
                        <?xml version="1.0" encoding="UTF-8"?>
<svg id="Layer_2" data-name="Layer 2" xmlns="http://www.w3.org/2000/svg" width="755" height="146.266002655029297" viewbox="0 0 755 146.266002655029297">
  <g>
    <rect x=".5" y=".500133514404297" width="754" height="145.26611328125" rx="7.499999999999949" ry="7.499999999999949" style="fill: #fafafa;"></rect>
    <path d="M747,1c3.85980224609375,0,7,3.14019775390625,7,7v130.266002655029297c0,3.85980224609375-3.14019775390625,7-7,7H8c-3.85980224609375,0-7-3.14019775390625-7-7V8c0-3.85980224609375,3.14019775390625-7,7-7h739M747,0H8C3.581695556640625,0,0,3.581699371337891,0,8v130.266002655029297c0,4.418289184570312,3.581695556640625,8,8,8h739c4.41827392578125,0,8-3.581710815429688,8-8V8c0-4.418300628662109-3.58172607421875-8-8-8h0Z" style="fill: #d2d7e1;"></path>
  </g>
  <g>
    <text transform="translate(656.5096435546875 126.693523406982422)" style="font-family: Roboto-Regular, Roboto; font-size: 14px;"><tspan x="0" y="0">Open source</tspan></text>
    <rect x="636.25858739359137" y="114.602025985717773" width="16" height="16" rx="2" ry="2" style="fill: #007884;"></rect>
  </g>
  <text transform="translate(347.10546875 31.536046981811523)" style="font-family: Roboto-Bold, Roboto; font-size: 16px; font-weight: 700;"><tspan x="0" y="0">GST BIN</tspan></text>
  <g>
    <g>
      <rect x="20" y="43.684558868408203" width="160" height="50" rx="4" ry="4" style="fill: #007884;"></rect>
      <text transform="translate(78.082073211669922 72.191268920898438)" style="fill: #fff; font-family: Roboto-Regular, Roboto; font-size: 16px;"><tspan x="0" y="0">filesrc</tspan></text>
    </g>
    <g>
      <line x1="180" y1="68.684558868408203" x2="199.976654052734375" y2="68.684558868408203" style="fill: none; stroke: #000; stroke-miterlimit: 10;"></line>
      <polygon points="198.955352783203125 72.174991607666016 205 68.684558868408203 198.955352783203125 65.194126129150391 198.955352783203125 72.174991607666016"></polygon>
    </g>
    <g>
      <rect x="205" y="43.684558868408203" width="160" height="50" rx="4" ry="4" style="fill: #007884;"></rect>
      <text transform="translate(227.085968017578125 72.191268920898438)" style="fill: #fff; font-family: Roboto-Regular, Roboto; font-size: 16px;"><tspan x="0" y="0">matroskademux</tspan></text>
    </g>
    <g>
      <line x1="365" y1="68.684558868408203" x2="384.97662353515625" y2="68.684558868408203" style="fill: none; stroke: #000; stroke-miterlimit: 10;"></line>
      <polygon points="383.955322265625 72.174991607666016 390 68.684558868408203 383.955322265625 65.194126129150391 383.955322265625 72.174991607666016"></polygon>
    </g>
    <g>
      <rect x="390" y="43.684558868408203" width="160" height="50" rx="4" ry="4" style="fill: #007884;"></rect>
      <text transform="translate(429.406280517578125 72.191268920898438)" style="fill: #fff; font-family: Roboto-Regular, Roboto; font-size: 16px;"><tspan x="0" y="0">v4l2vp9dec</tspan></text>
    </g>
    <g>
      <line x1="550" y1="68.684558868408203" x2="569.97662353515625" y2="68.684558868408203" style="fill: none; stroke: #000; stroke-miterlimit: 10;"></line>
      <polygon points="568.955322265625 72.174991607666016 575 68.684558868408203 568.955322265625 65.194126129150391 568.955322265625 72.174991607666016"></polygon>
    </g>
    <g>
      <rect x="575" y="43.684558868408203" width="160" height="50" rx="4.000000000000019" ry="4.000000000000019" style="fill: #007884;"></rect>
      <text transform="translate(629.56646728515625 72.191268920898438)" style="fill: #fff; font-family: Roboto-Regular, Roboto; font-size: 16px;"><tspan x="0" y="0">filesink</tspan></text>
    </g>
  </g>
</svg>

## Two 1080p streams video playback simultaneously

The pipeline shows the simultaneous playback of two video streams from a file of a
                media container format such as MP4.

**Known issue**: In Dragonwing IQ-9075, running these commands results in a blank
                screen, which blocks any further execution of the GST commands.

- In console
                    1:

        gst-launch-1.0 -e filesrc location=/opt/<1080p_H264/AVC_file>.mp4 ! qtdemux ! queue ! h264parse ! v4l2h264dec capture-io-mode=4 output-io-mode=4 ! video/x-raw, format=NV12 ! queue ! qtivcomposer name=mixer sink_1::position="<480, 0>" sink_1::dimensions="<480, 270>" ! waylandsinkCopy to clipboard
- In console
                    2:

        gst-launch-1.0 -e filesrc location=/opt/<1080p_H264/AVC_file>.mp4 ! qtdemux ! queue ! h264parse ! v4l2h264dec capture-io-mode=4 output-io-mode=4 ! video/x-raw, format=NV12 ! queue ! qtivcomposer name=mixer sink_0::position="<0, 0>" sink_0::dimensions="<480, 270>" ! waylandsink Copy to clipboard

Figure : Simultaneous playback of two video streams from a file
                    
                    <?xml version="1.0" encoding="UTF-8"?>
<svg xmlns="http://www.w3.org/2000/svg" width="940" height="270.80364990234375" viewbox="0 0 940 270.80364990234375">
  <g id="Layer_1" data-name="Layer 1">
    <g>
      <rect x=".5" y=".499755859375" width="939" height="269.8037109375" rx="7.5" ry="7.5" style="fill: #fafafa;"></rect>
      <path d="M932,1c3.8597412109375,0,7,3.140233993530273,7,7v254.80364990234375c0,3.859771728515625-3.1402587890625,7-7,7H8c-3.859771728515625,0-7-3.140228271484375-7-7V8c0-3.859766006469727,3.140228271484375-7,7-7h924M932,0H8C3.581771850585938,0,0,3.581645965576172,0,8v254.80364990234375c0,4.418243408203125,3.581771850585938,8,8,8h924c4.418212890625,0,8-3.581756591796875,8-8V8c0-4.418354034423828-3.581787109375-8-8-8h0Z" style="fill: #d2d7e1;"></path>
    </g>
    <line x1=".387041922102981" y1="121.614700317382812" x2="940" y2="121.614700317382812" style="fill: none; stroke: #d2d7e1; stroke-miterlimit: 10;"></line>
  </g>
  <g id="Layer_2" data-name="Layer 2">
    <g>
      <g>
        <rect x="20" y="173.679550170898438" width="160" height="50" rx="4" ry="4" style="fill: #007884;"></rect>
        <text transform="translate(78.082061767578125 202.186248779296875)" style="fill: #fff; font-family: Roboto-Regular, Roboto; font-size: 16px;"><tspan x="0" y="0">filesrc</tspan></text>
      </g>
      <g>
        <line x1="180" y1="198.679554606871534" x2="199.976654052734375" y2="198.679554606871534" style="fill: none; stroke: #000; stroke-miterlimit: 10;"></line>
        <polygon points="198.955352783203125 202.169987346129346 205 198.679554606871534 198.955352783203125 195.189121867613721 198.955352783203125 202.169987346129346"></polygon>
      </g>
      <g>
        <rect x="205" y="173.679550170898438" width="160" height="50" rx="4" ry="4" style="fill: #007884;"></rect>
        <text transform="translate(253.703166961669922 202.186248779296875)" style="fill: #fff; font-family: Roboto-Regular, Roboto; font-size: 16px;"><tspan x="0" y="0">qtdemux</tspan></text>
      </g>
      <g>
        <line x1="365" y1="198.679554606871534" x2="384.97662353515625" y2="198.679554606871534" style="fill: none; stroke: #000; stroke-miterlimit: 10;"></line>
        <polygon points="383.955322265625 202.169987346129346 390 198.679554606871534 383.955322265625 195.189121867613721 383.955322265625 202.169987346129346"></polygon>
      </g>
      <g>
        <rect x="390" y="173.679550170898438" width="160" height="50" rx="4" ry="4" style="fill: #007884;"></rect>
        <text transform="translate(432.207061767578125 202.186248779296875)" style="fill: #fff; font-family: Roboto-Regular, Roboto; font-size: 16px;"><tspan x="0" y="0">h264parse</tspan></text>
      </g>
      <g>
        <line x1="550" y1="198.679554606871534" x2="569.97662353515625" y2="198.679554606871534" style="fill: none; stroke: #000; stroke-miterlimit: 10;"></line>
        <polygon points="568.955322265625 202.169987346129346 575 198.679554606871534 568.955322265625 195.189121867613721 568.955322265625 202.169987346129346"></polygon>
      </g>
      <g>
        <rect x="575" y="173.679550170898438" width="160" height="50" rx="4" ry="4" style="fill: #007884;"></rect>
        <text transform="translate(609.378936767578125 202.186248779296875)" style="fill: #fff; font-family: Roboto-Regular, Roboto; font-size: 16px;"><tspan x="0" y="0">v4l2h264dec</tspan></text>
      </g>
      <g>
        <line x1="735" y1="198.679554606871534" x2="754.97662353515625" y2="198.679554606871534" style="fill: none; stroke: #000; stroke-miterlimit: 10;"></line>
        <polygon points="753.955322265625 202.169987346129346 760 198.679554606871534 753.955322265625 195.189121867613721 753.955322265625 202.169987346129346"></polygon>
      </g>
      <g>
        <rect x="760" y="173.679550170898438" width="160" height="50" rx="4" ry="4" style="fill: #007884;"></rect>
        <text transform="translate(796.0977783203125 202.186248779296875)" style="fill: #fff; font-family: Roboto-Regular, Roboto; font-size: 16px;"><tspan x="0" y="0">waylandsink</tspan></text>
      </g>
    </g>
    <text transform="translate(439.605470657348633 31.454544067382812)" style="font-family: Roboto-Bold, Roboto; font-size: 16px; font-weight: 700;"><tspan x="0" y="0">GST BIN</tspan></text>
    <text transform="translate(439.605470657348633 153.519393920898438)" style="font-family: Roboto-Bold, Roboto; font-size: 16px; font-weight: 700;"><tspan x="0" y="0">GST BIN</tspan></text>
    <g>
      <g>
        <rect x="20" y="51.614700317382812" width="160" height="50" rx="4" ry="4" style="fill: #007884;"></rect>
        <text transform="translate(78.082061767578125 80.121402740478516)" style="fill: #fff; font-family: Roboto-Regular, Roboto; font-size: 16px;"><tspan x="0" y="0">filesrc</tspan></text>
      </g>
      <g>
        <line x1="180" y1="76.614704753355909" x2="199.976654052734375" y2="76.614704753355909" style="fill: none; stroke: #000; stroke-miterlimit: 10;"></line>
        <polygon points="198.955352783203125 80.105137492613721 205 76.614704753355909 198.955352783203125 73.124272014098096 198.955352783203125 80.105137492613721"></polygon>
      </g>
      <g>
        <rect x="205" y="51.614700317382812" width="160" height="50" rx="4" ry="4" style="fill: #007884;"></rect>
        <text transform="translate(253.703166961669922 80.121402740478516)" style="fill: #fff; font-family: Roboto-Regular, Roboto; font-size: 16px;"><tspan x="0" y="0">qtdemux</tspan></text>
      </g>
      <g>
        <line x1="365" y1="76.614704753355909" x2="384.97662353515625" y2="76.614704753355909" style="fill: none; stroke: #000; stroke-miterlimit: 10;"></line>
        <polygon points="383.955322265625 80.105137492613721 390 76.614704753355909 383.955322265625 73.124272014098096 383.955322265625 80.105137492613721"></polygon>
      </g>
      <g>
        <rect x="390" y="51.614700317382812" width="160" height="50" rx="4" ry="4" style="fill: #007884;"></rect>
        <text transform="translate(432.207061767578125 80.121402740478516)" style="fill: #fff; font-family: Roboto-Regular, Roboto; font-size: 16px;"><tspan x="0" y="0">h264parse</tspan></text>
      </g>
      <g>
        <line x1="550" y1="76.614704753355909" x2="569.97662353515625" y2="76.614704753355909" style="fill: none; stroke: #000; stroke-miterlimit: 10;"></line>
        <polygon points="568.955322265625 80.105137492613721 575 76.614704753355909 568.955322265625 73.124272014098096 568.955322265625 80.105137492613721"></polygon>
      </g>
      <g>
        <rect x="575" y="51.614700317382812" width="160" height="50" rx="4" ry="4" style="fill: #007884;"></rect>
        <text transform="translate(609.378936767578125 80.121402740478516)" style="fill: #fff; font-family: Roboto-Regular, Roboto; font-size: 16px;"><tspan x="0" y="0">v4l2h264dec</tspan></text>
      </g>
      <g>
        <line x1="735" y1="76.614704753355909" x2="754.97662353515625" y2="76.614704753355909" style="fill: none; stroke: #000; stroke-miterlimit: 10;"></line>
        <polygon points="753.955322265625 80.105137492613721 760 76.614704753355909 753.955322265625 73.124272014098096 753.955322265625 80.105137492613721"></polygon>
      </g>
      <g>
        <rect x="760" y="51.614700317382812" width="160" height="50" rx="4" ry="4" style="fill: #007884;"></rect>
        <text transform="translate(796.0977783203125 80.121402740478516)" style="fill: #fff; font-family: Roboto-Regular, Roboto; font-size: 16px;"><tspan x="0" y="0">waylandsink</tspan></text>
      </g>
    </g>
    <g>
      <text transform="translate(841.5096435546875 251.5543212890625)" style="font-family: Roboto-Regular, Roboto; font-size: 14px;"><tspan x="0" y="0">Open source</tspan></text>
      <rect x="821.25858739359137" y="239.462848639034746" width="16" height="16" rx="2" ry="2" style="fill: #007884;"></rect>
    </g>
  </g>
</svg>

## Frame skip

The [videorate](https://gstreamer.freedesktop.org/documentation/videorate/) plugin takes an incoming stream
                of timestamped video frames and produces a stream that matches the frame rate of the
                source pad.

- To perform a correction, drop and duplicate the frames.
- To force a conversion to a specific frame rate, use filtered caps on the source
                    pad.

Use any of the following commands to run the use case:

- Single stream 1080p at 30 fps AVC file
                        save:

        gst-launch-1.0 -e qtiqmmfsrc name=camsrc video_0::type=video video_1::type=preview ! video/x-raw,format=NV12,width=1920,height=1080,framerate=30/1 ! queue ! v4l2h264enc capture-io-mode=4 output-io-mode=5 ! queue ! h264parse ! queue ! mp4mux ! queue ! filesink location=/opt/video.mp4Copy to clipboard

Playback from a file stream at 15 fps for frame skip:

        gst-launch-1.0 filesrc location="/opt/video.mp4" ! qtdemux ! queue ! h264parse ! v4l2h264dec capture-io-mode=4 output-io-mode=4 ! videorate ! video/x-raw, framerate=15/1 ! v4l2h264enc capture-io-mode=4 output-io-mode=5 ! h264parse ! mp4mux ! queue ! filesink location="/opt/video15fps.mp4"Copy to clipboard
- 1080p at 30 AVC → encode → decode → videorate at 20 fps → save to
                    file:

        gst-launch-1.0 -e qtiqmmfsrc ! video/x-raw,format=NV12,width=1920,height=1080,framerate=30/1 ! queue ! v4l2h264enc capture-io-mode=4 output-io-mode=5 ! queue ! h264parse ! v4l2h264dec capture-io-mode=4 output-io-mode=4 ! videorate ! video/x-raw,framerate=20/1 ! v4l2h264enc capture-io-mode=4 output-io-mode=5 ! h264parse ! mp4mux ! queue ! filesink location="/opt/video20fps.mp4"Copy to clipboard

## Related information

- [Video playback](https://docs.qualcomm.com/doc/80-70022-50/topic/gst-video-playback-example.html)
- [Video transformation using OpenCV](https://docs.qualcomm.com/doc/80-70022-50/topic/video-playback-using-opencv.html)

**Parent Topic:** [Run multimedia use cases](https://docs.qualcomm.com/doc/80-70022-50/topic/multimedia-use-cases.html)

Last Published: Feb 20, 2026

[Previous Topic
Transform and Transcode use cases](https://docs.qualcomm.com/bundle/publicresource/80-70022-50/topics/transform-and-transcode-use-cases.md) [Next Topic
Audio use cases](https://docs.qualcomm.com/bundle/publicresource/80-70022-50/topics/audio-use-cases.md)