# 视频播放用例

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

视频播放用例展示了从文件中播放 4K 视频流的过程，该文件采用 MP4 等媒体容器格式。

- 在运行用例之前，请确保完成 [GStreamer 命令行用例](https://docs.qualcomm.com/doc/80-70022-50SC/topic/gstreamer-application-use-cases.html)中提到的先决条件。
- 在目标设备的 SSH shell 中运行所有命令。
- 要停止用例，请使用 CTRL +
                C。

Note: 如需播放 YUV 文件，请从设备中拉取 YUV dump 并使用主机上的 YUV 播放器进行播放。例如，您可以选择 `YUV420planarNV12`格式，并使用 `1920 & 1088` 作为步幅和扫描线。

## 单路流视频播放（H.264）

- 解码并显示单个流 (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 : 用于解码和显示单个流（H.264）的 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_decode_display_single_stream_h264.svg pipeline_decode_display_single_ -->
<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="9.79167in" height="1.52361in" viewbox="0 0 705 109.7" xml:space="preserve" color-interpolation-filters="sRGB" class="st10"><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: #000000; font-family: Roboto; font-size: 1.00001em; font-weight: bold }
.svg-1 .st3 { fill: #d2d7e1; stroke: none; stroke-linecap: butt; stroke-width: 0.75 }
.svg-1 .st4 { fill: #007884; stroke: none; stroke-linecap: butt; stroke-width: 0.75 }
.svg-1 .st5 { fill: #ffffff; font-family: Roboto; font-size: 1.00001em }
.svg-1 .st6 { stroke: #000000; stroke-linecap: butt; stroke-width: 0.75 }
.svg-1 .st7 { fill: #000000; stroke: none; stroke-linecap: butt; stroke-width: 0.75 }
.svg-1 .st8 { fill: none; stroke: none; stroke-linecap: butt; stroke-width: 0.75 }
.svg-1 .st9 { fill: #000000; font-family: SimHei; font-size: 0.874992em }
.svg-1 .st10 { 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_decode_display_single_</title>	<v:pageproperties v:drawingscale="1" v:pagescale="1" v:drawingunits="19" v:shadowoffsetx="9" v:shadowoffsety="-9"></v:pageproperties>	<g id="shape2-1" v:mid="2" v:groupcontext="shape" transform="translate(0.375,-0.374863)">		<title>Sheet.2</title>		<desc>GST BIN</desc>		<v:textblock v:margins="rect(7.2,0,0,0)" v:verticalalign="0"></v:textblock>		<v:textrect cx="352.125" cy="55.2248" width="704.26" height="108.95"></v:textrect>		<path d="M0 104.07 A5.62513 5.62513 -180 0 0 5.62 109.7 L698.63 109.7 A5.62513 5.62513 -180 0 0 704.25 104.07 L704.25					 6.38 A5.62513 5.62513 -180 0 0 698.63 0.75 L5.62 0.75 A5.62513 5.62513 -180 0 0 -0 6.38 L0 104.07 Z" class="st1"></path>		<text x="329.33" y="18.75" class="st2" v:langid="1033"><v:paragraph v:horizalign="1"></v:paragraph><v:tablist></v:tablist>GST BIN</text>		</g>	<g id="shape3-4" v:mid="3" v:groupcontext="shape">		<title>Sheet.3</title>		<path d="M699 0.75 C701.89 0.75 704.25 3.11 704.25 6 L704.25 103.7 C704.25 106.59 701.89 108.95 699 108.95 L6 108.95					 C3.11 108.95 0.75 106.59 0.75 103.7 L0.75 6 C0.75 3.11 3.11 0.75 6 0.75 L699 0.75 ZM699 0 L6 0 C2.69 0 0					 2.69 0 6 L0 103.7 C0 107.01 2.69 109.7 6 109.7 L699 109.7 C702.31 109.7 705 107.01 705 103.7 L705 6 C705					 2.69 702.31 0 699 0 Z" class="st3"></path>	</g>	<g id="shape8-6" v:mid="8" v:groupcontext="shape" transform="translate(15,-34.998)">		<title>Sheet.8</title>		<desc>filesrc</desc>		<v:textblock v:margins="rect(0,0,0,0)"></v:textblock>		<v:textrect cx="60" cy="90.9496" width="120.01" height="37.5"></v:textrect>		<path d="M0 106.7 A3.00007 3.00007 -180 0 0 3 109.7 L117 109.7 A3.00007 3.00007 -180 0 0 120 106.7 L120 75.2 A3.00007					 3.00007 -180 0 0 117 72.2 L3 72.2 A3.00007 3.00007 -180 0 0 0 75.2 L0 106.7 Z" class="st4"></path>		<text x="43.56" y="94.55" class="st5" v:langid="1033"><v:paragraph v:horizalign="1"></v:paragraph><v:tablist></v:tablist>filesrc</text>		</g>	<g id="group10-9" transform="translate(135,-51.1302)" v:mid="10" v:groupcontext="group">		<title>Sheet.10</title>		<g id="shape11-10" v:mid="11" v:groupcontext="shape" transform="translate(0,-2.61782)">			<title>Sheet.11</title>			<path d="M0 109.7 L14.98 109.7" class="st6"></path>		</g>		<g id="shape12-13" v:mid="12" v:groupcontext="shape" transform="translate(14.2165,4.26326E-14)">			<title>Sheet.12</title>			<path d="M0 109.7 L4.53 107.08 L0 104.46 L0 109.7 Z" class="st7"></path>		</g>	</g>	<g id="shape14-15" v:mid="14" v:groupcontext="shape" transform="translate(153.75,-34.998)">		<title>Sheet.14</title>		<desc>qtdemux</desc>		<v:textblock v:margins="rect(0,0,0,0)"></v:textblock>		<v:textrect cx="60" cy="90.9496" width="120.01" height="37.5"></v:textrect>		<path d="M0 106.7 A3.00007 3.00007 -180 0 0 3 109.7 L117 109.7 A3.00007 3.00007 -180 0 0 120 106.7 L120 75.2 A3.00007					 3.00007 -180 0 0 117 72.2 L3 72.2 A3.00007 3.00007 -180 0 0 0 75.2 L0 106.7 Z" class="st4"></path>		<text x="36.53" y="94.55" class="st5" v:langid="1033"><v:paragraph v:horizalign="1"></v:paragraph><v:tablist></v:tablist>qtdemux</text>		</g>	<g id="group16-18" transform="translate(273.75,-51.1302)" v:mid="16" v:groupcontext="group">		<title>Sheet.16</title>		<g id="shape17-19" v:mid="17" v:groupcontext="shape" transform="translate(0,-2.61782)">			<title>Sheet.17</title>			<path d="M0 109.7 L14.98 109.7" class="st6"></path>		</g>		<g id="shape18-22" v:mid="18" v:groupcontext="shape" transform="translate(14.2165,4.26326E-14)">			<title>Sheet.18</title>			<path d="M0 109.7 L4.53 107.08 L0 104.46 L0 109.7 Z" class="st7"></path>		</g>	</g>	<g id="shape20-24" v:mid="20" v:groupcontext="shape" transform="translate(292.5,-34.998)">		<title>Sheet.20</title>		<desc>h264parse</desc>		<v:textblock v:margins="rect(0,0,0,0)"></v:textblock>		<v:textrect cx="60" cy="90.9496" width="120" height="37.5"></v:textrect>		<path d="M0 106.7 A3.00007 3.00007 -180 0 0 3 109.7 L117 109.7 A3.00007 3.00007 -180 0 0 120 106.7 L120 75.2 A3.00007					 3.00007 -180 0 0 117 72.2 L3 72.2 A3.00007 3.00007 -180 0 0 0 75.2 L0 106.7 Z" class="st4"></path>		<text x="31.65" y="94.55" class="st5" v:langid="1033"><v:paragraph v:horizalign="1"></v:paragraph><v:tablist></v:tablist>h264parse</text>		</g>	<g id="group22-27" transform="translate(412.5,-51.1302)" v:mid="22" v:groupcontext="group">		<title>Sheet.22</title>		<g id="shape23-28" v:mid="23" v:groupcontext="shape" transform="translate(0,-2.61782)">			<title>Sheet.23</title>			<path d="M0 109.7 L14.98 109.7" class="st6"></path>		</g>		<g id="shape24-31" v:mid="24" v:groupcontext="shape" transform="translate(14.2165,4.26326E-14)">			<title>Sheet.24</title>			<path d="M0 109.7 L4.53 107.08 L0 104.46 L0 109.7 Z" class="st7"></path>		</g>	</g>	<g id="shape26-33" v:mid="26" v:groupcontext="shape" transform="translate(431.25,-34.998)">		<title>Sheet.26</title>		<desc>v4l2h264dec</desc>		<v:textblock v:margins="rect(0,0,0,0)"></v:textblock>		<v:textrect cx="60" cy="90.9496" width="120" height="37.5"></v:textrect>		<path d="M0 106.7 A3.00007 3.00007 -180 0 0 3 109.7 L117 109.7 A3.00007 3.00007 -180 0 0 120 106.7 L120 75.2 A3.00007					 3.00007 -180 0 0 117 72.2 L3 72.2 A3.00007 3.00007 -180 0 0 0 75.2 L0 106.7 Z" class="st4"></path>		<text x="25.78" y="94.55" class="st5" v:langid="1033"><v:paragraph v:horizalign="1"></v:paragraph><v:tablist></v:tablist>v4l2h264dec</text>		</g>	<g id="group28-36" transform="translate(551.25,-51.1302)" v:mid="28" v:groupcontext="group">		<title>Sheet.28</title>		<g id="shape29-37" v:mid="29" v:groupcontext="shape" transform="translate(0,-2.61782)">			<title>Sheet.29</title>			<path d="M0 109.7 L14.98 109.7" class="st6"></path>		</g>		<g id="shape30-40" v:mid="30" v:groupcontext="shape" transform="translate(14.2165,4.26326E-14)">			<title>Sheet.30</title>			<path d="M0 109.7 L4.53 107.08 L0 104.46 L0 109.7 Z" class="st7"></path>		</g>	</g>	<g id="shape32-42" v:mid="32" v:groupcontext="shape" transform="translate(570,-34.998)">		<title>Sheet.32</title>		<desc>Waylandsink</desc>		<v:textblock v:margins="rect(0,0,0,0)"></v:textblock>		<v:textrect cx="60" cy="90.9496" width="120" height="37.5"></v:textrect>		<path d="M0 106.7 A3.00007 3.00007 -180 0 0 3 109.7 L117 109.7 A3.00007 3.00007 -180 0 0 120 106.7 L120 75.2 A3.00007					 3.00007 -180 0 0 117 72.2 L3 72.2 A3.00007 3.00007 -180 0 0 0 75.2 L0 106.7 Z" class="st4"></path>		<text x="26.26" y="94.55" class="st5" v:langid="1033"><v:paragraph v:horizalign="1"></v:paragraph><v:tablist></v:tablist>Waylandsink</text>		</g>	<g id="group37-45" transform="translate(653.812,-11.5294)" v:mid="37" v:groupcontext="group">		<title>Sheet.37</title>		<g id="shape35-46" v:mid="35" v:groupcontext="shape" transform="translate(15.1883,0)">			<title>Sheet.35</title>			<desc>开源</desc>			<v:textblock v:margins="rect(0,0,0,0)"></v:textblock>			<v:textrect cx="10.5" cy="103.4" width="21.01" height="12.6"></v:textrect>			<rect x="0" y="97.0996" width="21" height="12.6" class="st8"></rect>			<text x="0" y="106.89" class="st9" v:langid="1033"><v:paragraph></v:paragraph><v:tablist></v:tablist>开源</text>			</g>		<g id="shape36-49" v:mid="36" v:groupcontext="shape" transform="translate(1.26898E-13,-0.218613)">			<title>Sheet.36</title>			<path d="M0 108.2 A1.50003 1.50003 -180 0 0 1.5 109.7 L10.5 109.7 A1.50003 1.50003 -180 0 0 12 108.2 L12 99.2 A1.50003						 1.50003 -180 0 0 10.5 97.7 L1.5 97.7 A1.50003 1.50003 -180 0 0 0 99.2 L0 108.2 Z" class="st4"></path>		</g>	</g></g>
</svg>
- 解码并将流保存到文件 (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 : 解码并将流保存到文件（H.264） 的 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_decode_save_stream_file_h264.svg Layer_2 -->
<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="9.79167in" height="1.52361in" viewbox="0 0 705 109.7" xml:space="preserve" color-interpolation-filters="sRGB" class="st10"><v:documentproperties v:langid="1033" v:viewmarkup="false"></v:documentproperties>
<style>.svg-2 .st1 { fill: #fafafa; stroke: none; stroke-linecap: butt; stroke-width: 0.75 }
.svg-2 .st2 { fill: #000000; font-family: Roboto; font-size: 1.00001em; font-weight: bold }
.svg-2 .st3 { fill: #d2d7e1; stroke: none; stroke-linecap: butt; stroke-width: 0.75 }
.svg-2 .st4 { fill: #007884; stroke: none; stroke-linecap: butt; stroke-width: 0.75 }
.svg-2 .st5 { fill: #ffffff; font-family: Roboto; font-size: 1.00001em }
.svg-2 .st6 { stroke: #000000; stroke-linecap: butt; stroke-width: 0.75 }
.svg-2 .st7 { fill: #000000; stroke: none; stroke-linecap: butt; stroke-width: 0.75 }
.svg-2 .st8 { fill: none; stroke: none; stroke-linecap: butt; stroke-width: 0.75 }
.svg-2 .st9 { fill: #000000; font-family: SimHei; font-size: 0.874992em }
.svg-2 .st10 { 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>Layer_2</title>	<v:pageproperties v:drawingscale="1" v:pagescale="1" v:drawingunits="19" v:shadowoffsetx="9" v:shadowoffsety="-9"></v:pageproperties>	<g id="shape2-1" v:mid="2" v:groupcontext="shape" transform="translate(0.375,-0.375069)">		<title>Sheet.2</title>		<desc>GST BIN</desc>		<v:textblock v:margins="rect(7.2,0,0,0)" v:verticalalign="0"></v:textblock>		<v:textrect cx="352.125" cy="55.2248" width="704.26" height="108.95"></v:textrect>		<path d="M0 104.07 A5.62513 5.62513 -180 0 0 5.62 109.7 L698.63 109.7 A5.62513 5.62513 -180 0 0 704.25 104.07 L704.25					 6.38 A5.62513 5.62513 -180 0 0 698.63 0.75 L5.62 0.75 A5.62513 5.62513 -180 0 0 -0 6.38 L0 104.07 Z" class="st1"></path>		<text x="329.33" y="18.75" class="st2" v:langid="1033"><v:paragraph v:horizalign="1"></v:paragraph><v:tablist></v:tablist>GST BIN</text>		</g>	<g id="shape3-4" v:mid="3" v:groupcontext="shape">		<title>Sheet.3</title>		<path d="M699 0.75 C701.89 0.75 704.25 3.11 704.25 6 L704.25 103.7 C704.25 106.59 701.89 108.95 699 108.95 L6 108.95					 C3.11 108.95 0.75 106.59 0.75 103.7 L0.75 6 C0.75 3.11 3.11 0.75 6 0.75 L699 0.75 ZM699 0 L6 0 C2.69 0 0					 2.69 0 6 L0 103.7 C0 107.01 2.69 109.7 6 109.7 L699 109.7 C702.31 109.7 705 107.01 705 103.7 L705 6 C705					 2.69 702.31 0 699 0 Z" class="st3"></path>	</g>	<g id="shape10-6" v:mid="10" v:groupcontext="shape" transform="translate(15,-34.0417)">		<title>Sheet.10</title>		<desc>filesrc</desc>		<v:textblock v:margins="rect(0,0,0,0)"></v:textblock>		<v:textrect cx="60" cy="90.9496" width="120.01" height="37.5"></v:textrect>		<path d="M0 106.7 A3.00007 3.00007 -180 0 0 3 109.7 L117 109.7 A3.00007 3.00007 -180 0 0 120 106.7 L120 75.2 A3.00007					 3.00007 -180 0 0 117 72.2 L3 72.2 A3.00007 3.00007 -180 0 0 0 75.2 L0 106.7 Z" class="st4"></path>		<text x="43.56" y="94.55" class="st5" v:langid="1033"><v:paragraph v:horizalign="1"></v:paragraph><v:tablist></v:tablist>filesrc</text>		</g>	<g id="shape13-9" v:mid="13" v:groupcontext="shape" transform="translate(135,-52.7917)">		<title>Sheet.13</title>		<path d="M0 109.7 L14.98 109.7" class="st6"></path>	</g>	<g id="shape14-12" v:mid="14" v:groupcontext="shape" transform="translate(149.217,-50.1739)">		<title>Sheet.14</title>		<path d="M0 109.7 L4.53 107.08 L0 104.46 L0 109.7 Z" class="st7"></path>	</g>	<g id="shape16-14" v:mid="16" v:groupcontext="shape" transform="translate(153.75,-34.0417)">		<title>Sheet.16</title>		<desc>qtdemux</desc>		<v:textblock v:margins="rect(0,0,0,0)"></v:textblock>		<v:textrect cx="60" cy="90.9496" width="120" height="37.5"></v:textrect>		<path d="M0 106.7 A3.00007 3.00007 -180 0 0 3 109.7 L117 109.7 A3.00007 3.00007 -180 0 0 120 106.7 L120 75.2 A3.00007					 3.00007 -180 0 0 117 72.2 L3 72.2 A3.00007 3.00007 -180 0 0 0 75.2 L0 106.7 Z" class="st4"></path>		<text x="36.53" y="94.55" class="st5" v:langid="1033"><v:paragraph v:horizalign="1"></v:paragraph><v:tablist></v:tablist>qtdemux</text>		</g>	<g id="shape19-17" v:mid="19" v:groupcontext="shape" transform="translate(273.75,-52.7917)">		<title>Sheet.19</title>		<path d="M0 109.7 L14.98 109.7" class="st6"></path>	</g>	<g id="shape20-20" v:mid="20" v:groupcontext="shape" transform="translate(287.966,-50.1739)">		<title>Sheet.20</title>		<path d="M0 109.7 L4.53 107.08 L0 104.46 L0 109.7 Z" class="st7"></path>	</g>	<g id="shape22-22" v:mid="22" v:groupcontext="shape" transform="translate(292.5,-34.0417)">		<title>Sheet.22</title>		<desc>h264parse</desc>		<v:textblock v:margins="rect(0,0,0,0)"></v:textblock>		<v:textrect cx="60" cy="90.9496" width="120" height="37.5"></v:textrect>		<path d="M0 106.7 A3.00007 3.00007 -180 0 0 3 109.7 L117 109.7 A3.00007 3.00007 -180 0 0 120 106.7 L120 75.2 A3.00007					 3.00007 -180 0 0 117 72.2 L3 72.2 A3.00007 3.00007 -180 0 0 0 75.2 L0 106.7 Z" class="st4"></path>		<text x="31.65" y="94.55" class="st5" v:langid="1033"><v:paragraph v:horizalign="1"></v:paragraph><v:tablist></v:tablist>h264parse</text>		</g>	<g id="shape25-25" v:mid="25" v:groupcontext="shape" transform="translate(412.5,-52.7917)">		<title>Sheet.25</title>		<path d="M0 109.7 L14.98 109.7" class="st6"></path>	</g>	<g id="shape26-28" v:mid="26" v:groupcontext="shape" transform="translate(426.716,-50.1739)">		<title>Sheet.26</title>		<path d="M0 109.7 L4.53 107.08 L0 104.46 L0 109.7 Z" class="st7"></path>	</g>	<g id="shape28-30" v:mid="28" v:groupcontext="shape" transform="translate(431.25,-34.0417)">		<title>Sheet.28</title>		<desc>v4l2h264dec</desc>		<v:textblock v:margins="rect(0,0,0,0)"></v:textblock>		<v:textrect cx="60" cy="90.9496" width="120.01" height="37.5"></v:textrect>		<path d="M0 106.7 A3.00007 3.00007 -180 0 0 3 109.7 L117 109.7 A3.00007 3.00007 -180 0 0 120 106.7 L120 75.2 A3.00007					 3.00007 -180 0 0 117 72.2 L3 72.2 A3.00007 3.00007 -180 0 0 0 75.2 L0 106.7 Z" class="st4"></path>		<text x="25.78" y="94.55" class="st5" v:langid="1033"><v:paragraph v:horizalign="1"></v:paragraph><v:tablist></v:tablist>v4l2h264dec</text>		</g>	<g id="shape31-33" v:mid="31" v:groupcontext="shape" transform="translate(551.25,-52.7917)">		<title>Sheet.31</title>		<path d="M0 109.7 L14.98 109.7" class="st6"></path>	</g>	<g id="shape32-36" v:mid="32" v:groupcontext="shape" transform="translate(565.466,-50.1739)">		<title>Sheet.32</title>		<path d="M0 109.7 L4.53 107.08 L0 104.46 L0 109.7 Z" class="st7"></path>	</g>	<g id="shape34-38" v:mid="34" v:groupcontext="shape" transform="translate(570,-34.0417)">		<title>Sheet.34</title>		<desc>filesink</desc>		<v:textblock v:margins="rect(0,0,0,0)"></v:textblock>		<v:textrect cx="60" cy="90.9496" width="120.01" height="37.5"></v:textrect>		<path d="M0 106.7 A3.00007 3.00007 -180 0 0 3 109.7 L117 109.7 A3.00007 3.00007 -180 0 0 120 106.7 L120 75.2 A3.00007					 3.00007 -180 0 0 117 72.2 L3 72.2 A3.00007 3.00007 -180 0 0 0 75.2 L0 106.7 Z" class="st4"></path>		<text x="40.92" y="94.55" class="st5" v:langid="1033"><v:paragraph v:horizalign="1"></v:paragraph><v:tablist></v:tablist>filesink</text>		</g>	<g id="group36-41" transform="translate(653.812,-11.5294)" v:mid="36" v:groupcontext="group">		<title>Sheet.36</title>		<g id="shape5-42" v:mid="5" v:groupcontext="shape" transform="translate(15.1883,1.42109E-14)">			<title>Sheet.5</title>			<desc>开源</desc>			<v:textblock v:margins="rect(0,0,0,0)"></v:textblock>			<v:textrect cx="10.5" cy="103.4" width="21" height="12.6"></v:textrect>			<rect x="0" y="97.0996" width="21" height="12.6" class="st8"></rect>			<text x="0" y="106.89" class="st9" v:langid="1033"><v:paragraph></v:paragraph><v:tablist></v:tablist>开源</text>			</g>		<g id="shape6-45" v:mid="6" v:groupcontext="shape" transform="translate(6.29496E-14,-0.218613)">			<title>Sheet.6</title>			<path d="M0 108.2 A1.50003 1.50003 -180 0 0 1.5 109.7 L10.5 109.7 A1.50003 1.50003 -180 0 0 12 108.2 L12 99.2 A1.50003						 1.50003 -180 0 0 10.5 97.7 L1.5 97.7 A1.50003 1.50003 -180 0 0 0 99.2 L0 108.2 Z" class="st4"></path>		</g>	</g></g>
</svg>

## 单路流视频播放（H.265）

- 解码并显示单个流 (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 : 用于解码和显示单个流（H.265）的 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_decode_display_single_stream_h265.svg pipeline_decode_display_single_ -->
<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="9.79167in" height="1.52361in" viewbox="0 0 705 109.7" xml:space="preserve" color-interpolation-filters="sRGB" class="st10"><v:documentproperties v:langid="1033" v:viewmarkup="false"></v:documentproperties>
<style>.svg-3 .st1 { fill: #fafafa; stroke: none; stroke-linecap: butt; stroke-width: 0.75 }
.svg-3 .st2 { fill: #000000; font-family: Roboto; font-size: 1.00001em; font-weight: bold }
.svg-3 .st3 { fill: #d2d7e1; stroke: none; stroke-linecap: butt; stroke-width: 0.75 }
.svg-3 .st4 { fill: #007884; stroke: none; stroke-linecap: butt; stroke-width: 0.75 }
.svg-3 .st5 { fill: #ffffff; font-family: Roboto; font-size: 1.00001em }
.svg-3 .st6 { stroke: #000000; stroke-linecap: butt; stroke-width: 0.75 }
.svg-3 .st7 { fill: #000000; stroke: none; stroke-linecap: butt; stroke-width: 0.75 }
.svg-3 .st8 { fill: none; stroke: none; stroke-linecap: butt; stroke-width: 0.75 }
.svg-3 .st9 { fill: #000000; font-family: SimHei; font-size: 0.874992em }
.svg-3 .st10 { 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_decode_display_single_</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.375183)">		<title>Sheet.3</title>		<desc>GST BIN</desc>		<v:textblock v:margins="rect(7.2,0,0,0)" v:verticalalign="0"></v:textblock>		<v:textrect cx="352.125" cy="55.225" width="704.26" height="108.949"></v:textrect>		<path d="M0 104.07 A5.62513 5.62513 -180 0 0 5.62 109.7 L698.63 109.7 A5.62513 5.62513 -180 0 0 704.25 104.07 L704.25					 6.38 A5.62513 5.62513 -180 0 0 698.63 0.75 L5.62 0.75 A5.62513 5.62513 -180 0 0 0 6.38 L0 104.07 Z" class="st1"></path>		<text x="329.33" y="18.75" class="st2" v:langid="1033"><v:paragraph v:horizalign="1"></v:paragraph><v:tablist></v:tablist>GST BIN</text>		</g>	<g id="shape4-4" v:mid="4" v:groupcontext="shape">		<title>Sheet.4</title>		<path d="M699 0.75 C701.89 0.75 704.25 3.11 704.25 6 L704.25 103.7 C704.25 106.59 701.89 108.95 699 108.95 L6 108.95					 C3.11 108.95 0.75 106.59 0.75 103.7 L0.75 6 C0.75 3.11 3.11 0.75 6 0.75 L699 0.75 ZM699 0 L6 0 C2.69 0 0					 2.69 0 6 L0 103.7 C0 107.01 2.69 109.7 6 109.7 L699 109.7 C702.31 109.7 705 107.01 705 103.7 L705 6 C705					 2.69 702.31 0 699 0 Z" class="st3"></path>	</g>	<g id="shape12-6" v:mid="12" v:groupcontext="shape" transform="translate(15,-34.8826)">		<title>Sheet.12</title>		<desc>filesrc</desc>		<v:textblock v:margins="rect(0,0,0,0)"></v:textblock>		<v:textrect cx="60" cy="90.9496" width="120.01" height="37.5"></v:textrect>		<path d="M0 106.7 A3.00007 3.00007 -180 0 0 3 109.7 L117 109.7 A3.00007 3.00007 -180 0 0 120 106.7 L120 75.2 A3.00007					 3.00007 -180 0 0 117 72.2 L3 72.2 A3.00007 3.00007 -180 0 0 0 75.2 L0 106.7 Z" class="st4"></path>		<text x="43.56" y="94.55" class="st5" v:langid="1033"><v:paragraph v:horizalign="1"></v:paragraph><v:tablist></v:tablist>filesrc</text>		</g>	<g id="shape15-9" v:mid="15" v:groupcontext="shape" transform="translate(135,-53.6326)">		<title>Sheet.15</title>		<path d="M0 109.7 L14.98 109.7" class="st6"></path>	</g>	<g id="shape16-12" v:mid="16" v:groupcontext="shape" transform="translate(149.217,-51.0148)">		<title>Sheet.16</title>		<path d="M0 109.7 L4.53 107.08 L0 104.46 L0 109.7 Z" class="st7"></path>	</g>	<g id="shape18-14" v:mid="18" v:groupcontext="shape" transform="translate(153.75,-34.8826)">		<title>Sheet.18</title>		<desc>qtdemux</desc>		<v:textblock v:margins="rect(0,0,0,0)"></v:textblock>		<v:textrect cx="60" cy="90.9496" width="120.01" height="37.5"></v:textrect>		<path d="M0 106.7 A3.00007 3.00007 -180 0 0 3 109.7 L117 109.7 A3.00007 3.00007 -180 0 0 120 106.7 L120 75.2 A3.00007					 3.00007 -180 0 0 117 72.2 L3 72.2 A3.00007 3.00007 -180 0 0 0 75.2 L0 106.7 Z" class="st4"></path>		<text x="36.53" y="94.55" class="st5" v:langid="1033"><v:paragraph v:horizalign="1"></v:paragraph><v:tablist></v:tablist>qtdemux</text>		</g>	<g id="shape21-17" v:mid="21" v:groupcontext="shape" transform="translate(273.75,-53.6326)">		<title>Sheet.21</title>		<path d="M0 109.7 L14.98 109.7" class="st6"></path>	</g>	<g id="shape22-20" v:mid="22" v:groupcontext="shape" transform="translate(287.966,-51.0148)">		<title>Sheet.22</title>		<path d="M0 109.7 L4.53 107.08 L0 104.46 L0 109.7 Z" class="st7"></path>	</g>	<g id="shape24-22" v:mid="24" v:groupcontext="shape" transform="translate(292.5,-34.8826)">		<title>Sheet.24</title>		<desc>h265parse</desc>		<v:textblock v:margins="rect(0,0,0,0)"></v:textblock>		<v:textrect cx="60" cy="90.9496" width="120" height="37.5"></v:textrect>		<path d="M0 106.7 A3.00007 3.00007 -180 0 0 3 109.7 L117 109.7 A3.00007 3.00007 -180 0 0 120 106.7 L120 75.2 A3.00007					 3.00007 -180 0 0 117 72.2 L3 72.2 A3.00007 3.00007 -180 0 0 0 75.2 L0 106.7 Z" class="st4"></path>		<text x="31.65" y="94.55" class="st5" v:langid="1033"><v:paragraph v:horizalign="1"></v:paragraph><v:tablist></v:tablist>h265parse</text>		</g>	<g id="shape27-25" v:mid="27" v:groupcontext="shape" transform="translate(412.5,-53.6326)">		<title>Sheet.27</title>		<path d="M0 109.7 L14.98 109.7" class="st6"></path>	</g>	<g id="shape28-28" v:mid="28" v:groupcontext="shape" transform="translate(426.716,-51.0148)">		<title>Sheet.28</title>		<path d="M0 109.7 L4.53 107.08 L0 104.46 L0 109.7 Z" class="st7"></path>	</g>	<g id="shape30-30" v:mid="30" v:groupcontext="shape" transform="translate(431.25,-34.8826)">		<title>Sheet.30</title>		<desc>v4l2h264dec</desc>		<v:textblock v:margins="rect(0,0,0,0)"></v:textblock>		<v:textrect cx="60" cy="90.9496" width="120" height="37.5"></v:textrect>		<path d="M0 106.7 A3.00007 3.00007 -180 0 0 3 109.7 L117 109.7 A3.00007 3.00007 -180 0 0 120 106.7 L120 75.2 A3.00007					 3.00007 -180 0 0 117 72.2 L3 72.2 A3.00007 3.00007 -180 0 0 0 75.2 L0 106.7 Z" class="st4"></path>		<text x="25.78" y="94.55" class="st5" v:langid="1033"><v:paragraph v:horizalign="1"></v:paragraph><v:tablist></v:tablist>v4l2h264dec</text>		</g>	<g id="shape33-33" v:mid="33" v:groupcontext="shape" transform="translate(551.25,-53.6326)">		<title>Sheet.33</title>		<path d="M0 109.7 L14.98 109.7" class="st6"></path>	</g>	<g id="shape34-36" v:mid="34" v:groupcontext="shape" transform="translate(565.466,-51.0148)">		<title>Sheet.34</title>		<path d="M0 109.7 L4.53 107.08 L0 104.46 L0 109.7 Z" class="st7"></path>	</g>	<g id="shape36-38" v:mid="36" v:groupcontext="shape" transform="translate(570,-34.8826)">		<title>Sheet.36</title>		<desc>Waylandsink</desc>		<v:textblock v:margins="rect(0,0,0,0)"></v:textblock>		<v:textrect cx="60" cy="90.9496" width="120" height="37.5"></v:textrect>		<path d="M0 106.7 A3.00007 3.00007 -180 0 0 3 109.7 L117 109.7 A3.00007 3.00007 -180 0 0 120 106.7 L120 75.2 A3.00007					 3.00007 -180 0 0 117 72.2 L3 72.2 A3.00007 3.00007 -180 0 0 0 75.2 L0 106.7 Z" class="st4"></path>		<text x="26.26" y="94.55" class="st5" v:langid="1033"><v:paragraph v:horizalign="1"></v:paragraph><v:tablist></v:tablist>Waylandsink</text>		</g>	<g id="group38-41" transform="translate(653.812,-11.5294)" v:mid="38" v:groupcontext="group">		<title>Sheet.38</title>		<g id="shape6-42" v:mid="6" v:groupcontext="shape" transform="translate(15.1883,1.42109E-14)">			<title>Sheet.6</title>			<desc>开源</desc>			<v:textblock v:margins="rect(0,0,0,0)"></v:textblock>			<v:textrect cx="10.5" cy="103.4" width="21.01" height="12.6"></v:textrect>			<rect x="0" y="97.0996" width="21" height="12.6" class="st8"></rect>			<text x="0" y="106.89" class="st9" v:langid="1033"><v:paragraph></v:paragraph><v:tablist></v:tablist>开源</text>			</g>		<g id="shape7-45" v:mid="7" v:groupcontext="shape" transform="translate(6.29496E-14,-0.218619)">			<title>Sheet.7</title>			<path d="M0 108.2 A1.50003 1.50003 -180 0 0 1.5 109.7 L10.5 109.7 A1.50003 1.50003 -180 0 0 12 108.2 L12 99.2 A1.50003						 1.50003 -180 0 0 10.5 97.7 L1.5 97.7 A1.50003 1.50003 -180 0 0 0 99.2 L0 108.2 Z" class="st4"></path>		</g>	</g></g>
</svg>
- 解码并将流保存到文件 (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 : 解码并将流保存到文件（H.265）的 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_decode_save_stream_file_h265.svg Layer_2 -->
<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="9.79167in" height="1.52361in" viewbox="0 0 705 109.7" xml:space="preserve" color-interpolation-filters="sRGB" class="st10"><v:documentproperties v:langid="1033" v:viewmarkup="false"></v:documentproperties>
<style>.svg-4 .st1 { fill: #fafafa; stroke: none; stroke-linecap: butt; stroke-width: 0.75 }
.svg-4 .st2 { fill: #000000; font-family: Roboto; font-size: 1.00001em; font-weight: bold }
.svg-4 .st3 { fill: #d2d7e1; stroke: none; stroke-linecap: butt; stroke-width: 0.75 }
.svg-4 .st4 { fill: #007884; stroke: none; stroke-linecap: butt; stroke-width: 0.75 }
.svg-4 .st5 { fill: #ffffff; font-family: Roboto; font-size: 1.00001em }
.svg-4 .st6 { stroke: #000000; stroke-linecap: butt; stroke-width: 0.75 }
.svg-4 .st7 { fill: #000000; stroke: none; stroke-linecap: butt; stroke-width: 0.75 }
.svg-4 .st8 { fill: none; stroke: none; stroke-linecap: butt; stroke-width: 0.75 }
.svg-4 .st9 { fill: #000000; font-family: SimHei; font-size: 0.874992em }
.svg-4 .st10 { 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>Layer_2</title>	<v:pageproperties v:drawingscale="1" v:pagescale="1" v:drawingunits="19" v:shadowoffsetx="9" v:shadowoffsety="-9"></v:pageproperties>	<g id="shape2-1" v:mid="2" v:groupcontext="shape" transform="translate(0.375,-0.375069)">		<title>Sheet.2</title>		<desc>GST BIN</desc>		<v:textblock v:margins="rect(7.2,0,0,0)" v:verticalalign="0"></v:textblock>		<v:textrect cx="352.125" cy="55.2248" width="704.26" height="108.95"></v:textrect>		<path d="M0 104.07 A5.62513 5.62513 -180 0 0 5.62 109.7 L698.63 109.7 A5.62513 5.62513 -180 0 0 704.25 104.07 L704.25					 6.38 A5.62513 5.62513 -180 0 0 698.63 0.75 L5.62 0.75 A5.62513 5.62513 -180 0 0 -0 6.38 L0 104.07 Z" class="st1"></path>		<text x="329.33" y="18.75" class="st2" v:langid="1033"><v:paragraph v:horizalign="1"></v:paragraph><v:tablist></v:tablist>GST BIN</text>		</g>	<g id="shape3-4" v:mid="3" v:groupcontext="shape">		<title>Sheet.3</title>		<path d="M699 0.75 C701.89 0.75 704.25 3.11 704.25 6 L704.25 103.7 C704.25 106.59 701.89 108.95 699 108.95 L6 108.95					 C3.11 108.95 0.75 106.59 0.75 103.7 L0.75 6 C0.75 3.11 3.11 0.75 6 0.75 L699 0.75 ZM699 0 L6 0 C2.69 0 0					 2.69 0 6 L0 103.7 C0 107.01 2.69 109.7 6 109.7 L699 109.7 C702.31 109.7 705 107.01 705 103.7 L705 6 C705					 2.69 702.31 0 699 0 Z" class="st3"></path>	</g>	<g id="shape10-6" v:mid="10" v:groupcontext="shape" transform="translate(15,-34.0417)">		<title>Sheet.10</title>		<desc>filesrc</desc>		<v:textblock v:margins="rect(0,0,0,0)"></v:textblock>		<v:textrect cx="60" cy="90.9496" width="120.01" height="37.5"></v:textrect>		<path d="M0 106.7 A3.00007 3.00007 -180 0 0 3 109.7 L117 109.7 A3.00007 3.00007 -180 0 0 120 106.7 L120 75.2 A3.00007					 3.00007 -180 0 0 117 72.2 L3 72.2 A3.00007 3.00007 -180 0 0 0 75.2 L0 106.7 Z" class="st4"></path>		<text x="43.56" y="94.55" class="st5" v:langid="1033"><v:paragraph v:horizalign="1"></v:paragraph><v:tablist></v:tablist>filesrc</text>		</g>	<g id="shape13-9" v:mid="13" v:groupcontext="shape" transform="translate(135,-52.7917)">		<title>Sheet.13</title>		<path d="M0 109.7 L14.98 109.7" class="st6"></path>	</g>	<g id="shape14-12" v:mid="14" v:groupcontext="shape" transform="translate(149.217,-50.1739)">		<title>Sheet.14</title>		<path d="M0 109.7 L4.53 107.08 L0 104.46 L0 109.7 Z" class="st7"></path>	</g>	<g id="shape16-14" v:mid="16" v:groupcontext="shape" transform="translate(153.75,-34.0417)">		<title>Sheet.16</title>		<desc>qtdemux</desc>		<v:textblock v:margins="rect(0,0,0,0)"></v:textblock>		<v:textrect cx="60" cy="90.9496" width="120" height="37.5"></v:textrect>		<path d="M0 106.7 A3.00007 3.00007 -180 0 0 3 109.7 L117 109.7 A3.00007 3.00007 -180 0 0 120 106.7 L120 75.2 A3.00007					 3.00007 -180 0 0 117 72.2 L3 72.2 A3.00007 3.00007 -180 0 0 0 75.2 L0 106.7 Z" class="st4"></path>		<text x="36.53" y="94.55" class="st5" v:langid="1033"><v:paragraph v:horizalign="1"></v:paragraph><v:tablist></v:tablist>qtdemux</text>		</g>	<g id="shape19-17" v:mid="19" v:groupcontext="shape" transform="translate(273.75,-52.7917)">		<title>Sheet.19</title>		<path d="M0 109.7 L14.98 109.7" class="st6"></path>	</g>	<g id="shape20-20" v:mid="20" v:groupcontext="shape" transform="translate(287.966,-50.1739)">		<title>Sheet.20</title>		<path d="M0 109.7 L4.53 107.08 L0 104.46 L0 109.7 Z" class="st7"></path>	</g>	<g id="shape22-22" v:mid="22" v:groupcontext="shape" transform="translate(292.5,-34.0417)">		<title>Sheet.22</title>		<desc>h265parse</desc>		<v:textblock v:margins="rect(0,0,0,0)"></v:textblock>		<v:textrect cx="60" cy="90.9496" width="120" height="37.5"></v:textrect>		<path d="M0 106.7 A3.00007 3.00007 -180 0 0 3 109.7 L117 109.7 A3.00007 3.00007 -180 0 0 120 106.7 L120 75.2 A3.00007					 3.00007 -180 0 0 117 72.2 L3 72.2 A3.00007 3.00007 -180 0 0 0 75.2 L0 106.7 Z" class="st4"></path>		<text x="31.65" y="94.55" class="st5" v:langid="1033"><v:paragraph v:horizalign="1"></v:paragraph><v:tablist></v:tablist>h265parse</text>		</g>	<g id="shape25-25" v:mid="25" v:groupcontext="shape" transform="translate(412.5,-52.7917)">		<title>Sheet.25</title>		<path d="M0 109.7 L14.98 109.7" class="st6"></path>	</g>	<g id="shape26-28" v:mid="26" v:groupcontext="shape" transform="translate(426.716,-50.1739)">		<title>Sheet.26</title>		<path d="M0 109.7 L4.53 107.08 L0 104.46 L0 109.7 Z" class="st7"></path>	</g>	<g id="shape28-30" v:mid="28" v:groupcontext="shape" transform="translate(431.25,-34.0417)">		<title>Sheet.28</title>		<desc>v4l2h264dec</desc>		<v:textblock v:margins="rect(0,0,0,0)"></v:textblock>		<v:textrect cx="60" cy="90.9496" width="120.01" height="37.5"></v:textrect>		<path d="M0 106.7 A3.00007 3.00007 -180 0 0 3 109.7 L117 109.7 A3.00007 3.00007 -180 0 0 120 106.7 L120 75.2 A3.00007					 3.00007 -180 0 0 117 72.2 L3 72.2 A3.00007 3.00007 -180 0 0 0 75.2 L0 106.7 Z" class="st4"></path>		<text x="25.78" y="94.55" class="st5" v:langid="1033"><v:paragraph v:horizalign="1"></v:paragraph><v:tablist></v:tablist>v4l2h264dec</text>		</g>	<g id="shape31-33" v:mid="31" v:groupcontext="shape" transform="translate(551.25,-52.7917)">		<title>Sheet.31</title>		<path d="M0 109.7 L14.98 109.7" class="st6"></path>	</g>	<g id="shape32-36" v:mid="32" v:groupcontext="shape" transform="translate(565.466,-50.1739)">		<title>Sheet.32</title>		<path d="M0 109.7 L4.53 107.08 L0 104.46 L0 109.7 Z" class="st7"></path>	</g>	<g id="shape34-38" v:mid="34" v:groupcontext="shape" transform="translate(570,-34.0417)">		<title>Sheet.34</title>		<desc>filesink</desc>		<v:textblock v:margins="rect(0,0,0,0)"></v:textblock>		<v:textrect cx="60" cy="90.9496" width="120.01" height="37.5"></v:textrect>		<path d="M0 106.7 A3.00007 3.00007 -180 0 0 3 109.7 L117 109.7 A3.00007 3.00007 -180 0 0 120 106.7 L120 75.2 A3.00007					 3.00007 -180 0 0 117 72.2 L3 72.2 A3.00007 3.00007 -180 0 0 0 75.2 L0 106.7 Z" class="st4"></path>		<text x="40.92" y="94.55" class="st5" v:langid="1033"><v:paragraph v:horizalign="1"></v:paragraph><v:tablist></v:tablist>filesink</text>		</g>	<g id="group36-41" transform="translate(653.812,-11.5294)" v:mid="36" v:groupcontext="group">		<title>Sheet.36</title>		<g id="shape5-42" v:mid="5" v:groupcontext="shape" transform="translate(15.1883,1.42109E-14)">			<title>Sheet.5</title>			<desc>开源</desc>			<v:textblock v:margins="rect(0,0,0,0)"></v:textblock>			<v:textrect cx="10.5" cy="103.4" width="21" height="12.6"></v:textrect>			<rect x="0" y="97.0996" width="21" height="12.6" class="st8"></rect>			<text x="0" y="106.89" class="st9" v:langid="1033"><v:paragraph></v:paragraph><v:tablist></v:tablist>开源</text>			</g>		<g id="shape6-45" v:mid="6" v:groupcontext="shape" transform="translate(6.29496E-14,-0.218613)">			<title>Sheet.6</title>			<path d="M0 108.2 A1.50003 1.50003 -180 0 0 1.5 109.7 L10.5 109.7 A1.50003 1.50003 -180 0 0 12 108.2 L12 99.2 A1.50003						 1.50003 -180 0 0 10.5 97.7 L1.5 97.7 A1.50003 1.50003 -180 0 0 0 99.2 L0 108.2 Z" class="st4"></path>		</g>	</g></g>
</svg>

## 单路流视频播放 (VP9)

这些用例展示了从 webm 等媒体容器格式的文件播放 4K 视频流的过程。

- 解码并显示单个流 (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 : 解码并显示单个流（VP9）的 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_decode_display_single_stream_vp9.svg Layer_2 -->
<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="7.86458in" height="1.5236in" viewbox="0 0 566.25 109.7" xml:space="preserve" color-interpolation-filters="sRGB" class="st10"><v:documentproperties v:langid="1033" v:viewmarkup="false"></v:documentproperties>
<style>.svg-5 .st1 { fill: #fafafa; stroke: none; stroke-linecap: butt; stroke-width: 0.75 }
.svg-5 .st2 { fill: #000000; font-family: Roboto; font-size: 1.00001em; font-weight: bold }
.svg-5 .st3 { fill: #d2d7e1; stroke: none; stroke-linecap: butt; stroke-width: 0.75 }
.svg-5 .st4 { fill: #007884; stroke: none; stroke-linecap: butt; stroke-width: 0.75 }
.svg-5 .st5 { fill: #ffffff; font-family: Roboto; font-size: 1.00001em }
.svg-5 .st6 { stroke: #000000; stroke-linecap: butt; stroke-width: 0.75 }
.svg-5 .st7 { fill: #000000; stroke: none; stroke-linecap: butt; stroke-width: 0.75 }
.svg-5 .st8 { fill: none; stroke: none; stroke-linecap: butt; stroke-width: 0.75 }
.svg-5 .st9 { fill: #000000; font-family: SimHei; font-size: 0.874992em }
.svg-5 .st10 { 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>Layer_2</title>	<v:pageproperties v:drawingscale="1" v:pagescale="1" v:drawingunits="19" v:shadowoffsetx="9" v:shadowoffsety="-9"></v:pageproperties>	<g id="shape2-1" v:mid="2" v:groupcontext="shape" transform="translate(0.375,-0.374989)">		<title>Sheet.2</title>		<desc>GST BIN</desc>		<v:textblock v:margins="rect(7.2,0,0,0)" v:verticalalign="0"></v:textblock>		<v:textrect cx="282.75" cy="55.2247" width="565.5" height="108.95"></v:textrect>		<path d="M0 104.07 A5.62513 5.62513 -180 0 0 5.62 109.7 L559.87 109.7 A5.62513 5.62513 -180 0 0 565.5 104.07 L565.5 6.37					 A5.62513 5.62513 -180 0 0 559.87 0.75 L5.62 0.75 A5.62513 5.62513 -180 0 0 0 6.37 L0 104.07 Z" class="st1"></path>		<text x="259.95" y="18.75" class="st2" v:langid="1033"><v:paragraph v:horizalign="1"></v:paragraph><v:tablist></v:tablist>GST BIN</text>		</g>	<g id="shape3-4" v:mid="3" v:groupcontext="shape">		<title>Sheet.3</title>		<path d="M560.25 0.75 C563.14 0.75 565.5 3.11 565.5 6 L565.5 103.7 C565.5 106.59 563.14 108.95 560.25 108.95 L6 108.95					 C3.11 108.95 0.75 106.59 0.75 103.7 L0.75 6 C0.75 3.11 3.11 0.75 6 0.75 L560.25 0.75 ZM560.25 0 L6 0 C2.69					 0 0 2.69 0 6 L0 103.7 C0 107.01 2.69 109.7 6 109.7 L560.25 109.7 C563.56 109.7 566.25 107.01 566.25 103.7					 L566.25 6 C566.25 2.69 563.56 0 560.25 0 Z" class="st3"></path>	</g>	<g id="shape10-6" v:mid="10" v:groupcontext="shape" transform="translate(15,-34.0416)">		<title>Sheet.10</title>		<desc>filesrc</desc>		<v:textblock v:margins="rect(0,0,0,0)"></v:textblock>		<v:textrect cx="60" cy="90.9495" width="120.01" height="37.5"></v:textrect>		<path d="M0 106.7 A3.00007 3.00007 -180 0 0 3 109.7 L117 109.7 A3.00007 3.00007 -180 0 0 120 106.7 L120 75.2 A3.00007					 3.00007 -180 0 0 117 72.2 L3 72.2 A3.00007 3.00007 -180 0 0 0 75.2 L0 106.7 Z" class="st4"></path>		<text x="43.56" y="94.55" class="st5" v:langid="1033"><v:paragraph v:horizalign="1"></v:paragraph><v:tablist></v:tablist>filesrc</text>		</g>	<g id="shape13-9" v:mid="13" v:groupcontext="shape" transform="translate(135,-52.7916)">		<title>Sheet.13</title>		<path d="M0 109.7 L14.98 109.7" class="st6"></path>	</g>	<g id="shape14-12" v:mid="14" v:groupcontext="shape" transform="translate(149.217,-50.1738)">		<title>Sheet.14</title>		<path d="M0 109.7 L4.53 107.08 L0 104.46 L0 109.7 Z" class="st7"></path>	</g>	<g id="shape16-14" v:mid="16" v:groupcontext="shape" transform="translate(153.75,-34.0416)">		<title>Sheet.16</title>		<desc>matroskademux</desc>		<v:textblock v:margins="rect(0,0,0,0)"></v:textblock>		<v:textrect cx="60" cy="90.9495" width="120" height="37.5"></v:textrect>		<path d="M0 106.7 A3.00007 3.00007 -180 0 0 3 109.7 L117 109.7 A3.00007 3.00007 -180 0 0 120 106.7 L120 75.2 A3.00007					 3.00007 -180 0 0 117 72.2 L3 72.2 A3.00007 3.00007 -180 0 0 0 75.2 L0 106.7 Z" class="st4"></path>		<text x="16.56" y="94.55" class="st5" v:langid="1033"><v:paragraph v:horizalign="1"></v:paragraph><v:tablist></v:tablist>matroskademux</text>		</g>	<g id="shape19-17" v:mid="19" v:groupcontext="shape" transform="translate(273.75,-52.7916)">		<title>Sheet.19</title>		<path d="M0 109.7 L14.98 109.7" class="st6"></path>	</g>	<g id="shape20-20" v:mid="20" v:groupcontext="shape" transform="translate(287.966,-50.1738)">		<title>Sheet.20</title>		<path d="M0 109.7 L4.53 107.08 L0 104.46 L0 109.7 Z" class="st7"></path>	</g>	<g id="shape22-22" v:mid="22" v:groupcontext="shape" transform="translate(292.5,-34.0416)">		<title>Sheet.22</title>		<desc>v4l2vp9dec</desc>		<v:textblock v:margins="rect(0,0,0,0)"></v:textblock>		<v:textrect cx="60" cy="90.9495" width="120.01" height="37.5"></v:textrect>		<path d="M0 106.7 A3.00007 3.00007 -180 0 0 3 109.7 L117 109.7 A3.00007 3.00007 -180 0 0 120 106.7 L120 75.2 A3.00007					 3.00007 -180 0 0 117 72.2 L3 72.2 A3.00007 3.00007 -180 0 0 0 75.2 L0 106.7 Z" class="st4"></path>		<text x="29.55" y="94.55" class="st5" v:langid="1033"><v:paragraph v:horizalign="1"></v:paragraph><v:tablist></v:tablist>v4l2vp9dec</text>		</g>	<g id="shape25-25" v:mid="25" v:groupcontext="shape" transform="translate(412.5,-52.7916)">		<title>Sheet.25</title>		<path d="M0 109.7 L14.98 109.7" class="st6"></path>	</g>	<g id="shape26-28" v:mid="26" v:groupcontext="shape" transform="translate(426.716,-50.1738)">		<title>Sheet.26</title>		<path d="M0 109.7 L4.53 107.08 L0 104.46 L0 109.7 Z" class="st7"></path>	</g>	<g id="shape28-30" v:mid="28" v:groupcontext="shape" transform="translate(431.25,-34.0416)">		<title>Sheet.28</title>		<desc>Waylandsink</desc>		<v:textblock v:margins="rect(0,0,0,0)"></v:textblock>		<v:textrect cx="60" cy="90.9495" width="120.01" height="37.5"></v:textrect>		<path d="M0 106.7 A3.00007 3.00007 -180 0 0 3 109.7 L117 109.7 A3.00007 3.00007 -180 0 0 120 106.7 L120 75.2 A3.00007					 3.00007 -180 0 0 117 72.2 L3 72.2 A3.00007 3.00007 -180 0 0 0 75.2 L0 106.7 Z" class="st4"></path>		<text x="26.26" y="94.55" class="st5" v:langid="1033"><v:paragraph v:horizalign="1"></v:paragraph><v:tablist></v:tablist>Waylandsink</text>		</g>	<g id="group30-33" transform="translate(515.062,-11.5293)" v:mid="30" v:groupcontext="group">		<title>Sheet.30</title>		<g id="shape5-34" v:mid="5" v:groupcontext="shape" transform="translate(15.1883,1.42109E-14)">			<title>Sheet.5</title>			<desc>开源</desc>			<v:textblock v:margins="rect(0,0,0,0)"></v:textblock>			<v:textrect cx="10.5" cy="103.4" width="21.01" height="12.6"></v:textrect>			<rect x="0" y="97.0995" width="21" height="12.6" class="st8"></rect>			<text x="0" y="106.89" class="st9" v:langid="1033"><v:paragraph></v:paragraph><v:tablist></v:tablist>开源</text>			</g>		<g id="shape6-37" v:mid="6" v:groupcontext="shape" transform="translate(6.29496E-14,-0.218633)">			<title>Sheet.6</title>			<path d="M0 108.2 A1.50003 1.50003 -180 0 0 1.5 109.7 L10.5 109.7 A1.50003 1.50003 -180 0 0 12 108.2 L12 99.2 A1.50003						 1.50003 -180 0 0 10.5 97.7 L1.5 97.7 A1.50003 1.50003 -180 0 0 0 99.2 L0 108.2 Z" class="st4"></path>		</g>	</g></g>
</svg>
- 解码并将流保存到文件 (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 : 解码并将流保存到文件（VP9）的 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_decode_save_stream_file_vp9.svg Layer_2 -->
<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="7.86458in" height="1.5236in" viewbox="0 0 566.25 109.7" xml:space="preserve" color-interpolation-filters="sRGB" class="st10"><v:documentproperties v:langid="1033" v:viewmarkup="false"></v:documentproperties>
<style>.svg-6 .st1 { fill: #fafafa; stroke: none; stroke-linecap: butt; stroke-width: 0.75 }
.svg-6 .st2 { fill: #000000; font-family: Roboto; font-size: 1.00001em; font-weight: bold }
.svg-6 .st3 { fill: #d2d7e1; stroke: none; stroke-linecap: butt; stroke-width: 0.75 }
.svg-6 .st4 { fill: #007884; stroke: none; stroke-linecap: butt; stroke-width: 0.75 }
.svg-6 .st5 { fill: #ffffff; font-family: Roboto; font-size: 1.00001em }
.svg-6 .st6 { stroke: #000000; stroke-linecap: butt; stroke-width: 0.75 }
.svg-6 .st7 { fill: #000000; stroke: none; stroke-linecap: butt; stroke-width: 0.75 }
.svg-6 .st8 { fill: none; stroke: none; stroke-linecap: butt; stroke-width: 0.75 }
.svg-6 .st9 { fill: #000000; font-family: SimHei; font-size: 0.874992em }
.svg-6 .st10 { 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>Layer_2</title>	<v:pageproperties v:drawingscale="1" v:pagescale="1" v:drawingunits="19" v:shadowoffsetx="9" v:shadowoffsety="-9"></v:pageproperties>	<v:layer v:name="Connector" v:index="0"></v:layer>	<g id="shape2-1" v:mid="2" v:groupcontext="shape" transform="translate(0.375,-0.374817)">		<title>Sheet.2</title>		<desc>GST BIN</desc>		<v:textblock v:margins="rect(7.2,0,0,0)" v:verticalalign="0"></v:textblock>		<v:textrect cx="282.75" cy="55.2247" width="565.5" height="108.95"></v:textrect>		<path d="M0 104.07 A5.62513 5.62513 -180 0 0 5.62 109.7 L559.87 109.7 A5.62513 5.62513 -180 0 0 565.5 104.07 L565.5 6.37					 A5.62513 5.62513 -180 0 0 559.87 0.75 L5.62 0.75 A5.62513 5.62513 -180 0 0 0 6.37 L0 104.07 Z" class="st1"></path>		<text x="259.95" y="18.75" class="st2" v:langid="1033"><v:paragraph v:horizalign="1"></v:paragraph><v:tablist></v:tablist>GST BIN</text>		</g>	<g id="shape3-4" v:mid="3" v:groupcontext="shape">		<title>Sheet.3</title>		<path d="M560.25 0.75 C563.14 0.75 565.5 3.11 565.5 6 L565.5 103.7 C565.5 106.59 563.14 108.95 560.25 108.95 L6 108.95					 C3.11 108.95 0.75 106.59 0.75 103.7 L0.75 6 C0.75 3.11 3.11 0.75 6 0.75 L560.25 0.75 ZM560.25 0 L6 0 C2.69					 0 0 2.69 0 6 L0 103.7 C0 107.01 2.69 109.7 6 109.7 L560.25 109.7 C563.56 109.7 566.25 107.01 566.25 103.7					 L566.25 6 C566.25 2.69 563.56 0 560.25 0 Z" class="st3"></path>	</g>	<g id="shape10-6" v:mid="10" v:groupcontext="shape" transform="translate(15,-39.4361)">		<title>Sheet.10</title>		<desc>filesrc</desc>		<v:textblock v:margins="rect(0,0,0,0)"></v:textblock>		<v:textrect cx="60" cy="90.9495" width="120.01" height="37.5"></v:textrect>		<path d="M0 106.7 A3.00007 3.00007 -180 0 0 3 109.7 L117 109.7 A3.00007 3.00007 -180 0 0 120 106.7 L120 75.2 A3.00007					 3.00007 -180 0 0 117 72.2 L3 72.2 A3.00007 3.00007 -180 0 0 0 75.2 L0 106.7 Z" class="st4"></path>		<text x="43.56" y="94.55" class="st5" v:langid="1033"><v:paragraph v:horizalign="1"></v:paragraph><v:tablist></v:tablist>filesrc</text>		</g>	<g id="shape13-9" v:mid="13" v:groupcontext="shape" transform="translate(135,-58.1861)">		<title>Sheet.13</title>		<path d="M0 109.7 L14.98 109.7" class="st6"></path>	</g>	<g id="shape14-12" v:mid="14" v:groupcontext="shape" transform="translate(149.217,-55.5683)">		<title>Sheet.14</title>		<path d="M0 109.7 L4.53 107.08 L0 104.46 L0 109.7 Z" class="st7"></path>	</g>	<g id="shape16-14" v:mid="16" v:groupcontext="shape" transform="translate(153.75,-39.4361)">		<title>Sheet.16</title>		<desc>matroskademux</desc>		<v:textblock v:margins="rect(0,0,0,0)"></v:textblock>		<v:textrect cx="60" cy="90.9495" width="120" height="37.5"></v:textrect>		<path d="M0 106.7 A3.00007 3.00007 -180 0 0 3 109.7 L117 109.7 A3.00007 3.00007 -180 0 0 120 106.7 L120 75.2 A3.00007					 3.00007 -180 0 0 117 72.2 L3 72.2 A3.00007 3.00007 -180 0 0 0 75.2 L0 106.7 Z" class="st4"></path>		<text x="16.56" y="94.55" class="st5" v:langid="1033"><v:paragraph v:horizalign="1"></v:paragraph><v:tablist></v:tablist>matroskademux</text>		</g>	<g id="shape19-17" v:mid="19" v:groupcontext="shape" transform="translate(273.75,-58.1861)">		<title>Sheet.19</title>		<path d="M0 109.7 L14.98 109.7" class="st6"></path>	</g>	<g id="shape20-20" v:mid="20" v:groupcontext="shape" transform="translate(287.966,-55.5683)">		<title>Sheet.20</title>		<path d="M0 109.7 L4.53 107.08 L0 104.46 L0 109.7 Z" class="st7"></path>	</g>	<g id="shape22-22" v:mid="22" v:groupcontext="shape" transform="translate(292.5,-39.4361)">		<title>Sheet.22</title>		<desc>v4l2vp9dec</desc>		<v:textblock v:margins="rect(0,0,0,0)"></v:textblock>		<v:textrect cx="60" cy="90.9495" width="120.01" height="37.5"></v:textrect>		<path d="M0 106.7 A3.00007 3.00007 -180 0 0 3 109.7 L117 109.7 A3.00007 3.00007 -180 0 0 120 106.7 L120 75.2 A3.00007					 3.00007 -180 0 0 117 72.2 L3 72.2 A3.00007 3.00007 -180 0 0 0 75.2 L0 106.7 Z" class="st4"></path>		<text x="29.55" y="94.55" class="st5" v:langid="1033"><v:paragraph v:horizalign="1"></v:paragraph><v:tablist></v:tablist>v4l2vp9dec</text>		</g>	<g id="shape25-25" v:mid="25" v:groupcontext="shape" transform="translate(412.5,-58.1861)">		<title>Sheet.25</title>		<path d="M0 109.7 L14.98 109.7" class="st6"></path>	</g>	<g id="shape26-28" v:mid="26" v:groupcontext="shape" transform="translate(426.716,-55.5683)">		<title>Sheet.26</title>		<path d="M0 109.7 L4.53 107.08 L0 104.46 L0 109.7 Z" class="st7"></path>	</g>	<g id="shape28-30" v:mid="28" v:groupcontext="shape" transform="translate(431.25,-39.4361)">		<title>Sheet.28</title>		<desc>filesink</desc>		<v:textblock v:margins="rect(0,0,0,0)"></v:textblock>		<v:textrect cx="60" cy="90.9495" width="120" height="37.5"></v:textrect>		<path d="M0 106.7 A3.00007 3.00007 -180 0 0 3 109.7 L117 109.7 A3.00007 3.00007 -180 0 0 120 106.7 L120 75.2 A3.00007					 3.00007 -180 0 0 117 72.2 L3 72.2 A3.00007 3.00007 -180 0 0 0 75.2 L0 106.7 Z" class="st4"></path>		<text x="40.92" y="94.55" class="st5" v:langid="1033"><v:paragraph v:horizalign="1"></v:paragraph><v:tablist></v:tablist>filesink</text>		</g>	<g id="group30-33" transform="translate(515.062,-11.5294)" v:mid="30" v:groupcontext="group">		<title>Sheet.30</title>		<g id="shape5-34" v:mid="5" v:groupcontext="shape" transform="translate(15.1883,1.42109E-14)">			<title>Sheet.5</title>			<desc>开源</desc>			<v:textblock v:margins="rect(0,0,0,0)"></v:textblock>			<v:textrect cx="10.5" cy="103.4" width="21.01" height="12.6"></v:textrect>			<rect x="0" y="97.0995" width="21" height="12.6" class="st8"></rect>			<text x="0" y="106.89" class="st9" v:langid="1033"><v:paragraph></v:paragraph><v:tablist></v:tablist>开源</text>			</g>		<g id="shape6-37" v:mid="6" v:groupcontext="shape" transform="translate(6.29496E-14,-0.218623)">			<title>Sheet.6</title>			<path d="M0 108.2 A1.50003 1.50003 -180 0 0 1.5 109.7 L10.5 109.7 A1.50003 1.50003 -180 0 0 12 108.2 L12 99.2 A1.50003						 1.50003 -180 0 0 10.5 97.7 L1.5 97.7 A1.50003 1.50003 -180 0 0 0 99.2 L0 108.2 Z" class="st4"></path>		</g>	</g></g>
</svg>

## 两个 1080p 数据流 - 同时播放视频

该 pipeline 展示了同时播放来自文件的 2 个视频流，文件采用媒体容器格式（如 MP4）。

**已知问题**：在 Dragonwing IQ-9075 中，运行这些命令会导致黑屏，从而阻止进一步执行 GST 命令。

- 在控制台 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
- 在控制台 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 : 同时播放一个文件中的两个视频流
                    
                    <?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 simultaneous_playback_ 2video_streams_file.svg simultaneous_playback_ 2video_s -->
<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="9.79167in" height="2.82087in" viewbox="0 0 705 203.103" xml:space="preserve" color-interpolation-filters="sRGB" class="st11"><v:documentproperties v:langid="1033" v:viewmarkup="false"></v:documentproperties>
<style>.svg-7 .st1 { fill: #fafafa; stroke: none; stroke-linecap: butt; stroke-width: 0.75 }
.svg-7 .st2 { fill: #d2d7e1; stroke: none; stroke-linecap: butt; stroke-width: 0.75 }
.svg-7 .st3 { stroke: #d2d7e1; stroke-linecap: butt; stroke-width: 0.75 }
.svg-7 .st4 { fill: #007884; stroke: none; stroke-linecap: butt; stroke-width: 0.75 }
.svg-7 .st5 { fill: #ffffff; font-family: Roboto; font-size: 1.00001em }
.svg-7 .st6 { stroke: #000000; stroke-linecap: butt; stroke-width: 0.75 }
.svg-7 .st7 { fill: #000000; stroke: none; stroke-linecap: butt; stroke-width: 0.75 }
.svg-7 .st8 { fill: none; stroke: none; stroke-linecap: butt; stroke-width: 0.75 }
.svg-7 .st9 { fill: #000000; font-family: Roboto; font-size: 1.00001em; font-weight: bold }
.svg-7 .st10 { fill: #000000; font-family: SimHei; font-size: 0.874992em }
.svg-7 .st11 { 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>simultaneous_playback_ 2video_s</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.375137)">		<title>Sheet.3</title>		<path d="M0 197.48 A5.62513 5.62513 -180 0 0 5.62 203.1 L698.63 203.1 A5.62513 5.62513 -180 0 0 704.25 197.48 L704.25					 6.37 A5.62513 5.62513 -180 0 0 698.63 0.75 L5.62 0.75 A5.62513 5.62513 -180 0 0 -0 6.37 L0 197.48 Z" class="st1"></path>	</g>	<g id="shape4-3" v:mid="4" v:groupcontext="shape">		<title>Sheet.4</title>		<path d="M699 0.75 C701.89 0.75 704.25 3.11 704.25 6 L704.25 197.1 C704.25 200 701.89 202.35 699 202.35 L6 202.35 C3.11					 202.35 0.75 200 0.75 197.1 L0.75 6 C0.75 3.11 3.11 0.75 6 0.75 L699 0.75 ZM699 0 L6 0 C2.69 0 0 2.69 0 6					 L0 197.1 C0 200.42 2.69 203.1 6 203.1 L699 203.1 C702.31 203.1 705 200.42 705 197.1 L705 6 C705 2.69 702.31					 0 699 0 Z" class="st2"></path>	</g>	<g id="shape5-5" v:mid="5" v:groupcontext="shape" transform="translate(0.290281,-111.892)">		<title>Sheet.5</title>		<path d="M0 203.1 L704.71 203.1" class="st3"></path>	</g>	<g id="shape9-8" v:mid="9" v:groupcontext="shape" transform="translate(15,-35.3431)">		<title>Sheet.9</title>		<desc>filesrc</desc>		<v:textblock v:margins="rect(0,0,0,0)"></v:textblock>		<v:textrect cx="60" cy="184.353" width="120.01" height="37.5"></v:textrect>		<path d="M0 200.1 A3.00007 3.00007 -180 0 0 3 203.1 L117 203.1 A3.00007 3.00007 -180 0 0 120 200.1 L120 168.6 A3.00007					 3.00007 -180 0 0 117 165.6 L3 165.6 A3.00007 3.00007 -180 0 0 0 168.6 L0 200.1 Z" class="st4"></path>		<text x="43.56" y="187.95" class="st5" v:langid="1033"><v:paragraph v:horizalign="1"></v:paragraph><v:tablist></v:tablist>filesrc</text>		</g>	<g id="shape12-11" v:mid="12" v:groupcontext="shape" transform="translate(135,-54.0931)">		<title>Sheet.12</title>		<path d="M0 203.1 L14.98 203.1" class="st6"></path>	</g>	<g id="shape13-14" v:mid="13" v:groupcontext="shape" transform="translate(149.217,-51.4752)">		<title>Sheet.13</title>		<path d="M0 203.1 L4.53 200.48 L0 197.87 L0 203.1 Z" class="st7"></path>	</g>	<g id="shape15-16" v:mid="15" v:groupcontext="shape" transform="translate(153.75,-35.3431)">		<title>Sheet.15</title>		<desc>qtdemux</desc>		<v:textblock v:margins="rect(0,0,0,0)"></v:textblock>		<v:textrect cx="60" cy="184.353" width="120" height="37.5"></v:textrect>		<path d="M0 200.1 A3.00007 3.00007 -180 0 0 3 203.1 L117 203.1 A3.00007 3.00007 -180 0 0 120 200.1 L120 168.6 A3.00007					 3.00007 -180 0 0 117 165.6 L3 165.6 A3.00007 3.00007 -180 0 0 0 168.6 L0 200.1 Z" class="st4"></path>		<text x="36.53" y="187.95" class="st5" v:langid="1033"><v:paragraph v:horizalign="1"></v:paragraph><v:tablist></v:tablist>qtdemux</text>		</g>	<g id="shape18-19" v:mid="18" v:groupcontext="shape" transform="translate(273.75,-54.0931)">		<title>Sheet.18</title>		<path d="M0 203.1 L14.98 203.1" class="st6"></path>	</g>	<g id="shape19-22" v:mid="19" v:groupcontext="shape" transform="translate(287.966,-51.4752)">		<title>Sheet.19</title>		<path d="M0 203.1 L4.53 200.48 L0 197.87 L0 203.1 Z" class="st7"></path>	</g>	<g id="shape21-24" v:mid="21" v:groupcontext="shape" transform="translate(292.5,-35.3431)">		<title>Sheet.21</title>		<desc>h264parse</desc>		<v:textblock v:margins="rect(0,0,0,0)"></v:textblock>		<v:textrect cx="60" cy="184.353" width="120.01" height="37.5"></v:textrect>		<path d="M0 200.1 A3.00007 3.00007 -180 0 0 3 203.1 L117 203.1 A3.00007 3.00007 -180 0 0 120 200.1 L120 168.6 A3.00007					 3.00007 -180 0 0 117 165.6 L3 165.6 A3.00007 3.00007 -180 0 0 0 168.6 L0 200.1 Z" class="st4"></path>		<text x="31.65" y="187.95" class="st5" v:langid="1033"><v:paragraph v:horizalign="1"></v:paragraph><v:tablist></v:tablist>h264parse</text>		</g>	<g id="shape24-27" v:mid="24" v:groupcontext="shape" transform="translate(412.5,-54.0931)">		<title>Sheet.24</title>		<path d="M0 203.1 L14.98 203.1" class="st6"></path>	</g>	<g id="shape25-30" v:mid="25" v:groupcontext="shape" transform="translate(426.716,-51.4752)">		<title>Sheet.25</title>		<path d="M0 203.1 L4.53 200.48 L0 197.87 L0 203.1 Z" class="st7"></path>	</g>	<g id="shape27-32" v:mid="27" v:groupcontext="shape" transform="translate(431.25,-35.3431)">		<title>Sheet.27</title>		<desc>v4l2h264dec</desc>		<v:textblock v:margins="rect(0,0,0,0)"></v:textblock>		<v:textrect cx="60" cy="184.353" width="120.01" height="37.5"></v:textrect>		<path d="M0 200.1 A3.00007 3.00007 -180 0 0 3 203.1 L117 203.1 A3.00007 3.00007 -180 0 0 120 200.1 L120 168.6 A3.00007					 3.00007 -180 0 0 117 165.6 L3 165.6 A3.00007 3.00007 -180 0 0 0 168.6 L0 200.1 Z" class="st4"></path>		<text x="25.78" y="187.95" class="st5" v:langid="1033"><v:paragraph v:horizalign="1"></v:paragraph><v:tablist></v:tablist>v4l2h264dec</text>		</g>	<g id="shape30-35" v:mid="30" v:groupcontext="shape" transform="translate(551.25,-54.0931)">		<title>Sheet.30</title>		<path d="M0 203.1 L14.98 203.1" class="st6"></path>	</g>	<g id="shape31-38" v:mid="31" v:groupcontext="shape" transform="translate(565.466,-51.4752)">		<title>Sheet.31</title>		<path d="M0 203.1 L4.53 200.48 L0 197.87 L0 203.1 Z" class="st7"></path>	</g>	<g id="shape33-40" v:mid="33" v:groupcontext="shape" transform="translate(570,-35.3431)">		<title>Sheet.33</title>		<desc>Waylandsink</desc>		<v:textblock v:margins="rect(0,0,0,0)"></v:textblock>		<v:textrect cx="60" cy="184.353" width="120" height="37.5"></v:textrect>		<path d="M0 200.1 A3.00007 3.00007 -180 0 0 3 203.1 L117 203.1 A3.00007 3.00007 -180 0 0 120 200.1 L120 168.6 A3.00007					 3.00007 -180 0 0 117 165.6 L3 165.6 A3.00007 3.00007 -180 0 0 0 168.6 L0 200.1 Z" class="st4"></path>		<text x="26.26" y="187.95" class="st5" v:langid="1033"><v:paragraph v:horizalign="1"></v:paragraph><v:tablist></v:tablist>Waylandsink</text>		</g>	<g id="shape35-43" v:mid="35" v:groupcontext="shape" transform="translate(0,-175.912)">		<title>Sheet.35</title>		<desc>GST BIN</desc>		<v:textblock v:margins="rect(0,0,0,0)"></v:textblock>		<v:textrect cx="352.688" cy="195.903" width="705.38" height="14.4"></v:textrect>		<rect x="0" y="188.703" width="705.375" height="14.4" class="st8"></rect>		<text x="329.89" y="199.5" class="st9" v:langid="1033"><v:paragraph v:horizalign="1"></v:paragraph><v:tablist></v:tablist>GST BIN</text>		</g>	<g id="shape36-46" v:mid="36" v:groupcontext="shape" transform="translate(0,-84.3632)">		<title>Sheet.36</title>		<desc>GST BIN</desc>		<v:textblock v:margins="rect(0,0,0,0)"></v:textblock>		<v:textrect cx="352.688" cy="195.903" width="705.38" height="14.4"></v:textrect>		<rect x="0" y="188.703" width="705.375" height="14.4" class="st8"></rect>		<text x="329.89" y="199.5" class="st9" v:langid="1033"><v:paragraph v:horizalign="1"></v:paragraph><v:tablist></v:tablist>GST BIN</text>		</g>	<g id="shape39-49" v:mid="39" v:groupcontext="shape" transform="translate(15,-126.892)">		<title>Sheet.39</title>		<desc>filesrc</desc>		<v:textblock v:margins="rect(0,0,0,0)"></v:textblock>		<v:textrect cx="60" cy="184.353" width="120.01" height="37.5"></v:textrect>		<path d="M0 200.1 A3.00007 3.00007 -180 0 0 3 203.1 L117 203.1 A3.00007 3.00007 -180 0 0 120 200.1 L120 168.6 A3.00007					 3.00007 -180 0 0 117 165.6 L3 165.6 A3.00007 3.00007 -180 0 0 0 168.6 L0 200.1 Z" class="st4"></path>		<text x="43.56" y="187.95" class="st5" v:langid="1033"><v:paragraph v:horizalign="1"></v:paragraph><v:tablist></v:tablist>filesrc</text>		</g>	<g id="shape42-52" v:mid="42" v:groupcontext="shape" transform="translate(135,-145.642)">		<title>Sheet.42</title>		<path d="M0 203.1 L14.98 203.1" class="st6"></path>	</g>	<g id="shape43-55" v:mid="43" v:groupcontext="shape" transform="translate(149.217,-143.024)">		<title>Sheet.43</title>		<path d="M0 203.1 L4.53 200.48 L0 197.87 L0 203.1 Z" class="st7"></path>	</g>	<g id="shape45-57" v:mid="45" v:groupcontext="shape" transform="translate(153.75,-126.892)">		<title>Sheet.45</title>		<desc>qtdemux</desc>		<v:textblock v:margins="rect(0,0,0,0)"></v:textblock>		<v:textrect cx="60" cy="184.353" width="120" height="37.5"></v:textrect>		<path d="M0 200.1 A3.00007 3.00007 -180 0 0 3 203.1 L117 203.1 A3.00007 3.00007 -180 0 0 120 200.1 L120 168.6 A3.00007					 3.00007 -180 0 0 117 165.6 L3 165.6 A3.00007 3.00007 -180 0 0 0 168.6 L0 200.1 Z" class="st4"></path>		<text x="36.53" y="187.95" class="st5" v:langid="1033"><v:paragraph v:horizalign="1"></v:paragraph><v:tablist></v:tablist>qtdemux</text>		</g>	<g id="shape48-60" v:mid="48" v:groupcontext="shape" transform="translate(273.75,-145.642)">		<title>Sheet.48</title>		<path d="M0 203.1 L14.98 203.1" class="st6"></path>	</g>	<g id="shape49-63" v:mid="49" v:groupcontext="shape" transform="translate(287.966,-143.024)">		<title>Sheet.49</title>		<path d="M0 203.1 L4.53 200.48 L0 197.87 L0 203.1 Z" class="st7"></path>	</g>	<g id="shape51-65" v:mid="51" v:groupcontext="shape" transform="translate(292.5,-126.892)">		<title>Sheet.51</title>		<desc>h264parse</desc>		<v:textblock v:margins="rect(0,0,0,0)"></v:textblock>		<v:textrect cx="60" cy="184.353" width="120.01" height="37.5"></v:textrect>		<path d="M0 200.1 A3.00007 3.00007 -180 0 0 3 203.1 L117 203.1 A3.00007 3.00007 -180 0 0 120 200.1 L120 168.6 A3.00007					 3.00007 -180 0 0 117 165.6 L3 165.6 A3.00007 3.00007 -180 0 0 0 168.6 L0 200.1 Z" class="st4"></path>		<text x="31.65" y="187.95" class="st5" v:langid="1033"><v:paragraph v:horizalign="1"></v:paragraph><v:tablist></v:tablist>h264parse</text>		</g>	<g id="shape54-68" v:mid="54" v:groupcontext="shape" transform="translate(412.5,-145.642)">		<title>Sheet.54</title>		<path d="M0 203.1 L14.98 203.1" class="st6"></path>	</g>	<g id="shape55-71" v:mid="55" v:groupcontext="shape" transform="translate(426.716,-143.024)">		<title>Sheet.55</title>		<path d="M0 203.1 L4.53 200.48 L0 197.87 L0 203.1 Z" class="st7"></path>	</g>	<g id="shape57-73" v:mid="57" v:groupcontext="shape" transform="translate(431.25,-126.892)">		<title>Sheet.57</title>		<desc>v4l2h264dec</desc>		<v:textblock v:margins="rect(0,0,0,0)"></v:textblock>		<v:textrect cx="60" cy="184.353" width="120.01" height="37.5"></v:textrect>		<path d="M0 200.1 A3.00007 3.00007 -180 0 0 3 203.1 L117 203.1 A3.00007 3.00007 -180 0 0 120 200.1 L120 168.6 A3.00007					 3.00007 -180 0 0 117 165.6 L3 165.6 A3.00007 3.00007 -180 0 0 0 168.6 L0 200.1 Z" class="st4"></path>		<text x="25.78" y="187.95" class="st5" v:langid="1033"><v:paragraph v:horizalign="1"></v:paragraph><v:tablist></v:tablist>v4l2h264dec</text>		</g>	<g id="shape60-76" v:mid="60" v:groupcontext="shape" transform="translate(551.25,-145.642)">		<title>Sheet.60</title>		<path d="M0 203.1 L14.98 203.1" class="st6"></path>	</g>	<g id="shape61-79" v:mid="61" v:groupcontext="shape" transform="translate(565.466,-143.024)">		<title>Sheet.61</title>		<path d="M0 203.1 L4.53 200.48 L0 197.87 L0 203.1 Z" class="st7"></path>	</g>	<g id="shape63-81" v:mid="63" v:groupcontext="shape" transform="translate(570,-126.892)">		<title>Sheet.63</title>		<desc>Waylandsink</desc>		<v:textblock v:margins="rect(0,0,0,0)"></v:textblock>		<v:textrect cx="60" cy="184.353" width="120" height="37.5"></v:textrect>		<path d="M0 200.1 A3.00007 3.00007 -180 0 0 3 203.1 L117 203.1 A3.00007 3.00007 -180 0 0 120 200.1 L120 168.6 A3.00007					 3.00007 -180 0 0 117 165.6 L3 165.6 A3.00007 3.00007 -180 0 0 0 168.6 L0 200.1 Z" class="st4"></path>		<text x="26.26" y="187.95" class="st5" v:langid="1033"><v:paragraph v:horizalign="1"></v:paragraph><v:tablist></v:tablist>Waylandsink</text>		</g>	<g id="group68-84" transform="translate(653.812,-11.287)" v:mid="68" v:groupcontext="group">		<title>Sheet.68</title>		<g id="shape66-85" v:mid="66" v:groupcontext="shape" transform="translate(15.1883,0)">			<title>Sheet.66</title>			<desc>开源</desc>			<v:textblock v:margins="rect(0,0,0,0)"></v:textblock>			<v:textrect cx="10.5" cy="196.803" width="21.01" height="12.6"></v:textrect>			<rect x="0" y="190.503" width="21" height="12.6" class="st8"></rect>			<text x="-0" y="200.3" class="st10" v:langid="1033"><v:paragraph></v:paragraph><v:tablist></v:tablist>开源</text>			</g>		<g id="shape67-88" v:mid="67" v:groupcontext="shape" transform="translate(1.26898E-13,-0.218604)">			<title>Sheet.67</title>			<path d="M0 201.6 A1.50003 1.50003 -180 0 0 1.5 203.1 L10.5 203.1 A1.50003 1.50003 -180 0 0 12 201.6 L12 192.6 A1.50003						 1.50003 -180 0 0 10.5 191.1 L1.5 191.1 A1.50003 1.50003 -180 0 0 0 192.6 L0 201.6 Z" class="st4"></path>		</g>	</g></g>
</svg>

## 跳帧

[videorate](https://gstreamer.freedesktop.org/documentation/videorate/) 插件获取带有时间戳的视频帧的传入流，并生成与发送端口的帧率相匹配的数据流。

- 要执行校正，请删除并复制帧。
- 可以通过使用发送端口的过滤能力来强制转换为特定帧率。

使用以下任一命令运行用例：

- 单流 1080p，30 fps AVC 文件保存：

        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

以 15 fps 的速度从文件流播放以进行跳帧：

        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，30 AVC → 编码 → 解码 → 设置视频速率为 20 fps → 保存到文件：

        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

## 相关信息

- [视频播放](https://docs.qualcomm.com/doc/80-70022-50SC/topic/gst-video-playback-example.html)
- [使用 OpenCV 进行视频转换](https://docs.qualcomm.com/doc/80-70022-50SC/topic/video-playback-using-opencv.html)

**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/transform-and-transcode-use-cases.md) [Next Topic
音频用例](https://docs.qualcomm.com/bundle/publicresource/80-70022-50SC/topics/audio-use-cases.md)