# Four stream batching with LiteRT

Source: [https://docs.qualcomm.com/doc/80-70023-50/topic/four-stream-batching-with-litert.html](https://docs.qualcomm.com/doc/80-70023-50/topic/four-stream-batching-with-litert.html)

This command line shows a four stream batched AI inference, that is, object detection
        use case from a video file.

Run the use case on the target
            device

    gst-launch-1.0 qtivcomposer sink_0::position="<0, 0>" sink_0::dimensions="<640, 360>" name=mixer \
    sink_1::position="<640,  0>" sink_1::dimensions="<640, 360>" \
    sink_2::position="<0, 360>" sink_2::dimensions="<640, 360>" \
    sink_3::position="<640, 360>" sink_3::dimensions="<640, 360>" \
    sink_4::position="<0, 0>" sink_4::dimensions="<640, 360>" sink_4::alpha=0.5 \
    sink_5::position="<640, 0>" sink_5::dimensions="<640, 360>" sink_5::alpha=0.5 \
    sink_6::position="<0, 360>" sink_6::dimensions="<640, 360>" sink_6::alpha=0.5 \
    sink_7::position="<640, 360>" sink_7::dimensions="<640, 360>" sink_7::alpha=0.5 \
    mixer. ! queue name=vcompsrcq ! fpsdisplaysink signal-fps-measurements=true text-overlay=true sync=false video-sink="waylandsink fullscreen=true sync=true" \
    qtimltflite name=tflite_bs4_1 delegate=external external-delegate-path=libQnnTFLiteDelegate.so external-delegate-options="QNNExternalDelegate,backend_type=htp;" model=/opt/yolo_batch4.tflite \
    qtibatch name=batch_1 ! queue name=batchsrcq ! qtimlvconverter ! tflite_bs4_1. tflite_bs4_1. ! qtimldemux name=mldemux_1 \
    filesrc location=/etc/media/video.mp4 ! qtdemux ! h264parse ! v4l2h264dec capture-io-mode=4 output-io-mode=4 ! tee name=split_1 ! queue name=batch_sink1 ! batch_1. split_1. ! queue name=vcomp_sink1 ! mixer. \
    filesrc location=/etc/media/video.mp4 ! qtdemux ! h264parse ! v4l2h264dec capture-io-mode=4 output-io-mode=4 ! tee name=split_2 ! queue name=batch_sink2 ! batch_1. split_2. ! queue name=vcomp_sink2 ! mixer. \
    filesrc location=/etc/media/video.mp4 ! qtdemux ! h264parse ! v4l2h264dec capture-io-mode=4 output-io-mode=4 ! tee name=split_3 ! queue name=batch_sink3 ! batch_1. split_3. ! queue name=vcomp_sink3 ! mixer. \
    filesrc location=/etc/media/video.mp4 ! qtdemux ! h264parse ! v4l2h264dec capture-io-mode=4 output-io-mode=4 ! tee name=split_4 ! queue name=batch_sink4 ! batch_1. split_4. ! queue name=vcomp_sink4 ! mixer. \
    mldemux_1. ! queue name=dq_0 ! qtimlpostprocess settings="{\"confidence\": 75.0}" results=10 module=yolov8 labels=/etc/labels/yolov8.json  ! video/x-raw,width=640,height=360  ! mixer. \
    mldemux_1. ! queue name=dq_1 ! qtimlpostprocess settings="{\"confidence\": 75.0}" results=10 module=yolov8 labels=/etc/labels/yolov8.json  ! video/x-raw,width=640,height=360  ! mixer. \
    mldemux_1. ! queue name=dq_2 ! qtimlpostprocess settings="{\"confidence\": 75.0}" results=10 module=yolov8 labels=/etc/labels/yolov8.json  ! video/x-raw,width=640,height=360  ! mixer. \
    mldemux_1. ! queue name=dq_3 ! qtimlpostprocess settings="{\"confidence\": 75.0}" results=10 module=yolov8 labels=/etc/labels/yolov8.json  ! video/x-raw,width=640,height=360  ! mixer.Copy to clipboard

To stop the use case, use CTRL + C.

The following figure shows the flow of the use case execution:

1. Identifies object scenes in the scene from a video stream, which is coming through a
                camera source.
2. Composes the following using qtivcomposer:
    1. Bounding boxes over objects detected.
    2. Original video stream.
3. Displays the results.

Figure : Pipeline for four stream batching use case with LiteRT
            
            <?xml version="1.0" encoding="UTF-8"?>
<svg xmlns="http://www.w3.org/2000/svg" width="1293.83" height="357.38" viewbox="0 0 1293.83 357.38">
  <g id="Layer_2" data-name="Layer 2">
    <g>
      <rect x=".5" y=".5" width="1292.83" height="356.38" rx="7.5" ry="7.5" style="fill: #fafafa;"></rect>
      <path d="M1285.83,1c3.86,0,7,3.14,7,7v341.38c0,3.86-3.14,7-7,7H8c-3.86,0-7-3.14-7-7V8c0-3.86,3.14-7,7-7h1277.83M1285.83,0H8C3.58,0,0,3.58,0,8v341.38c0,4.42,3.58,8,8,8h1277.83c4.42,0,8-3.58,8-8V8c0-4.42-3.58-8-8-8h0Z" style="fill: #d2d7e1;"></path>
    </g>
    <g>
      <g>
        <text transform="translate(1096.76 339.09)" style="font-family: Roboto-Regular, Roboto; font-size: 14px;"><tspan x="0" y="0">Qualcomm </tspan></text>
        <rect x="1076.51" y="327" width="16" height="16" rx="2" ry="2" style="fill: #2a2aea;"></rect>
      </g>
      <g>
        <text transform="translate(1195.34 339.09)" style="font-family: Roboto-Regular, Roboto; font-size: 14px;"><tspan x="0" y="0">Open source</tspan></text>
        <rect x="1175.09" y="327" width="16" height="16" rx="2" ry="2" style="fill: #007884;"></rect>
      </g>
    </g>
  </g>
  <g id="Layer_3" data-name="Layer 3">
    <g>
      <rect x="1066.37" y="20" width="95" height="285" rx="8" ry="8" style="fill: #2a2aea;"></rect>
      <text transform="translate(1077.22 166.01)" style="fill: #fff; font-family: Roboto-Regular, Roboto; font-size: 12px;"><tspan x="0" y="0">qtivcomposer</tspan></text>
      <rect x="428.42" y="20.18" width="60" height="60" rx="4" ry="4" style="fill: #007884;"></rect>
      <text transform="translate(450.1 53.69)" style="fill: #fff; font-family: Roboto-Regular, Roboto; font-size: 12px;"><tspan x="0" y="0">tee</tspan></text>
      <path d="M48.79,27.68h-20.25c-2.49,0-4.5,2.01-4.5,4.5v36c0,2.49,2.01,4.5,4.5,4.5h27c2.49,0,4.5-2.01,4.5-4.5v-29.25l-11.25-11.25Z" style="fill: none; stroke: #000; stroke-linecap: round; stroke-linejoin: round; stroke-width: 2px;"></path>
      <path d="M46.54,27.68v9c0,2.49,2.01,4.5,4.5,4.5h9" style="fill: none; stroke: #000; stroke-linecap: round; stroke-linejoin: round; stroke-width: 2px;"></path>
      <path d="M37.54,47.93l11.25,6.75-11.25,6.75v-13.5Z" style="fill: none; stroke: #000; stroke-linecap: round; stroke-linejoin: round; stroke-width: 2px;"></path>
      <rect x="73.6" y="20.18" width="56" height="60" rx="4" ry="4" style="fill: #007884;"></rect>
      <g>
        <line x1="129.6" y1="50.18" x2="142.25" y2="50.18" style="fill: none; stroke: #000; stroke-miterlimit: 10;"></line>
        <polygon points="141.08 54.17 147.99 50.18 141.08 46.2 141.08 54.17"></polygon>
      </g>
      <line x1="60.94" y1="50.18" x2="73.6" y2="50.18" style="fill: none; stroke: #000; stroke-miterlimit: 10;"></line>
      <rect x="148.06" y="20.18" width="65" height="60" rx="4" ry="4" style="fill: #007884;"></rect>
      <g>
        <line x1="213.06" y1="50.18" x2="225.7" y2="50.18" style="fill: none; stroke: #000; stroke-miterlimit: 10;"></line>
        <polygon points="224.53 54.17 231.44 50.18 224.53 46.2 224.53 54.17"></polygon>
      </g>
      <rect x="231.51" y="20.18" width="75" height="60" rx="4" ry="4" style="fill: #007884;"></rect>
      <g>
        <line x1="306.51" y1="50.18" x2="319.16" y2="50.18" style="fill: none; stroke: #000; stroke-miterlimit: 10;"></line>
        <polygon points="317.99 54.17 324.9 50.18 317.99 46.2 317.99 54.17"></polygon>
      </g>
      <rect x="324.97" y="20.18" width="85" height="60" rx="4" ry="4" style="fill: #007884;"></rect>
      <g>
        <line x1="409.97" y1="50.18" x2="422.61" y2="50.18" style="fill: none; stroke: #000; stroke-miterlimit: 10;"></line>
        <polygon points="421.44 54.17 428.35 50.18 421.44 46.2 421.44 54.17"></polygon>
      </g>
      <text transform="translate(85.17 53.71)" style="fill: #fff; font-family: Roboto-Regular, Roboto; font-size: 12px;"><tspan x="0" y="0">filesrc</tspan></text>
      <text transform="translate(157.09 54.28)" style="fill: #fff; font-family: Roboto-Regular, Roboto; font-size: 12px;"><tspan x="0" y="0">qtdemux</tspan></text>
      <text transform="translate(240.67 54.28)" style="fill: #fff; font-family: Roboto-Regular, Roboto; font-size: 12px;"><tspan x="0" y="0">h264parse</tspan></text>
      <text transform="translate(332.34 53.69)" style="fill: #fff; font-family: Roboto-Regular, Roboto; font-size: 12px;"><tspan x="0" y="0">V4l2h264dec</tspan></text>
      <rect x="428.42" y="92.62" width="60" height="60" rx="4" ry="4" style="fill: #007884;"></rect>
      <text transform="translate(450.1 126.13)" style="fill: #fff; font-family: Roboto-Regular, Roboto; font-size: 12px;"><tspan x="0" y="0">tee</tspan></text>
      <path d="M48.79,100.12h-20.25c-2.49,0-4.5,2.01-4.5,4.5v36c0,2.49,2.01,4.5,4.5,4.5h27c2.49,0,4.5-2.01,4.5-4.5v-29.25l-11.25-11.25Z" style="fill: none; stroke: #000; stroke-linecap: round; stroke-linejoin: round; stroke-width: 2px;"></path>
      <path d="M46.54,100.12v9c0,2.49,2.01,4.5,4.5,4.5h9" style="fill: none; stroke: #000; stroke-linecap: round; stroke-linejoin: round; stroke-width: 2px;"></path>
      <path d="M37.54,120.37l11.25,6.75-11.25,6.75v-13.5Z" style="fill: none; stroke: #000; stroke-linecap: round; stroke-linejoin: round; stroke-width: 2px;"></path>
      <rect x="73.6" y="92.62" width="56" height="60" rx="4" ry="4" style="fill: #007884;"></rect>
      <g>
        <line x1="129.6" y1="122.62" x2="142.25" y2="122.62" style="fill: none; stroke: #000; stroke-miterlimit: 10;"></line>
        <polygon points="141.08 126.61 147.99 122.62 141.08 118.63 141.08 126.61"></polygon>
      </g>
      <line x1="60.94" y1="122.62" x2="73.6" y2="122.62" style="fill: none; stroke: #000; stroke-miterlimit: 10;"></line>
      <rect x="148.06" y="92.62" width="65" height="60" rx="4" ry="4" style="fill: #007884;"></rect>
      <g>
        <line x1="213.06" y1="122.62" x2="225.7" y2="122.62" style="fill: none; stroke: #000; stroke-miterlimit: 10;"></line>
        <polygon points="224.53 126.61 231.44 122.62 224.53 118.63 224.53 126.61"></polygon>
      </g>
      <rect x="231.51" y="92.62" width="75" height="60" rx="4" ry="4" style="fill: #007884;"></rect>
      <g>
        <line x1="306.51" y1="122.62" x2="319.16" y2="122.62" style="fill: none; stroke: #000; stroke-miterlimit: 10;"></line>
        <polygon points="317.99 126.61 324.9 122.62 317.99 118.63 317.99 126.61"></polygon>
      </g>
      <rect x="324.97" y="92.62" width="85" height="60" rx="4" ry="4" style="fill: #007884;"></rect>
      <g>
        <line x1="409.97" y1="122.62" x2="422.61" y2="122.62" style="fill: none; stroke: #000; stroke-miterlimit: 10;"></line>
        <polygon points="421.44 126.61 428.35 122.62 421.44 118.63 421.44 126.61"></polygon>
      </g>
      <text transform="translate(85.17 126.14)" style="fill: #fff; font-family: Roboto-Regular, Roboto; font-size: 12px;"><tspan x="0" y="0">filesrc</tspan></text>
      <text transform="translate(157.09 126.71)" style="fill: #fff; font-family: Roboto-Regular, Roboto; font-size: 12px;"><tspan x="0" y="0">qtdemux</tspan></text>
      <text transform="translate(240.67 126.71)" style="fill: #fff; font-family: Roboto-Regular, Roboto; font-size: 12px;"><tspan x="0" y="0">h264parse</tspan></text>
      <text transform="translate(332.34 126.13)" style="fill: #fff; font-family: Roboto-Regular, Roboto; font-size: 12px;"><tspan x="0" y="0">V4l2h264dec</tspan></text>
      <rect x="428.42" y="165.06" width="60" height="60" rx="4" ry="4" style="fill: #007884;"></rect>
      <text transform="translate(450.1 198.56)" style="fill: #fff; font-family: Roboto-Regular, Roboto; font-size: 12px;"><tspan x="0" y="0">tee</tspan></text>
      <path d="M48.79,172.56h-20.25c-2.49,0-4.5,2.01-4.5,4.5v36c0,2.49,2.01,4.5,4.5,4.5h27c2.49,0,4.5-2.01,4.5-4.5v-29.25l-11.25-11.25Z" style="fill: none; stroke: #000; stroke-linecap: round; stroke-linejoin: round; stroke-width: 2px;"></path>
      <path d="M46.54,172.56v9c0,2.49,2.01,4.5,4.5,4.5h9" style="fill: none; stroke: #000; stroke-linecap: round; stroke-linejoin: round; stroke-width: 2px;"></path>
      <path d="M37.54,192.81l11.25,6.75-11.25,6.75v-13.5Z" style="fill: none; stroke: #000; stroke-linecap: round; stroke-linejoin: round; stroke-width: 2px;"></path>
      <rect x="73.6" y="165.06" width="56" height="60" rx="4" ry="4" style="fill: #007884;"></rect>
      <g>
        <line x1="129.6" y1="195.06" x2="142.25" y2="195.06" style="fill: none; stroke: #000; stroke-miterlimit: 10;"></line>
        <polygon points="141.08 199.04 147.99 195.06 141.08 191.07 141.08 199.04"></polygon>
      </g>
      <line x1="60.94" y1="195.06" x2="73.6" y2="195.06" style="fill: none; stroke: #000; stroke-miterlimit: 10;"></line>
      <rect x="148.06" y="165.06" width="65" height="60" rx="4" ry="4" style="fill: #007884;"></rect>
      <g>
        <line x1="213.06" y1="195.06" x2="225.7" y2="195.06" style="fill: none; stroke: #000; stroke-miterlimit: 10;"></line>
        <polygon points="224.53 199.04 231.44 195.06 224.53 191.07 224.53 199.04"></polygon>
      </g>
      <rect x="231.51" y="165.06" width="75" height="60" rx="4" ry="4" style="fill: #007884;"></rect>
      <g>
        <line x1="306.51" y1="195.06" x2="319.16" y2="195.06" style="fill: none; stroke: #000; stroke-miterlimit: 10;"></line>
        <polygon points="317.99 199.04 324.9 195.06 317.99 191.07 317.99 199.04"></polygon>
      </g>
      <rect x="324.97" y="165.06" width="85" height="60" rx="4" ry="4" style="fill: #007884;"></rect>
      <g>
        <line x1="409.97" y1="195.06" x2="422.61" y2="195.06" style="fill: none; stroke: #000; stroke-miterlimit: 10;"></line>
        <polygon points="421.44 199.04 428.35 195.06 421.44 191.07 421.44 199.04"></polygon>
      </g>
      <text transform="translate(85.17 198.58)" style="fill: #fff; font-family: Roboto-Regular, Roboto; font-size: 12px;"><tspan x="0" y="0">filesrc</tspan></text>
      <text transform="translate(157.09 199.15)" style="fill: #fff; font-family: Roboto-Regular, Roboto; font-size: 12px;"><tspan x="0" y="0">qtdemux</tspan></text>
      <text transform="translate(240.67 199.15)" style="fill: #fff; font-family: Roboto-Regular, Roboto; font-size: 12px;"><tspan x="0" y="0">h264parse</tspan></text>
      <text transform="translate(332.34 198.56)" style="fill: #fff; font-family: Roboto-Regular, Roboto; font-size: 12px;"><tspan x="0" y="0">V4l2h264dec</tspan></text>
      <rect x="428.42" y="237.49" width="60" height="60" rx="4" ry="4" style="fill: #007884;"></rect>
      <text transform="translate(450.1 271)" style="fill: #fff; font-family: Roboto-Regular, Roboto; font-size: 12px;"><tspan x="0" y="0">tee</tspan></text>
      <path d="M48.79,244.99h-20.25c-2.49,0-4.5,2.01-4.5,4.5v36c0,2.49,2.01,4.5,4.5,4.5h27c2.49,0,4.5-2.01,4.5-4.5v-29.25l-11.25-11.25Z" style="fill: none; stroke: #000; stroke-linecap: round; stroke-linejoin: round; stroke-width: 2px;"></path>
      <path d="M46.54,244.99v9c0,2.49,2.01,4.5,4.5,4.5h9" style="fill: none; stroke: #000; stroke-linecap: round; stroke-linejoin: round; stroke-width: 2px;"></path>
      <path d="M37.54,265.24l11.25,6.75-11.25,6.75v-13.5Z" style="fill: none; stroke: #000; stroke-linecap: round; stroke-linejoin: round; stroke-width: 2px;"></path>
      <rect x="73.6" y="237.49" width="56" height="60" rx="4" ry="4" style="fill: #007884;"></rect>
      <g>
        <line x1="129.6" y1="267.49" x2="142.25" y2="267.49" style="fill: none; stroke: #000; stroke-miterlimit: 10;"></line>
        <polygon points="141.08 271.48 147.99 267.49 141.08 263.5 141.08 271.48"></polygon>
      </g>
      <line x1="60.94" y1="267.49" x2="73.6" y2="267.49" style="fill: none; stroke: #000; stroke-miterlimit: 10;"></line>
      <rect x="148.06" y="237.49" width="65" height="60" rx="4" ry="4" style="fill: #007884;"></rect>
      <g>
        <line x1="213.06" y1="267.49" x2="225.7" y2="267.49" style="fill: none; stroke: #000; stroke-miterlimit: 10;"></line>
        <polygon points="224.53 271.48 231.44 267.49 224.53 263.5 224.53 271.48"></polygon>
      </g>
      <rect x="231.51" y="237.49" width="75" height="60" rx="4" ry="4" style="fill: #007884;"></rect>
      <g>
        <line x1="306.51" y1="267.49" x2="319.16" y2="267.49" style="fill: none; stroke: #000; stroke-miterlimit: 10;"></line>
        <polygon points="317.99 271.48 324.9 267.49 317.99 263.5 317.99 271.48"></polygon>
      </g>
      <rect x="324.97" y="237.49" width="85" height="60" rx="4" ry="4" style="fill: #007884;"></rect>
      <g>
        <line x1="409.97" y1="267.49" x2="422.61" y2="267.49" style="fill: none; stroke: #000; stroke-miterlimit: 10;"></line>
        <polygon points="421.44 271.48 428.35 267.49 421.44 263.5 421.44 271.48"></polygon>
      </g>
      <text transform="translate(85.17 271.01)" style="fill: #fff; font-family: Roboto-Regular, Roboto; font-size: 12px;"><tspan x="0" y="0">filesrc</tspan></text>
      <text transform="translate(157.09 271.58)" style="fill: #fff; font-family: Roboto-Regular, Roboto; font-size: 12px;"><tspan x="0" y="0">qtdemux</tspan></text>
      <text transform="translate(240.67 271.58)" style="fill: #fff; font-family: Roboto-Regular, Roboto; font-size: 12px;"><tspan x="0" y="0">h264parse</tspan></text>
      <text transform="translate(332.34 271)" style="fill: #fff; font-family: Roboto-Regular, Roboto; font-size: 12px;"><tspan x="0" y="0">V4l2h264dec</tspan></text>
      <g>
        <polyline points="488.42 65.18 512.47 65.18 512.47 141.22 518.76 141.22" style="fill: none; stroke: #000; stroke-miterlimit: 10;"></polyline>
        <polygon points="517.59 145.21 524.5 141.22 517.59 137.23 517.59 145.21"></polygon>
      </g>
      <g>
        <line x1="488.42" y1="35.18" x2="1060.62" y2="35.18" style="fill: none; stroke: #000; stroke-miterlimit: 10;"></line>
        <polygon points="1059.46 39.17 1066.37 35.18 1059.46 31.2 1059.46 39.17"></polygon>
      </g>
      <g>
        <polyline points="488.42 122.62 500.45 122.62 500.45 153.25 518.76 153.25" style="fill: none; stroke: #000; stroke-miterlimit: 10;"></polyline>
        <polygon points="517.59 157.24 524.5 153.25 517.59 149.27 517.59 157.24"></polygon>
      </g>
      <g>
        <line x1="488.42" y1="107.62" x2="1060.62" y2="107.62" style="fill: none; stroke: #000; stroke-miterlimit: 10;"></line>
        <polygon points="1059.46 111.61 1066.37 107.62 1059.46 103.63 1059.46 111.61"></polygon>
      </g>
      <g>
        <line x1="488.42" y1="210.06" x2="1060.62" y2="210.06" style="fill: none; stroke: #000; stroke-miterlimit: 10;"></line>
        <polygon points="1059.46 214.04 1066.37 210.06 1059.46 206.07 1059.46 214.04"></polygon>
      </g>
      <g>
        <polyline points="488.42 192.56 500.45 192.56 500.45 167.12 518.76 167.12" style="fill: none; stroke: #000; stroke-miterlimit: 10;"></polyline>
        <polygon points="517.59 171.11 524.5 167.12 517.59 163.13 517.59 171.11"></polygon>
      </g>
      <g>
        <line x1="488.42" y1="282.49" x2="1060.62" y2="282.49" style="fill: none; stroke: #000; stroke-miterlimit: 10;"></line>
        <polygon points="1059.46 286.48 1066.37 282.49 1059.46 278.5 1059.46 286.48"></polygon>
      </g>
      <g>
        <polyline points="488.42 252.49 512.47 252.49 512.47 178.94 518.76 178.94" style="fill: none; stroke: #000; stroke-miterlimit: 10;"></polyline>
        <polygon points="517.59 182.93 524.5 178.94 517.59 174.95 517.59 182.93"></polygon>
      </g>
      <g>
        <line x1="593.97" y1="158.84" x2="606.61" y2="158.84" style="fill: none; stroke: #000; stroke-miterlimit: 10;"></line>
        <polygon points="605.44 162.83 612.35 158.84 605.44 154.85 605.44 162.83"></polygon>
      </g>
      <rect x="612.42" y="131.34" width="100" height="55" rx="4" ry="4" style="fill: #2a2aea;"></rect>
      <g>
        <line x1="712.42" y1="158.84" x2="725.06" y2="158.84" style="fill: none; stroke: #000; stroke-miterlimit: 10;"></line>
        <polygon points="723.9 162.83 730.8 158.84 723.9 154.85 723.9 162.83"></polygon>
      </g>
      <rect x="730.87" y="131.34" width="69.47" height="55" rx="4" ry="4" style="fill: #2a2aea;"></rect>
      <g>
        <line x1="800.34" y1="158.84" x2="812.98" y2="158.84" style="fill: none; stroke: #000; stroke-miterlimit: 10;"></line>
        <polygon points="811.81 162.83 818.72 158.84 811.81 154.85 811.81 162.83"></polygon>
      </g>
      <text transform="translate(620.81 162.34)" style="fill: #fff; font-family: Roboto-Regular, Roboto; font-size: 12px;"><tspan x="0" y="0">qtimlvconverter</tspan></text>
      <text transform="translate(737.5 147.95)" style="fill: #fff; font-family: Roboto-Regular, Roboto; font-size: 12px;"><tspan x="0" y="0">qtimltflite/</tspan><tspan x="-.86" y="14.4">qtimlsnpe/</tspan><tspan x="4.54" y="28.8">qtimlqnn</tspan></text>
      <rect x="524.5" y="131.34" width="69.47" height="55" rx="4" ry="4" style="fill: #2a2aea;"></rect>
      <text transform="translate(537.37 162.34)" style="fill: #fff; font-family: Roboto-Regular, Roboto; font-size: 12px;"><tspan x="0" y="0">qtibatch</tspan></text>
      <rect x="818.79" y="131.34" width="79.47" height="55" rx="4" ry="4" style="fill: #2a2aea;"></rect>
      <g>
        <line x1="898.26" y1="141.39" x2="910.9" y2="141.39" style="fill: none; stroke: #000; stroke-miterlimit: 10;"></line>
        <polygon points="909.73 145.38 916.64 141.39 909.73 137.4 909.73 145.38"></polygon>
      </g>
      <g>
        <line x1="898.26" y1="153.02" x2="910.9" y2="153.02" style="fill: none; stroke: #000; stroke-miterlimit: 10;"></line>
        <polygon points="909.73 157.01 916.64 153.02 909.73 149.03 909.73 157.01"></polygon>
      </g>
      <g>
        <line x1="898.26" y1="164.65" x2="910.9" y2="164.65" style="fill: none; stroke: #000; stroke-miterlimit: 10;"></line>
        <polygon points="909.73 168.64 916.64 164.65 909.73 160.66 909.73 168.64"></polygon>
      </g>
      <g>
        <line x1="898.26" y1="176.28" x2="910.9" y2="176.28" style="fill: none; stroke: #000; stroke-miterlimit: 10;"></line>
        <polygon points="909.73 180.27 916.64 176.28 909.73 172.29 909.73 180.27"></polygon>
      </g>
      <g>
        <line x1="1047.98" y1="158.84" x2="1060.62" y2="158.84" style="fill: none; stroke: #000; stroke-miterlimit: 10;"></line>
        <polygon points="1059.46 162.83 1066.37 158.84 1059.46 154.85 1059.46 162.83"></polygon>
      </g>
      <rect x="916.71" y="131.34" width="131.27" height="55" rx="4" ry="4" style="fill: #2a2aea;"></rect>
      <text transform="translate(826.88 162.34)" style="fill: #fff; font-family: Roboto-Regular, Roboto; font-size: 12px;"><tspan x="0" y="0">qtimldemux</tspan></text>
      <text transform="translate(935.64 162.34)" style="fill: #fff; font-family: Roboto-Regular, Roboto; font-size: 12px;"><tspan x="0" y="0">qtimlpostprocess</tspan></text>
      <g>
        <line x1="1161.37" y1="164.65" x2="1181.26" y2="164.65" style="fill: none; stroke: #000; stroke-miterlimit: 10;"></line>
        <polygon points="1180.1 168.64 1187 164.65 1180.1 160.66 1180.1 168.64"></polygon>
      </g>
      <rect x="1187.96" y="135.11" width="81.83" height="54.77" rx="4" ry="4" style="fill: #007884;"></rect>
      <text transform="translate(1195.13 166.01)" style="fill: #fff; font-family: Roboto-Regular, Roboto; font-size: 12px;"><tspan x="0" y="0">Waylandsink</tspan></text>
      <rect x="1210.88" y="86.47" width="36" height="25.2" rx="4" ry="4" style="fill: none; stroke: #000; stroke-linecap: round; stroke-linejoin: round; stroke-width: 2px;"></rect>
      <line x1="1221.68" y1="118.87" x2="1236.08" y2="118.87" style="fill: none; stroke: #000; stroke-linecap: round; stroke-linejoin: round; stroke-width: 2px;"></line>
      <line x1="1228.88" y1="111.67" x2="1228.88" y2="118.87" style="fill: none; stroke: #000; stroke-linecap: round; stroke-linejoin: round; stroke-width: 2px;"></line>
      <line x1="1228.88" y1="121.36" x2="1228.88" y2="133.94" style="fill: none; stroke: #000; stroke-miterlimit: 10;"></line>
    </g>
  </g>
</svg>

The following table provides the sequential processing stages of the pipeline
            execution:

| Plugin | Description |
| --- | --- |
| File source: filesrc | <ul class="ul" id="four_stream_batching_with_litert__ul_z1z_x4f_w1c"><br>                                <li class="li">Captures the video stream using filesrc, followed by qtdemux,<br>                                    which demultiplexes the stream.</li><br><br>                                <li class="li">Uses tee to split the stream for inferencing.</li><br><br>                            </ul> |
| h264parse | Parses the H.264 video. |
| [v4l2h264dec](https://docs.qualcomm.com/doc/80-70023-50/topic/v4l2h264dec.html) | Decodes the video. |
| [qtibatch](https://docs.qualcomm.com/doc/80-70023-50/topic/qtibatch.html) | <ul class="ul" id="four_stream_batching_with_litert__ul_fbn_bdq_rcc"><br>                                <li class="li">Reads input from the streams on its sink pad.</li><br><br>                                <li class="li">Batches the streams for preprocessing.</li><br><br>                            </ul> |
| [qtimlvconverter](https://docs.qualcomm.com/doc/80-70023-50/topic/qtimlvconverter.html) | <ol class="ol" id="four_stream_batching_with_litert__ol_kgt_hnq_nbc"><br>                                <li class="li">Receives the batched video streams on its sink pad.</li><br><br>                                <li class="li">Performs the following preprocessing on the stream data. This<br>                                    preprocessing is done when the model expects floating-point<br>                                    values as input.<ol class="ol" type="a" id="four_stream_batching_with_litert__ol_drd_jnq_nbc"><br>                                        <li class="li">Color conversion</li><br><br>                                        <li class="li">Scaling (up or down)</li><br><br>                                        <li class="li">Normalization</li><br><br>                                    </ol><br></li><br><br>                            </ol><br><br>                            <br>The tensor stream is used for inferencing in the later stages of the<br>                                pipeline. |
| [qtimltflite](https://docs.qualcomm.com/doc/80-70023-50/topic/qtimltflite.html) | <ol class="ol" id="four_stream_batching_with_litert__ol_l2x_zjq_nbc"><br>                                <li class="li">After the inference runtime receives the tensor stream on its<br>                                    sink pad, it runs the inference.</li><br><br>                                <li class="li">Produces a tensor stream with the inference results on its<br>                                    source pad.</li><br><br>                            </ol> |
| qtimldemux | <ol class="ol" id="four_stream_batching_with_litert__ol_sg2_kdq_rcc"><br>                                <li class="li">Demultiplexes the batched output.</li><br><br>                                <li class="li">Splits the output corresponding to the input streams. </li><br><br>                            </ol> |
| Postprocessing plugins | qtimlpostprocess converts the inference tensors that are received on<br>                            the sink pad into video formats the multimedia plugins can use for<br>                            further processing. |
| [qtivcomposer](https://docs.qualcomm.com/doc/80-70023-50/topic/qtivcomposer.html) | <ol class="ol" id="four_stream_batching_with_litert__ol_dmb_2vr_lbc"><br>                                <li class="li">Composes frames with contents from its sink pads.</li><br><br>                                <li class="li">Pushes the GStreamer buffers containing these composed frames to<br>                                    its source pad.</li><br><br>                            </ol> |
| [Waylandsink](https://docs.qualcomm.com/doc/80-70023-50/topic/waylandsink.html) | <ol class="ol" id="four_stream_batching_with_litert__ol_kjr_fvr_lbc"><br>                                <li class="li">Waylandsink submits the video stream received on its sink pad to<br>                                    Weston.</li><br><br>                                <li class="li">Weston renders the video stream on a local display.</li><br><br>                            </ol> |

**Parent Topic:** [LiteRT use cases](https://docs.qualcomm.com/doc/80-70023-50/topic/tensorflow-lite-use-cases.html)

Last Published: Mar 27, 2026

[Previous Topic
Single stream from camera to RTSP with ML detection](https://docs.qualcomm.com/bundle/publicresource/80-70023-50/topics/single-stream-from-camera-to-rtsp-with-ml-detection.md) [Next Topic
Object detection using USB camera source](https://docs.qualcomm.com/bundle/publicresource/80-70023-50/topics/object-detection-using-usb-camera-source.md)