# 视频分割用例

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

该用例展示了如何将一个视频分割为九路流后进行合成。

1. 完成 [GStreamer 命令行用例](https://docs.qualcomm.com/doc/80-70022-50SC/topic/gstreamer-application-use-cases.html)中提到的前提条件。
2. 在目标设备上运行用例：

        gst-launch-1.0 filesrc location=/opt/<input_file>.mp4 ! qtdemux ! queue ! h264parse ! v4l2h264dec capture-io-mode=4 output-io-mode=4 ! video/x-raw, format=NV12 ! queue ! qtivsplit name=split \
        split. ! queue ! mixer. \
        split. ! queue ! mixer. \
        split. ! queue ! mixer. \
        split. ! queue ! mixer. \
        split. ! queue ! mixer. \
        split. ! queue ! mixer. \
        split. ! queue ! mixer. \
        split. ! queue ! mixer. \
        split. ! queue ! mixer. \
        qtivcomposer name=mixer sink_0::position="<0, 0>" sink_0::dimensions="<640, 360>" \
        sink_1::position="<640, 0>" sink_1::dimensions="<640, 360>" \
        sink_2::position="<1280, 0>" sink_2::dimensions="<640, 360>" \
        sink_3::position="<0, 360>" sink_3::dimensions="<640, 360>" \
        sink_4::position="<640, 360>" sink_4::dimensions="<640, 360>" \
        sink_5::position="<1280, 360>" sink_5::dimensions="<640, 360>" \
        sink_6::position="<0, 720>" sink_6::dimensions="<640, 360>" \
        sink_7::position="<640, 720>" sink_7::dimensions="<640, 360>" \
        sink_8::position="<1280, 720>" sink_8::dimensions="<640, 360>" mixer. ! queue ! waylandsink fullscreen=trueCopy to clipboard

    下图显示了 pipeline 执行流程：

Figure : qtivsplit 从一个输入视频文件 compose 9 个 1080p 流的 pipeline
                    
                    <?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
<!-- Generated by Microsoft Visio, SVG Export pipeline_qtivsplit_composing_1080p_streams_input_videofile.svg pipeline_qtivsplit_composing_10 -->
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:ev="http://www.w3.org/2001/xml-events" xmlns:v="http://schemas.microsoft.com/visio/2003/SVGExtensions/" width="12.3958in" height="1.72917in" viewbox="0 0 892.5 124.5" xml:space="preserve" color-interpolation-filters="sRGB" class="st12"><v:documentproperties v:langid="1033" v:viewmarkup="false"></v:documentproperties>
<style>.svg-1 .st1 { fill: #fafafa; stroke: none; stroke-linecap: butt; stroke-width: 0.75 }
.svg-1 .st2 { fill: #d2d7e1; stroke: none; stroke-linecap: butt; stroke-width: 0.75 }
.svg-1 .st3 { fill: #007884; stroke: none; stroke-linecap: butt; stroke-width: 0.75 }
.svg-1 .st4 { fill: #ffffff; font-family: Roboto; font-size: 1.00001em }
.svg-1 .st5 { fill: #2a2aea; stroke: none; stroke-linecap: butt; stroke-width: 0.75 }
.svg-1 .st6 { fill: #ffffff; font-family: SimHei; font-size: 1.00001em }
.svg-1 .st7 { stroke: #000000; stroke-linecap: butt; stroke-width: 0.75 }
.svg-1 .st8 { fill: #000000; stroke: none; stroke-linecap: butt; stroke-width: 0.75 }
.svg-1 .st9 { fill: none; stroke: none; stroke-linecap: butt; stroke-width: 0.75 }
.svg-1 .st10 { fill: #000000; font-family: Roboto; font-size: 0.874992em }
.svg-1 .st11 { fill: #000000; font-family: SimHei; font-size: 0.874992em }
.svg-1 .st12 { fill: none; fill-rule: evenodd; font-size: 12px; overflow: visible; stroke-linecap: square; stroke-miterlimit: 3 }</style>
<g v:mid="0" v:index="1" v:groupcontext="foregroundPage">	<title>pipeline_qtivsplit_composing_10</title>	<v:pageproperties v:drawingscale="1" v:pagescale="1" v:drawingunits="19" v:shadowoffsetx="9" v:shadowoffsety="-9"></v:pageproperties>	<g id="shape3-1" v:mid="3" v:groupcontext="shape" transform="translate(0.375,-0.37508)">		<title>Sheet.3</title>		<path d="M0 118.88 A5.62513 5.62513 -180 0 0 5.62 124.5 L886.13 124.5 A5.62513 5.62513 -180 0 0 891.75 118.88 L891.75					 6.37 A5.62513 5.62513 -180 0 0 886.13 0.75 L5.62 0.75 A5.62513 5.62513 -180 0 0 -0 6.37 L0 118.88 Z" class="st1"></path>	</g>	<g id="shape4-3" v:mid="4" v:groupcontext="shape">		<title>Sheet.4</title>		<path d="M886.5 0.75 C889.39 0.75 891.75 3.11 891.75 6 L891.75 118.5 C891.75 121.39 889.39 123.75 886.5 123.75 L6 123.75					 C3.11 123.75 0.75 121.39 0.75 118.5 L0.75 6 C0.75 3.11 3.11 0.75 6 0.75 L886.5 0.75 ZM886.5 0 L6 0 C2.69					 0 0 2.69 0 6 L0 118.5 C0 121.81 2.69 124.5 6 124.5 L886.5 124.5 C889.81 124.5 892.5 121.81 892.5 118.5 L892.5					 6 C892.5 2.69 889.81 0 886.5 0 Z" class="st2"></path>	</g>	<g id="shape13-5" v:mid="13" v:groupcontext="shape" transform="translate(335.575,-41.4027)">		<title>Sheet.13</title>		<desc>v4l2h264dec</desc>		<v:textblock v:margins="rect(0,0,0,0)"></v:textblock>		<v:textrect cx="45.7965" cy="90.1527" width="91.6" height="68.6947"></v:textrect>		<path d="M0 121.5 A3.00007 3.00007 -180 0 0 3 124.5 L88.59 124.5 A3.00007 3.00007 -180 0 0 91.59 121.5 L91.59 58.81 A3.00007					 3.00007 -180 0 0 88.59 55.81 L3 55.81 A3.00007 3.00007 -180 0 0 0 58.81 L0 121.5 Z" class="st3"></path>		<text x="11.58" y="93.75" class="st4" v:langid="1033"><v:paragraph v:horizalign="1"></v:paragraph><v:tablist></v:tablist>v4l2h264dec</text>		</g>	<g id="shape15-8" v:mid="15" v:groupcontext="shape" transform="translate(442.434,-41.4027)">		<title>Sheet.15</title>		<desc>qtivsplit</desc>		<v:textblock v:margins="rect(0,0,0,0)"></v:textblock>		<v:textrect cx="45.7965" cy="90.1527" width="91.6" height="68.6947"></v:textrect>		<path d="M-0 121.5 A3.00007 3.00007 -180 0 0 3 124.5 L88.59 124.5 A3.00007 3.00007 -180 0 0 91.59 121.5 L91.59 58.81					 A3.00007 3.00007 -180 0 0 88.59 55.81 L3 55.81 A3.00007 3.00007 -180 0 0 -0 58.81 L0 121.5 Z" class="st5"></path>		<text x="24.73" y="93.75" class="st4" v:langid="1033"><v:paragraph v:horizalign="1"></v:paragraph><v:tablist></v:tablist>qtivsplit</text>		</g>	<g id="shape17-11" v:mid="17" v:groupcontext="shape" transform="translate(572.19,-41.4027)">		<title>Sheet.17</title>		<desc>qtivcomposer</desc>		<v:textblock v:margins="rect(0,0,0,0)"></v:textblock>		<v:textrect cx="45.7965" cy="90.1527" width="91.6" height="68.6947"></v:textrect>		<path d="M0 121.5 A3.00007 3.00007 -180 0 0 3 124.5 L88.59 124.5 A3.00007 3.00007 -180 0 0 91.59 121.5 L91.59 58.81 A3.00007					 3.00007 -180 0 0 88.59 55.81 L3 55.81 A3.00007 3.00007 -180 0 0 -0 58.81 L0 121.5 Z" class="st5"></path>		<text x="9.15" y="93.75" class="st4" v:langid="1033"><v:paragraph v:horizalign="1"></v:paragraph><v:tablist></v:tablist>qtivcomposer</text>		</g>	<g id="shape19-14" v:mid="19" v:groupcontext="shape" transform="translate(679.049,-41.4027)">		<title>Sheet.19</title>		<desc>队列</desc>		<v:textblock v:margins="rect(0,0,0,0)"></v:textblock>		<v:textrect cx="45.7965" cy="90.1527" width="91.6" height="68.6947"></v:textrect>		<path d="M0 121.5 A3.00007 3.00007 -180 0 0 3 124.5 L88.59 124.5 A3.00007 3.00007 -180 0 0 91.59 121.5 L91.59 58.81 A3.00007					 3.00007 -180 0 0 88.59 55.81 L3 55.81 A3.00007 3.00007 -180 0 0 -0 58.81 L0 121.5 Z" class="st3"></path>		<text x="33.8" y="94.15" class="st6" v:langid="1033"><v:paragraph v:horizalign="1"></v:paragraph><v:tablist></v:tablist>队列</text>		</g>	<g id="shape21-17" v:mid="21" v:groupcontext="shape" transform="translate(785.907,-41.4027)">		<title>Sheet.21</title>		<desc>Waylandsink</desc>		<v:textblock v:margins="rect(0,0,0,0)"></v:textblock>		<v:textrect cx="45.7965" cy="90.1527" width="91.6" height="68.6947"></v:textrect>		<path d="M0 121.5 A3.00007 3.00007 -180 0 0 3 124.5 L88.59 124.5 A3.00007 3.00007 -180 0 0 91.59 121.5 L91.59 58.81 A3.00007					 3.00007 -180 0 0 88.59 55.81 L3 55.81 A3.00007 3.00007 -180 0 0 0 58.81 L0 121.5 Z" class="st3"></path>		<text x="12.05" y="93.75" class="st4" v:langid="1033"><v:paragraph v:horizalign="1"></v:paragraph><v:tablist></v:tablist>Waylandsink</text>		</g>	<g id="shape23-20" v:mid="23" v:groupcontext="shape" transform="translate(121.858,-41.4027)">		<title>Sheet.23</title>		<desc>qtdemux</desc>		<v:textblock v:margins="rect(0,0,0,0)"></v:textblock>		<v:textrect cx="45.7965" cy="90.1527" width="91.6" height="68.6947"></v:textrect>		<path d="M0 121.5 A3.00007 3.00007 -180 0 0 3 124.5 L88.59 124.5 A3.00007 3.00007 -180 0 0 91.59 121.5 L91.59 58.81 A3.00007					 3.00007 -180 0 0 88.59 55.81 L3 55.81 A3.00007 3.00007 -180 0 0 -0 58.81 L0 121.5 Z" class="st3"></path>		<text x="22.32" y="93.75" class="st4" v:langid="1033"><v:paragraph v:horizalign="1"></v:paragraph><v:tablist></v:tablist>qtdemux</text>		</g>	<g id="shape26-23" v:mid="26" v:groupcontext="shape" transform="translate(106.593,-75.75)">		<title>Sheet.26</title>		<path d="M0 124.5 L10.96 124.5" class="st7"></path>	</g>	<g id="shape27-26" v:mid="27" v:groupcontext="shape" transform="translate(116.677,-72.7582)">		<title>Sheet.27</title>		<path d="M0 124.5 L5.18 121.51 L0 118.52 L0 124.5 Z" class="st8"></path>	</g>	<g id="shape29-28" v:mid="29" v:groupcontext="shape" transform="translate(213.451,-75.75)">		<title>Sheet.29</title>		<path d="M0 124.5 L10.96 124.5" class="st7"></path>	</g>	<g id="shape30-31" v:mid="30" v:groupcontext="shape" transform="translate(223.536,-72.7582)">		<title>Sheet.30</title>		<path d="M0 124.5 L5.18 121.51 L0 118.52 L0 124.5 Z" class="st8"></path>	</g>	<g id="shape32-33" v:mid="32" v:groupcontext="shape" transform="translate(320.31,-75.75)">		<title>Sheet.32</title>		<path d="M0 124.5 L10.96 124.5" class="st7"></path>	</g>	<g id="shape33-36" v:mid="33" v:groupcontext="shape" transform="translate(330.394,-72.7582)">		<title>Sheet.33</title>		<path d="M0 124.5 L5.18 121.51 L0 118.52 L0 124.5 Z" class="st8"></path>	</g>	<g id="shape35-38" v:mid="35" v:groupcontext="shape" transform="translate(427.168,-75.75)">		<title>Sheet.35</title>		<path d="M0 124.5 L10.96 124.5" class="st7"></path>	</g>	<g id="shape36-41" v:mid="36" v:groupcontext="shape" transform="translate(437.253,-72.7582)">		<title>Sheet.36</title>		<path d="M0 124.5 L5.18 121.51 L0 118.52 L0 124.5 Z" class="st8"></path>	</g>	<g id="shape39-43" v:mid="39" v:groupcontext="shape" transform="translate(534.027,-107.553)">		<title>Sheet.39</title>		<path d="M0 124.5 L34.4 124.5" class="st7"></path>	</g>	<g id="shape40-46" v:mid="40" v:groupcontext="shape" transform="translate(567.657,-104.935)">		<title>Sheet.40</title>		<path d="M0 124.5 L4.53 121.88 L0 119.26 L0 124.5 Z" class="st8"></path>	</g>	<g id="shape42-48" v:mid="42" v:groupcontext="shape" transform="translate(534.027,-99.7583)">		<title>Sheet.42</title>		<path d="M0 124.5 L34.4 124.5" class="st7"></path>	</g>	<g id="shape43-51" v:mid="43" v:groupcontext="shape" transform="translate(567.657,-97.1405)">		<title>Sheet.43</title>		<path d="M0 124.5 L4.53 121.88 L0 119.26 L0 124.5 Z" class="st8"></path>	</g>	<g id="shape45-53" v:mid="45" v:groupcontext="shape" transform="translate(534.027,-91.9635)">		<title>Sheet.45</title>		<path d="M0 124.5 L34.4 124.5" class="st7"></path>	</g>	<g id="shape46-56" v:mid="46" v:groupcontext="shape" transform="translate(567.657,-89.3457)">		<title>Sheet.46</title>		<path d="M0 124.5 L4.53 121.88 L0 119.26 L0 124.5 Z" class="st8"></path>	</g>	<g id="shape48-58" v:mid="48" v:groupcontext="shape" transform="translate(534.027,-84.1687)">		<title>Sheet.48</title>		<path d="M0 124.5 L34.4 124.5" class="st7"></path>	</g>	<g id="shape49-61" v:mid="49" v:groupcontext="shape" transform="translate(567.657,-81.5509)">		<title>Sheet.49</title>		<path d="M0 124.5 L4.53 121.88 L0 119.26 L0 124.5 Z" class="st8"></path>	</g>	<g id="shape51-63" v:mid="51" v:groupcontext="shape" transform="translate(534.027,-76.3739)">		<title>Sheet.51</title>		<path d="M0 124.5 L34.4 124.5" class="st7"></path>	</g>	<g id="shape52-66" v:mid="52" v:groupcontext="shape" transform="translate(567.657,-73.7561)">		<title>Sheet.52</title>		<path d="M0 124.5 L4.53 121.88 L0 119.26 L0 124.5 Z" class="st8"></path>	</g>	<g id="shape54-68" v:mid="54" v:groupcontext="shape" transform="translate(534.027,-68.5791)">		<title>Sheet.54</title>		<path d="M0 124.5 L34.4 124.5" class="st7"></path>	</g>	<g id="shape55-71" v:mid="55" v:groupcontext="shape" transform="translate(567.657,-65.9613)">		<title>Sheet.55</title>		<path d="M0 124.5 L4.53 121.88 L0 119.26 L0 124.5 Z" class="st8"></path>	</g>	<g id="shape57-73" v:mid="57" v:groupcontext="shape" transform="translate(534.027,-60.7843)">		<title>Sheet.57</title>		<path d="M0 124.5 L34.4 124.5" class="st7"></path>	</g>	<g id="shape58-76" v:mid="58" v:groupcontext="shape" transform="translate(567.657,-58.1665)">		<title>Sheet.58</title>		<path d="M0 124.5 L4.53 121.88 L0 119.26 L0 124.5 Z" class="st8"></path>	</g>	<g id="shape60-78" v:mid="60" v:groupcontext="shape" transform="translate(534.027,-52.9895)">		<title>Sheet.60</title>		<path d="M0 124.5 L34.4 124.5" class="st7"></path>	</g>	<g id="shape61-81" v:mid="61" v:groupcontext="shape" transform="translate(567.657,-50.3717)">		<title>Sheet.61</title>		<path d="M0 124.5 L4.53 121.88 L0 119.26 L0 124.5 Z" class="st8"></path>	</g>	<g id="shape63-83" v:mid="63" v:groupcontext="shape" transform="translate(534.027,-45.1947)">		<title>Sheet.63</title>		<path d="M0 124.5 L34.4 124.5" class="st7"></path>	</g>	<g id="shape64-86" v:mid="64" v:groupcontext="shape" transform="translate(567.657,-42.5769)">		<title>Sheet.64</title>		<path d="M0 124.5 L4.53 121.88 L0 119.26 L0 124.5 Z" class="st8"></path>	</g>	<g id="shape66-88" v:mid="66" v:groupcontext="shape" transform="translate(663.783,-75.75)">		<title>Sheet.66</title>		<path d="M0 124.5 L10.96 124.5" class="st7"></path>	</g>	<g id="shape67-91" v:mid="67" v:groupcontext="shape" transform="translate(673.868,-72.7582)">		<title>Sheet.67</title>		<path d="M0 124.5 L5.18 121.51 L0 118.52 L0 124.5 Z" class="st8"></path>	</g>	<g id="shape69-93" v:mid="69" v:groupcontext="shape" transform="translate(770.642,-75.75)">		<title>Sheet.69</title>		<path d="M0 124.5 L10.96 124.5" class="st7"></path>	</g>	<g id="shape70-96" v:mid="70" v:groupcontext="shape" transform="translate(780.726,-72.7582)">		<title>Sheet.70</title>		<path d="M0 124.5 L5.18 121.51 L0 118.52 L0 124.5 Z" class="st8"></path>	</g>	<g id="shape71-98" v:mid="71" v:groupcontext="shape" transform="translate(228.717,-41.4027)">		<title>Sheet.71</title>		<desc>h264parse</desc>		<v:textblock v:margins="rect(0,0,0,0)"></v:textblock>		<v:textrect cx="45.7965" cy="90.1527" width="91.6" height="68.6947"></v:textrect>		<path d="M0 121.5 A3.00007 3.00007 -180 0 0 3 124.5 L88.59 124.5 A3.00007 3.00007 -180 0 0 91.59 121.5 L91.59 58.81 A3.00007					 3.00007 -180 0 0 88.59 55.81 L3 55.81 A3.00007 3.00007 -180 0 0 0 58.81 L0 121.5 Z" class="st3"></path>		<text x="17.45" y="93.75" class="st4" v:langid="1033"><v:paragraph v:horizalign="1"></v:paragraph><v:tablist></v:tablist>h264parse</text>		</g>	<g id="shape73-101" v:mid="73" v:groupcontext="shape" transform="translate(15,-41.4027)">		<title>Sheet.73</title>		<desc>filesrc</desc>		<v:textblock v:margins="rect(0,0,0,0)"></v:textblock>		<v:textrect cx="45.7965" cy="90.1527" width="91.6" height="68.6947"></v:textrect>		<path d="M0 121.5 A3.00007 3.00007 -180 0 0 3 124.5 L88.59 124.5 A3.00007 3.00007 -180 0 0 91.59 121.5 L91.59 58.81 A3.00007					 3.00007 -180 0 0 88.59 55.81 L3 55.81 A3.00007 3.00007 -180 0 0 -0 58.81 L0 121.5 Z" class="st3"></path>		<text x="29.36" y="93.75" class="st4" v:langid="1033"><v:paragraph v:horizalign="1"></v:paragraph><v:tablist></v:tablist>filesrc</text>		</g>	<g id="group75-104" transform="translate(767.375,-14.7814)" v:mid="75" v:groupcontext="group">		<title>Sheet.75</title>		<g id="shape7-105" v:mid="7" v:groupcontext="shape" transform="translate(15.1882,0)">			<title>Sheet.7</title>			<desc>Qualcomm</desc>			<v:textblock v:margins="rect(0,0,0,0)"></v:textblock>			<v:textrect cx="27.6162" cy="118.2" width="55.24" height="12.6"></v:textrect>			<rect x="0" y="111.9" width="55.2324" height="12.6" class="st9"></rect>			<text x="0" y="121.35" class="st10" v:langid="1033"><v:paragraph></v:paragraph><v:tablist></v:tablist>Qualcomm  </text>			</g>		<g id="shape8-108" v:mid="8" v:groupcontext="shape" transform="translate(6.29496E-14,-0.218607)">			<title>Sheet.8</title>			<path d="M0 123 A1.50003 1.50003 -180 0 0 1.5 124.5 L10.5 124.5 A1.50003 1.50003 -180 0 0 12 123 L12 114 A1.50003						 1.50003 -180 0 0 10.5 112.5 L1.5 112.5 A1.50003 1.50003 -180 0 0 0 114 L0 123 Z" class="st5"></path>		</g>		<g id="shape10-110" v:mid="10" v:groupcontext="shape" transform="translate(89.1246,0)">			<title>Sheet.10</title>			<desc>开源</desc>			<v:textblock v:margins="rect(0,0,0,0)"></v:textblock>			<v:textrect cx="10.5" cy="118.2" width="21" height="12.6"></v:textrect>			<rect x="0" y="111.9" width="21" height="12.6" class="st9"></rect>			<text x="0" y="121.69" class="st11" v:langid="1033"><v:paragraph></v:paragraph><v:tablist></v:tablist>开源</text>			</g>		<g id="shape11-113" v:mid="11" v:groupcontext="shape" transform="translate(73.9363,-0.218607)">			<title>Sheet.11</title>			<path d="M0 123 A1.50003 1.50003 -180 0 0 1.5 124.5 L10.5 124.5 A1.50003 1.50003 -180 0 0 12 123 L12 114 A1.50003						 1.50003 -180 0 0 10.5 112.5 L1.5 112.5 A1.50003 1.50003 -180 0 0 0 114 L0 123 Z" class="st3"></path>		</g>	</g></g>
</svg>

**Parent Topic:** [运行多媒体用例](https://docs.qualcomm.com/doc/80-70022-50SC/topic/multimedia-use-cases.html)

Last Published: Nov 05, 2025

[Previous Topic
视频叠加用例](https://docs.qualcomm.com/bundle/publicresource/80-70022-50SC/topics/overlay-use-cases.md) [Next Topic
Qualcomm GStreamer 架构和插件](https://docs.qualcomm.com/bundle/publicresource/80-70022-50SC/topics/gst-plugin-architecture.md)