# 转换和转码用例

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

转码用例展示了将视频流从一种格式转换或转变为另一种格式的过程。

在运行用例之前，请确保完成 [GStreamer 命令行用例](https://docs.qualcomm.com/doc/80-70022-50SC/topic/gstreamer-application-use-cases.html)中提到的先决条件。

Note: 目前不支持 Qualcomm Computer Vision SDK（fcv）引擎。

## 1080p 转 1080p - 旋转 (90/180/270)

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

用例展示了将摄像头中的场景旋转 180 度的过程。旋转后的图像显示在本地显示器上。

Note: 要以不同的角度旋转视频，请使用 [qtivtransform](https://docs.qualcomm.com/doc/80-70022-50SC/topic/qtivtransform.html) 插件中的 rotate 属性。

使用以下命令在目标设备上运行用例：

- 使用 Qualcomm Computer Vision SDK (fcv) 转换在 DSP 上运行的场景 引擎：

        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 ! qtivtransform engine=fcv rotate=180 ! waylandsink fullscreen=true async=false sync=falseCopy to clipboard
- 使用 OpenGL ES 转换在 GPU 上运行的场景：

        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 ! qtivtransform engine=gles rotate=180 ! waylandsink fullscreen=true async=false sync=falseCopy to clipboard

主摄像头显示转换后的流。

要停止用例，请按 CTRL + C。

下图展示了 pipeline 执行的流程：

Figure : 旋转与显示 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_rotation_display_display_camera_source.svg pipeline_rotation_display_displ -->
<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="5.9375in" height="1.3029in" viewbox="0 0 427.5 93.809" xml:space="preserve" color-interpolation-filters="sRGB" class="st11"><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: #2a2aea; stroke: none; stroke-linecap: butt; stroke-width: 0.75 }
.svg-1 .st4 { fill: #ffffff; font-family: Roboto; font-size: 1.00001em }
.svg-1 .st5 { stroke: #000000; stroke-linecap: butt; stroke-width: 0.75 }
.svg-1 .st6 { fill: #000000; stroke: none; stroke-linecap: butt; stroke-width: 0.75 }
.svg-1 .st7 { fill: #007884; 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: Roboto; font-size: 0.874992em }
.svg-1 .st10 { fill: #000000; font-family: SimHei; font-size: 0.874992em }
.svg-1 .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>pipeline_rotation_display_displ</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.375034)">		<title>Sheet.3</title>		<path d="M0 88.18 A5.62513 5.62513 -180 0 0 5.63 93.81 L421.13 93.81 A5.62513 5.62513 -180 0 0 426.75 88.18 L426.75 6.38					 A5.62513 5.62513 -180 0 0 421.13 0.75 L5.63 0.75 A5.62513 5.62513 -180 0 0 -0 6.38 L0 88.18 Z" class="st1"></path>	</g>	<g id="shape4-3" v:mid="4" v:groupcontext="shape">		<title>Sheet.4</title>		<path d="M421.5 0.75 C424.39 0.75 426.75 3.11 426.75 6 L426.75 87.81 C426.75 90.7 424.39 93.06 421.5 93.06 L6 93.06 C3.11					 93.06 0.75 90.7 0.75 87.81 L0.75 6 C0.75 3.11 3.11 0.75 6 0.75 L421.5 0.75 ZM421.5 0 L6 0 C2.69 0 0 2.69					 0 6 L0 87.81 C0 91.12 2.69 93.81 6 93.81 L421.5 93.81 C424.81 93.81 427.5 91.12 427.5 87.81 L427.5 6 C427.5					 2.69 424.81 0 421.5 0 Z" class="st2"></path>	</g>	<g id="shape14-5" v:mid="14" v:groupcontext="shape" transform="translate(153.75,-42)">		<title>Sheet.14</title>		<desc>qtivtransform</desc>		<v:textblock v:margins="rect(0,0,0,0)"></v:textblock>		<v:textrect cx="60" cy="75.059" width="120" height="37.5"></v:textrect>		<path d="M0 90.81 A3.00007 3.00007 -180 0 0 3 93.81 L117 93.81 A3.00007 3.00007 -180 0 0 120 90.81 L120 59.31 A3.00007					 3.00007 -180 0 0 117 56.31 L3 56.31 A3.00007 3.00007 -180 0 0 0 59.31 L0 90.81 Z" class="st3"></path>		<text x="23.82" y="78.66" class="st4" v:langid="1033"><v:paragraph v:horizalign="1"></v:paragraph><v:tablist></v:tablist>qtivtransform</text>		</g>	<g id="shape17-8" v:mid="17" v:groupcontext="shape" transform="translate(273.75,-60.75)">		<title>Sheet.17</title>		<path d="M0 93.81 L14.44 93.81" class="st5"></path>	</g>	<g id="shape18-11" v:mid="18" v:groupcontext="shape" transform="translate(287.319,-57.7582)">		<title>Sheet.18</title>		<path d="M0 93.81 L5.18 90.82 L0 87.83 L0 93.81 Z" class="st6"></path>	</g>	<g id="shape20-13" v:mid="20" v:groupcontext="shape" transform="translate(135,-60.75)">		<title>Sheet.20</title>		<path d="M0 93.81 L14.44 93.81" class="st5"></path>	</g>	<g id="shape21-16" v:mid="21" v:groupcontext="shape" transform="translate(148.569,-57.7582)">		<title>Sheet.21</title>		<path d="M0 93.81 L5.18 90.82 L0 87.83 L0 93.81 Z" class="st6"></path>	</g>	<g id="shape23-18" v:mid="23" v:groupcontext="shape" transform="translate(292.5,-42)">		<title>Sheet.23</title>		<desc>Waylandsink</desc>		<v:textblock v:margins="rect(0,0,0,0)"></v:textblock>		<v:textrect cx="60" cy="75.059" width="120" height="37.5"></v:textrect>		<path d="M0 90.81 A3.00007 3.00007 -180 0 0 3 93.81 L117 93.81 A3.00007 3.00007 -180 0 0 120 90.81 L120 59.31 A3.00007					 3.00007 -180 0 0 117 56.31 L3 56.31 A3.00007 3.00007 -180 0 0 0 59.31 L0 90.81 Z" class="st7"></path>		<text x="26.26" y="78.66" class="st4" v:langid="1033"><v:paragraph v:horizalign="1"></v:paragraph><v:tablist></v:tablist>Waylandsink</text>		</g>	<g id="shape26-21" v:mid="26" v:groupcontext="shape" transform="translate(15,-42)">		<title>Sheet.26</title>		<desc>camsrc</desc>		<v:textblock v:margins="rect(0,0,0,0)"></v:textblock>		<v:textrect cx="60" cy="75.059" width="120" height="37.5"></v:textrect>		<path d="M0 90.81 A3.00007 3.00007 -180 0 0 3 93.81 L117 93.81 A3.00007 3.00007 -180 0 0 120 90.81 L120 59.31 A3.00007					 3.00007 -180 0 0 117 56.31 L3 56.31 A3.00007 3.00007 -180 0 0 0 59.31 L0 90.81 Z" class="st7"></path>		<text x="40.07" y="78.66" class="st4" v:langid="1033"><v:paragraph v:horizalign="1"></v:paragraph><v:tablist></v:tablist>camsrc</text>		</g>	<g id="group28-24" transform="translate(302.375,-14.7814)" v:mid="28" v:groupcontext="group">		<title>Sheet.28</title>		<g id="shape7-25" v:mid="7" v:groupcontext="shape" transform="translate(15.1882,1.42109E-14)">			<title>Sheet.7</title>			<desc>Qualcomm</desc>			<v:textblock v:margins="rect(0,0,0,0)"></v:textblock>			<v:textrect cx="28.9021" cy="87.509" width="57.81" height="12.6"></v:textrect>			<rect x="0" y="81.209" width="57.8042" height="12.6" class="st8"></rect>			<text x="-0" y="90.66" class="st9" v:langid="1033"><v:paragraph></v:paragraph><v:tablist></v:tablist>Qualcomm  </text>			</g>		<g id="shape8-28" v:mid="8" v:groupcontext="shape" transform="translate(9.99201E-16,-0.21863)">			<title>Sheet.8</title>			<path d="M0 92.31 A1.50003 1.50003 -180 0 0 1.5 93.81 L10.5 93.81 A1.50003 1.50003 -180 0 0 12 92.31 L12 83.31 A1.50003						 1.50003 -180 0 0 10.5 81.81 L1.5 81.81 A1.50003 1.50003 -180 0 0 0 83.31 L0 92.31 Z" class="st3"></path>		</g>		<g id="shape10-30" v:mid="10" v:groupcontext="shape" transform="translate(89.1246,1.42109E-14)">			<title>Sheet.10</title>			<desc>开源</desc>			<v:textblock v:margins="rect(0,0,0,0)"></v:textblock>			<v:textrect cx="10.5" cy="87.509" width="21.01" height="12.6"></v:textrect>			<rect x="0" y="81.209" width="21" height="12.6" class="st8"></rect>			<text x="0" y="91" class="st10" v:langid="1033"><v:paragraph></v:paragraph><v:tablist></v:tablist>开源</text>			</g>		<g id="shape11-33" v:mid="11" v:groupcontext="shape" transform="translate(73.9363,-0.21863)">			<title>Sheet.11</title>			<path d="M0 92.31 A1.50003 1.50003 -180 0 0 1.5 93.81 L10.5 93.81 A1.50003 1.50003 -180 0 0 12 92.31 L12 83.31 A1.50003						 1.50003 -180 0 0 10.5 81.81 L1.5 81.81 A1.50003 1.50003 -180 0 0 -0 83.31 L0 92.31 Z" class="st7"></path>		</g>	</g></g>
</svg>

## 离线 1080p 流转 1080p - 旋转 (90/180/270)

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

用例展示了将文件源中的场景旋转 180 度的过程。旋转后的场景显示在本地显示器上。

Note: 要以不同的角度旋转视频，请参阅 [qtivtransform](https://docs.qualcomm.com/doc/80-70022-50SC/topic/qtivtransform.html) 中的 rotate 属性。

使用以下命令在目标设备上运行用例：
- 使用 Qualcomm Computer Vision SDK (fcv) 转换在 DSP 上运行的场景 引擎：

        gst-launch-1.0 -e filesrc location=/opt/<H264/AVC_file>.mp4 ! qtdemux ! queue ! h264parse ! v4l2h264dec capture-io-mode=4 output-io-mode=4 ! video/x-raw,format=NV12 ! qtivtransform engine=fcv rotate=180 ! queue ! waylandsink fullscreen=trueCopy to clipboard
- 使用 OpenGL ES 转换在 GPU 上运行的场景：

        gst-launch-1.0 -e filesrc location=/opt/<H264/AVC_file>.mp4 ! qtdemux ! queue ! h264parse ! v4l2h264dec capture-io-mode=4 output-io-mode=4 ! video/x-raw,format=NV12 ! qtivtransform engine=gles rotate=180 ! queue ! waylandsink fullscreen=trueCopy to clipboard

显示来自文件源的转换流。

要停止用例，请按 CTRL + C。

下图展示了 pipeline 执行的流程：

Figure : 旋转与显示的 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_rotation_display_display_file_source.svg pipeline_rotation_display_displ -->
<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.73958in" height="1.63414in" viewbox="0 0 701.25 117.658" xml:space="preserve" color-interpolation-filters="sRGB" class="st12"><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: #2a2aea; stroke: none; stroke-linecap: butt; stroke-width: 0.75 }
.svg-2 .st9 { fill: none; stroke: none; stroke-linecap: butt; stroke-width: 0.75 }
.svg-2 .st10 { fill: #000000; font-family: Roboto; font-size: 0.874992em }
.svg-2 .st11 { fill: #000000; font-family: SimHei; font-size: 0.874992em }
.svg-2 .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_rotation_display_displ</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.374886)">		<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="350.25" cy="59.2038" width="700.5" height="116.908"></v:textrect>		<path d="M0 112.03 A5.62513 5.62513 -180 0 0 5.63 117.66 L694.87 117.66 A5.62513 5.62513 -180 0 0 700.5 112.03 L700.5					 6.37 A5.62513 5.62513 -180 0 0 694.87 0.75 L5.62 0.75 A5.62513 5.62513 -180 0 0 -0 6.37 L0 112.03 Z" class="st1"></path>		<text x="327.45" 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="M695.25 0.75 C698.14 0.75 700.5 3.11 700.5 6 L700.5 111.66 C700.5 114.55 698.14 116.91 695.25 116.91 L6 116.91					 C3.11 116.91 0.75 114.55 0.75 111.66 L0.75 6 C0.75 3.11 3.11 0.75 6 0.75 L695.25 0.75 ZM695.25 0 L6 0 C2.69					 0 0 2.69 0 6 L0 111.66 C0 114.97 2.69 117.66 6 117.66 L695.25 117.66 C698.56 117.66 701.25 114.97 701.25					 111.66 L701.25 6 C701.25 2.69 698.56 0 695.25 0 Z" class="st3"></path>	</g>	<g id="shape16-6" v:mid="16" v:groupcontext="shape" transform="translate(15,-42)">		<title>Sheet.16</title>		<desc>filesrc</desc>		<v:textblock v:margins="rect(0,0,0,0)"></v:textblock>		<v:textrect cx="48.75" cy="98.9079" width="97.5" height="37.5"></v:textrect>		<path d="M0 114.66 A3.00007 3.00007 -180 0 0 3 117.66 L94.5 117.66 A3.00007 3.00007 -180 0 0 97.5 114.66 L97.5 83.16					 A3.00007 3.00007 -180 0 0 94.5 80.16 L3 80.16 A3.00007 3.00007 -180 0 0 0 83.16 L0 114.66 Z" class="st4"></path>		<text x="32.31" y="102.51" class="st5" v:langid="1033"><v:paragraph v:horizalign="1"></v:paragraph><v:tablist></v:tablist>filesrc</text>		</g>	<g id="shape19-9" v:mid="19" v:groupcontext="shape" transform="translate(112.5,-60.75)">		<title>Sheet.19</title>		<path d="M0 117.66 L14.98 117.66" class="st6"></path>	</g>	<g id="shape20-12" v:mid="20" v:groupcontext="shape" transform="translate(126.717,-58.1322)">		<title>Sheet.20</title>		<path d="M0 117.66 L4.53 115.04 L0 112.42 L0 117.66 Z" class="st7"></path>	</g>	<g id="shape22-14" v:mid="22" v:groupcontext="shape" transform="translate(131.25,-42)">		<title>Sheet.22</title>		<desc>qtdemux</desc>		<v:textblock v:margins="rect(0,0,0,0)"></v:textblock>		<v:textrect cx="48.75" cy="98.9079" width="97.51" height="37.5"></v:textrect>		<path d="M0 114.66 A3.00007 3.00007 -180 0 0 3 117.66 L94.5 117.66 A3.00007 3.00007 -180 0 0 97.5 114.66 L97.5 83.16					 A3.00007 3.00007 -180 0 0 94.5 80.16 L3 80.16 A3.00007 3.00007 -180 0 0 0 83.16 L0 114.66 Z" class="st4"></path>		<text x="25.28" y="102.51" class="st5" v:langid="1033"><v:paragraph v:horizalign="1"></v:paragraph><v:tablist></v:tablist>qtdemux</text>		</g>	<g id="shape25-17" v:mid="25" v:groupcontext="shape" transform="translate(228.75,-60.75)">		<title>Sheet.25</title>		<path d="M0 117.66 L14.98 117.66" class="st6"></path>	</g>	<g id="shape26-20" v:mid="26" v:groupcontext="shape" transform="translate(242.967,-58.1322)">		<title>Sheet.26</title>		<path d="M0 117.66 L4.53 115.04 L0 112.42 L0 117.66 Z" class="st7"></path>	</g>	<g id="shape28-22" v:mid="28" v:groupcontext="shape" transform="translate(247.5,-42)">		<title>Sheet.28</title>		<desc>h264parse</desc>		<v:textblock v:margins="rect(0,0,0,0)"></v:textblock>		<v:textrect cx="48.75" cy="98.9079" width="97.5" height="37.5"></v:textrect>		<path d="M0 114.66 A3.00007 3.00007 -180 0 0 3 117.66 L94.5 117.66 A3.00007 3.00007 -180 0 0 97.5 114.66 L97.5 83.16					 A3.00007 3.00007 -180 0 0 94.5 80.16 L3 80.16 A3.00007 3.00007 -180 0 0 0 83.16 L0 114.66 Z" class="st4"></path>		<text x="20.4" y="102.51" class="st5" v:langid="1033"><v:paragraph v:horizalign="1"></v:paragraph><v:tablist></v:tablist>h264parse</text>		</g>	<g id="shape31-25" v:mid="31" v:groupcontext="shape" transform="translate(345,-60.75)">		<title>Sheet.31</title>		<path d="M0 117.66 L14.98 117.66" class="st6"></path>	</g>	<g id="shape32-28" v:mid="32" v:groupcontext="shape" transform="translate(359.216,-58.1322)">		<title>Sheet.32</title>		<path d="M0 117.66 L4.53 115.04 L0 112.42 L0 117.66 Z" class="st7"></path>	</g>	<g id="shape34-30" v:mid="34" v:groupcontext="shape" transform="translate(363.75,-42)">		<title>Sheet.34</title>		<desc>v4l2h264dec</desc>		<v:textblock v:margins="rect(0,0,0,0)"></v:textblock>		<v:textrect cx="45" cy="98.9079" width="90" height="37.5"></v:textrect>		<path d="M0 114.66 A3.00007 3.00007 -180 0 0 3 117.66 L87 117.66 A3.00007 3.00007 -180 0 0 90 114.66 L90 83.16 A3.00007					 3.00007 -180 0 0 87 80.16 L3 80.16 A3.00007 3.00007 -180 0 0 -0 83.16 L0 114.66 Z" class="st4"></path>		<text x="10.78" y="102.51" class="st5" v:langid="1033"><v:paragraph v:horizalign="1"></v:paragraph><v:tablist></v:tablist>v4l2h264dec</text>		</g>	<g id="shape37-33" v:mid="37" v:groupcontext="shape" transform="translate(453.75,-60.75)">		<title>Sheet.37</title>		<path d="M0 117.66 L14.98 117.66" class="st6"></path>	</g>	<g id="shape38-36" v:mid="38" v:groupcontext="shape" transform="translate(467.966,-58.1322)">		<title>Sheet.38</title>		<path d="M0 117.66 L4.53 115.04 L0 112.42 L0 117.66 Z" class="st7"></path>	</g>	<g id="shape40-38" v:mid="40" v:groupcontext="shape" transform="translate(472.5,-42)">		<title>Sheet.40</title>		<desc>qtivtransform</desc>		<v:textblock v:margins="rect(0,0,0,0)"></v:textblock>		<v:textrect cx="48.75" cy="98.9079" width="97.5" height="37.5"></v:textrect>		<path d="M0 114.66 A3.00007 3.00007 -180 0 0 3 117.66 L94.5 117.66 A3.00007 3.00007 -180 0 0 97.5 114.66 L97.5 83.16					 A3.00007 3.00007 -180 0 0 94.5 80.16 L3 80.16 A3.00007 3.00007 -180 0 0 0 83.16 L0 114.66 Z" class="st8"></path>		<text x="12.57" y="102.51" class="st5" v:langid="1033"><v:paragraph v:horizalign="1"></v:paragraph><v:tablist></v:tablist>qtivtransform</text>		</g>	<g id="shape43-41" v:mid="43" v:groupcontext="shape" transform="translate(570,-60.75)">		<title>Sheet.43</title>		<path d="M0 117.66 L14.98 117.66" class="st6"></path>	</g>	<g id="shape44-44" v:mid="44" v:groupcontext="shape" transform="translate(584.216,-58.1322)">		<title>Sheet.44</title>		<path d="M0 117.66 L4.53 115.04 L0 112.42 L0 117.66 Z" class="st7"></path>	</g>	<g id="shape46-46" v:mid="46" v:groupcontext="shape" transform="translate(588.75,-42)">		<title>Sheet.46</title>		<desc>Waylandsink</desc>		<v:textblock v:margins="rect(0,0,0,0)"></v:textblock>		<v:textrect cx="48.75" cy="98.9079" width="97.51" height="37.5"></v:textrect>		<path d="M0 114.66 A3.00007 3.00007 -180 0 0 3 117.66 L94.5 117.66 A3.00007 3.00007 -180 0 0 97.5 114.66 L97.5 83.16					 A3.00007 3.00007 -180 0 0 94.5 80.16 L3 80.16 A3.00007 3.00007 -180 0 0 -0 83.16 L0 114.66 Z" class="st4"></path>		<text x="15.01" y="102.51" class="st5" v:langid="1033"><v:paragraph v:horizalign="1"></v:paragraph><v:tablist></v:tablist>Waylandsink</text>		</g>	<g id="group48-49" transform="translate(576.125,-14.7814)" v:mid="48" v:groupcontext="group">		<title>Sheet.48</title>		<g id="shape7-50" 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.0271" cy="111.358" width="54.06" height="12.6"></v:textrect>			<rect x="0" y="105.058" width="54.0543" height="12.6" class="st9"></rect>			<text x="0" y="114.51" class="st10" v:langid="1033"><v:paragraph></v:paragraph><v:tablist></v:tablist>Qualcomm  </text>			</g>		<g id="shape8-53" v:mid="8" v:groupcontext="shape" transform="translate(-9.99201E-16,-0.218619)">			<title>Sheet.8</title>			<path d="M0 116.16 A1.50003 1.50003 -180 0 0 1.5 117.66 L10.5 117.66 A1.50003 1.50003 -180 0 0 12 116.16 L12 107.16						 A1.50003 1.50003 -180 0 0 10.5 105.66 L1.5 105.66 A1.50003 1.50003 -180 0 0 -0 107.16 L0 116.16 Z" class="st8"></path>		</g>		<g id="shape10-55" 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="111.358" width="21" height="12.6"></v:textrect>			<rect x="0" y="105.058" width="21" height="12.6" class="st9"></rect>			<text x="0" y="114.85" class="st11" v:langid="1033"><v:paragraph></v:paragraph><v:tablist></v:tablist>开源</text>			</g>		<g id="shape11-58" v:mid="11" v:groupcontext="shape" transform="translate(73.9363,-0.218619)">			<title>Sheet.11</title>			<path d="M0 116.16 A1.50003 1.50003 -180 0 0 1.5 117.66 L10.5 117.66 A1.50003 1.50003 -180 0 0 12 116.16 L12 107.16						 A1.50003 1.50003 -180 0 0 10.5 105.66 L1.5 105.66 A1.50003 1.50003 -180 0 0 -0 107.16 L0 116.16 Z" class="st4"></path>		</g>	</g></g>
</svg>

## 4K 转 1080p – 旋转 (90/180/270) 并降低视频分辨率

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

用例展示了将来自摄像头的 4K 视频流的分辨率降低到 1080p 并旋转 180 度的过程。然后视频将显示在本地显示器设备上。

Note: 要以不同的角度旋转视频，请参阅 [qtivtransform](https://docs.qualcomm.com/doc/80-70022-50SC/topic/qtivtransform.html) 中的 rotate 属性。

使用以下命令在目标设备上运行用例：
- Qualcomm Computer Vision SDK（fcv）引擎：

        gst-launch-1.0 -e qtiqmmfsrc name=camsrc video_0::type=video video_1::type=preview ! video/x-raw,format=NV12,width=3840,height=2160,framerate=30/1 ! qtivtransform engine=fcv rotate=180 ! video/x-raw,format=NV12,width=1920,height=1080 ! waylandsink fullscreen=trueCopy to clipboard
- GLES 引擎：

        gst-launch-1.0 -e qtiqmmfsrc name=camsrc video_0::type=video video_1::type=preview ! video/x-raw,format=NV12,width=3840,height=2160,framerate=30/1 ! qtivtransform engine=gles rotate=180 ! video/x-raw,format=NV12,width=1920,height=1080 ! waylandsink fullscreen=trueCopy to clipboard

将显示来自摄像头的转换流。

要停止用例，请按 CTRL + C。

下图展示了 pipeline 执行的流程：

Figure : 将 4k 图像的分辨率降低到 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_4k_downscaled_1080p_camera_source.svg pipeline_4k_downscaled_1080p_ca -->
<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="5.9375in" height="1.3125in" viewbox="0 0 427.5 94.5" xml:space="preserve" color-interpolation-filters="sRGB" class="st14"><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: #d2d7e1; stroke: none; stroke-linecap: butt; stroke-width: 0.75 }
.svg-3 .st3 { fill: #2a2aea; stroke: none; stroke-linecap: butt; stroke-width: 0.75 }
.svg-3 .st4 { fill: #ffffff; font-family: Roboto; font-size: 1.00001em }
.svg-3 .st5 { font-size: 1em; letter-spacing: -0.0208332em }
.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: #007884; stroke: none; stroke-linecap: butt; stroke-width: 0.75 }
.svg-3 .st9 { fill: #ffffff; font-family: Roboto; font-size: 1.00001em; letter-spacing: -0.0166665em }
.svg-3 .st10 { font-size: 1em; letter-spacing: -0.00833327em }
.svg-3 .st11 { fill: none; stroke: none; stroke-linecap: butt; stroke-width: 0.75 }
.svg-3 .st12 { fill: #000000; font-family: Roboto; font-size: 0.874992em }
.svg-3 .st13 { fill: #000000; font-family: SimHei; font-size: 0.874992em }
.svg-3 .st14 { 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_4k_downscaled_1080p_ca</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.375046)">		<title>Sheet.3</title>		<path d="M0 88.87 A5.62513 5.62513 -180 0 0 5.63 94.5 L421.13 94.5 A5.62513 5.62513 -180 0 0 426.75 88.87 L426.75 6.38					 A5.62513 5.62513 -180 0 0 421.13 0.75 L5.63 0.75 A5.62513 5.62513 -180 0 0 -0 6.38 L0 88.87 Z" class="st1"></path>	</g>	<g id="shape4-3" v:mid="4" v:groupcontext="shape">		<title>Sheet.4</title>		<path d="M421.5 0.75 C424.39 0.75 426.75 3.11 426.75 6 L426.75 88.5 C426.75 91.39 424.39 93.75 421.5 93.75 L6 93.75 C3.11					 93.75 0.75 91.39 0.75 88.5 L0.75 6 C0.75 3.11 3.11 0.75 6 0.75 L421.5 0.75 ZM421.5 0 L6 0 C2.69 0 0 2.69					 0 6 L0 88.5 C0 91.81 2.69 94.5 6 94.5 L421.5 94.5 C424.81 94.5 427.5 91.81 427.5 88.5 L427.5 6 C427.5 2.69					 424.81 0 421.5 0 Z" class="st2"></path>	</g>	<g id="shape13-5" v:mid="13" v:groupcontext="shape" transform="translate(153.75,-42)">		<title>Sheet.13</title>		<desc>qtivtransform</desc>		<v:textblock v:margins="rect(0,0,0,0)"></v:textblock>		<v:textrect cx="60" cy="75.75" width="120.01" height="37.5"></v:textrect>		<path d="M0 91.5 A3.00007 3.00007 -180 0 0 3 94.5 L117 94.5 A3.00007 3.00007 -180 0 0 120 91.5 L120 60 A3.00007 3.00007					 -180 0 0 117 57 L3 57 A3.00007 3.00007 -180 0 0 0 60 L0 91.5 Z" class="st3"></path>		<text x="23.94" y="79.35" class="st4" v:langid="1033"><v:paragraph v:horizalign="1"></v:paragraph><v:tablist></v:tablist>qtivt<tspan class="st5">r</tspan>ansform</text>		</g>	<g id="shape16-9" v:mid="16" v:groupcontext="shape" transform="translate(273.75,-60.75)">		<title>Sheet.16</title>		<path d="M0 94.5 L13.69 94.5" class="st6"></path>	</g>	<g id="shape17-12" v:mid="17" v:groupcontext="shape" transform="translate(286.569,-57.7582)">		<title>Sheet.17</title>		<path d="M0 94.5 L5.18 91.51 L0 88.52 L0 94.5 Z" class="st7"></path>	</g>	<g id="shape19-14" v:mid="19" v:groupcontext="shape" transform="translate(135,-60.75)">		<title>Sheet.19</title>		<path d="M0 94.5 L13.69 94.5" class="st6"></path>	</g>	<g id="shape20-17" v:mid="20" v:groupcontext="shape" transform="translate(147.819,-57.7582)">		<title>Sheet.20</title>		<path d="M0 94.5 L5.18 91.51 L0 88.52 L0 94.5 Z" class="st7"></path>	</g>	<g id="shape21-19" v:mid="21" v:groupcontext="shape" transform="translate(292.5,-42)">		<title>Sheet.21</title>		<desc>Waylandsink</desc>		<v:textblock v:margins="rect(0,0,0,0)"></v:textblock>		<v:textrect cx="60" cy="75.75" width="120.01" height="37.5"></v:textrect>		<path d="M0 91.5 A3.00007 3.00007 -180 0 0 3 94.5 L117 94.5 A3.00007 3.00007 -180 0 0 120 91.5 L120 60 A3.00007 3.00007					 -180 0 0 117 57 L3 57 A3.00007 3.00007 -180 0 0 0 60 L0 91.5 Z" class="st8"></path>		<text x="27.36" y="79.35" class="st9" v:langid="1033"><v:paragraph v:horizalign="1"></v:paragraph><v:tablist></v:tablist>Waylandsink</text>		</g>	<g id="shape23-22" v:mid="23" v:groupcontext="shape" transform="translate(15,-42)">		<title>Sheet.23</title>		<desc>camsrc</desc>		<v:textblock v:margins="rect(0,0,0,0)"></v:textblock>		<v:textrect cx="60" cy="75.75" width="120.01" height="37.5"></v:textrect>		<path d="M0 91.5 A3.00007 3.00007 -180 0 0 3 94.5 L117 94.5 A3.00007 3.00007 -180 0 0 120 91.5 L120 60 A3.00007 3.00007					 -180 0 0 117 57 L3 57 A3.00007 3.00007 -180 0 0 0 60 L0 91.5 Z" class="st8"></path>		<text x="40.12" y="79.35" class="st4" v:langid="1033"><v:paragraph v:horizalign="1"></v:paragraph><v:tablist></v:tablist>cams<tspan class="st10">r</tspan>c</text>		</g>	<g id="group27-26" transform="translate(302.375,-14.7814)" v:mid="27" v:groupcontext="group">		<title>Sheet.27</title>		<g id="shape7-27" 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.8984" cy="88.2" width="55.8" height="12.6"></v:textrect>			<rect x="0" y="81.9" width="55.7968" height="12.6" class="st11"></rect>			<text x="-0" y="91.35" class="st12" v:langid="1033"><v:paragraph></v:paragraph><v:tablist></v:tablist>Qualcomm  </text>			</g>		<g id="shape8-30" v:mid="8" v:groupcontext="shape" transform="translate(7.99361E-15,-0.218596)">			<title>Sheet.8</title>			<path d="M0 93 A1.50003 1.50003 -180 0 0 1.5 94.5 L10.5 94.5 A1.50003 1.50003 -180 0 0 12 93 L12 84 A1.50003 1.50003						 -180 0 0 10.5 82.5 L1.5 82.5 A1.50003 1.50003 -180 0 0 0 84 L0 93 Z" class="st3"></path>		</g>		<g id="shape10-32" 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="88.2" width="21.01" height="12.6"></v:textrect>			<rect x="0" y="81.9" width="21" height="12.6" class="st11"></rect>			<text x="-0" y="91.69" class="st13" v:langid="1033"><v:paragraph></v:paragraph><v:tablist></v:tablist>开源</text>			</g>		<g id="shape11-35" v:mid="11" v:groupcontext="shape" transform="translate(73.9363,-0.218596)">			<title>Sheet.11</title>			<path d="M0 93 A1.50003 1.50003 -180 0 0 1.5 94.5 L10.5 94.5 A1.50003 1.50003 -180 0 0 12 93 L12 84 A1.50003 1.50003						 -180 0 0 10.5 82.5 L1.5 82.5 A1.50003 1.50003 -180 0 0 0 84 L0 93 Z" class="st8"></path>		</g>	</g></g>
</svg>

## 离线 4K 转 1080p – 旋转 (90/180/270) 并降低视频分辨率

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

该 pipeline 展示了将来自文件源的 4k 视频流的分辨率降低到 1080p 并旋转 180 度的过程。然后视频将显示在本地显示器设备上。

Note: 要以不同的角度旋转视频，请参阅 [qtivtransform](https://docs.qualcomm.com/doc/80-70022-50SC/topic/qtivtransform.html) 中的 rotate 属性。

使用以下命令在目标设备上运行用例：
- Qualcomm Computer Vision SDK（fcv）引擎：

        gst-launch-1.0 -e filesrc location=/opt/<4K_H264/AVC_file>.mp4 ! qtdemux ! queue ! h264parse ! v4l2h264dec capture-io-mode=4 output-io-mode=4 ! video/x-raw,format=NV12 ! qtivtransform engine=fcv rotate=180 ! video/x-raw,format=NV12,width=1920,height=1080 ! waylandsink fullscreen=trueCopy to clipboard
- GLES 引擎：

        gst-launch-1.0 -e filesrc location=/opt/<4K_H264/AVC_file>.mp4 ! qtdemux ! queue ! h264parse ! v4l2h264dec capture-io-mode=4 output-io-mode=4 ! video/x-raw,format=NV12 ! qtivtransform engine=gles rotate=180 ! video/x-raw,format=NV12,width=1920,height=1080 ! waylandsink fullscreen=trueCopy to clipboard

显示来自文件源的转换流。

要停止用例，请按 CTRL + C。

下图展示了 pipeline 执行的流程：

Figure : 将 4k 流分辨率降低到 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_rotation_display_display_file_source.svg pipeline_rotation_display_displ -->
<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.73958in" height="1.63414in" viewbox="0 0 701.25 117.658" xml:space="preserve" color-interpolation-filters="sRGB" class="st12"><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: #2a2aea; stroke: none; stroke-linecap: butt; stroke-width: 0.75 }
.svg-4 .st9 { fill: none; stroke: none; stroke-linecap: butt; stroke-width: 0.75 }
.svg-4 .st10 { fill: #000000; font-family: Roboto; font-size: 0.874992em }
.svg-4 .st11 { fill: #000000; font-family: SimHei; font-size: 0.874992em }
.svg-4 .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_rotation_display_displ</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.374886)">		<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="350.25" cy="59.2038" width="700.5" height="116.908"></v:textrect>		<path d="M0 112.03 A5.62513 5.62513 -180 0 0 5.63 117.66 L694.87 117.66 A5.62513 5.62513 -180 0 0 700.5 112.03 L700.5					 6.37 A5.62513 5.62513 -180 0 0 694.87 0.75 L5.62 0.75 A5.62513 5.62513 -180 0 0 -0 6.37 L0 112.03 Z" class="st1"></path>		<text x="327.45" 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="M695.25 0.75 C698.14 0.75 700.5 3.11 700.5 6 L700.5 111.66 C700.5 114.55 698.14 116.91 695.25 116.91 L6 116.91					 C3.11 116.91 0.75 114.55 0.75 111.66 L0.75 6 C0.75 3.11 3.11 0.75 6 0.75 L695.25 0.75 ZM695.25 0 L6 0 C2.69					 0 0 2.69 0 6 L0 111.66 C0 114.97 2.69 117.66 6 117.66 L695.25 117.66 C698.56 117.66 701.25 114.97 701.25					 111.66 L701.25 6 C701.25 2.69 698.56 0 695.25 0 Z" class="st3"></path>	</g>	<g id="shape16-6" v:mid="16" v:groupcontext="shape" transform="translate(15,-42)">		<title>Sheet.16</title>		<desc>filesrc</desc>		<v:textblock v:margins="rect(0,0,0,0)"></v:textblock>		<v:textrect cx="48.75" cy="98.9079" width="97.5" height="37.5"></v:textrect>		<path d="M0 114.66 A3.00007 3.00007 -180 0 0 3 117.66 L94.5 117.66 A3.00007 3.00007 -180 0 0 97.5 114.66 L97.5 83.16					 A3.00007 3.00007 -180 0 0 94.5 80.16 L3 80.16 A3.00007 3.00007 -180 0 0 0 83.16 L0 114.66 Z" class="st4"></path>		<text x="32.31" y="102.51" class="st5" v:langid="1033"><v:paragraph v:horizalign="1"></v:paragraph><v:tablist></v:tablist>filesrc</text>		</g>	<g id="shape19-9" v:mid="19" v:groupcontext="shape" transform="translate(112.5,-60.75)">		<title>Sheet.19</title>		<path d="M0 117.66 L14.98 117.66" class="st6"></path>	</g>	<g id="shape20-12" v:mid="20" v:groupcontext="shape" transform="translate(126.717,-58.1322)">		<title>Sheet.20</title>		<path d="M0 117.66 L4.53 115.04 L0 112.42 L0 117.66 Z" class="st7"></path>	</g>	<g id="shape22-14" v:mid="22" v:groupcontext="shape" transform="translate(131.25,-42)">		<title>Sheet.22</title>		<desc>qtdemux</desc>		<v:textblock v:margins="rect(0,0,0,0)"></v:textblock>		<v:textrect cx="48.75" cy="98.9079" width="97.51" height="37.5"></v:textrect>		<path d="M0 114.66 A3.00007 3.00007 -180 0 0 3 117.66 L94.5 117.66 A3.00007 3.00007 -180 0 0 97.5 114.66 L97.5 83.16					 A3.00007 3.00007 -180 0 0 94.5 80.16 L3 80.16 A3.00007 3.00007 -180 0 0 0 83.16 L0 114.66 Z" class="st4"></path>		<text x="25.28" y="102.51" class="st5" v:langid="1033"><v:paragraph v:horizalign="1"></v:paragraph><v:tablist></v:tablist>qtdemux</text>		</g>	<g id="shape25-17" v:mid="25" v:groupcontext="shape" transform="translate(228.75,-60.75)">		<title>Sheet.25</title>		<path d="M0 117.66 L14.98 117.66" class="st6"></path>	</g>	<g id="shape26-20" v:mid="26" v:groupcontext="shape" transform="translate(242.967,-58.1322)">		<title>Sheet.26</title>		<path d="M0 117.66 L4.53 115.04 L0 112.42 L0 117.66 Z" class="st7"></path>	</g>	<g id="shape28-22" v:mid="28" v:groupcontext="shape" transform="translate(247.5,-42)">		<title>Sheet.28</title>		<desc>h264parse</desc>		<v:textblock v:margins="rect(0,0,0,0)"></v:textblock>		<v:textrect cx="48.75" cy="98.9079" width="97.5" height="37.5"></v:textrect>		<path d="M0 114.66 A3.00007 3.00007 -180 0 0 3 117.66 L94.5 117.66 A3.00007 3.00007 -180 0 0 97.5 114.66 L97.5 83.16					 A3.00007 3.00007 -180 0 0 94.5 80.16 L3 80.16 A3.00007 3.00007 -180 0 0 0 83.16 L0 114.66 Z" class="st4"></path>		<text x="20.4" y="102.51" class="st5" v:langid="1033"><v:paragraph v:horizalign="1"></v:paragraph><v:tablist></v:tablist>h264parse</text>		</g>	<g id="shape31-25" v:mid="31" v:groupcontext="shape" transform="translate(345,-60.75)">		<title>Sheet.31</title>		<path d="M0 117.66 L14.98 117.66" class="st6"></path>	</g>	<g id="shape32-28" v:mid="32" v:groupcontext="shape" transform="translate(359.216,-58.1322)">		<title>Sheet.32</title>		<path d="M0 117.66 L4.53 115.04 L0 112.42 L0 117.66 Z" class="st7"></path>	</g>	<g id="shape34-30" v:mid="34" v:groupcontext="shape" transform="translate(363.75,-42)">		<title>Sheet.34</title>		<desc>v4l2h264dec</desc>		<v:textblock v:margins="rect(0,0,0,0)"></v:textblock>		<v:textrect cx="45" cy="98.9079" width="90" height="37.5"></v:textrect>		<path d="M0 114.66 A3.00007 3.00007 -180 0 0 3 117.66 L87 117.66 A3.00007 3.00007 -180 0 0 90 114.66 L90 83.16 A3.00007					 3.00007 -180 0 0 87 80.16 L3 80.16 A3.00007 3.00007 -180 0 0 -0 83.16 L0 114.66 Z" class="st4"></path>		<text x="10.78" y="102.51" class="st5" v:langid="1033"><v:paragraph v:horizalign="1"></v:paragraph><v:tablist></v:tablist>v4l2h264dec</text>		</g>	<g id="shape37-33" v:mid="37" v:groupcontext="shape" transform="translate(453.75,-60.75)">		<title>Sheet.37</title>		<path d="M0 117.66 L14.98 117.66" class="st6"></path>	</g>	<g id="shape38-36" v:mid="38" v:groupcontext="shape" transform="translate(467.966,-58.1322)">		<title>Sheet.38</title>		<path d="M0 117.66 L4.53 115.04 L0 112.42 L0 117.66 Z" class="st7"></path>	</g>	<g id="shape40-38" v:mid="40" v:groupcontext="shape" transform="translate(472.5,-42)">		<title>Sheet.40</title>		<desc>qtivtransform</desc>		<v:textblock v:margins="rect(0,0,0,0)"></v:textblock>		<v:textrect cx="48.75" cy="98.9079" width="97.5" height="37.5"></v:textrect>		<path d="M0 114.66 A3.00007 3.00007 -180 0 0 3 117.66 L94.5 117.66 A3.00007 3.00007 -180 0 0 97.5 114.66 L97.5 83.16					 A3.00007 3.00007 -180 0 0 94.5 80.16 L3 80.16 A3.00007 3.00007 -180 0 0 0 83.16 L0 114.66 Z" class="st8"></path>		<text x="12.57" y="102.51" class="st5" v:langid="1033"><v:paragraph v:horizalign="1"></v:paragraph><v:tablist></v:tablist>qtivtransform</text>		</g>	<g id="shape43-41" v:mid="43" v:groupcontext="shape" transform="translate(570,-60.75)">		<title>Sheet.43</title>		<path d="M0 117.66 L14.98 117.66" class="st6"></path>	</g>	<g id="shape44-44" v:mid="44" v:groupcontext="shape" transform="translate(584.216,-58.1322)">		<title>Sheet.44</title>		<path d="M0 117.66 L4.53 115.04 L0 112.42 L0 117.66 Z" class="st7"></path>	</g>	<g id="shape46-46" v:mid="46" v:groupcontext="shape" transform="translate(588.75,-42)">		<title>Sheet.46</title>		<desc>Waylandsink</desc>		<v:textblock v:margins="rect(0,0,0,0)"></v:textblock>		<v:textrect cx="48.75" cy="98.9079" width="97.51" height="37.5"></v:textrect>		<path d="M0 114.66 A3.00007 3.00007 -180 0 0 3 117.66 L94.5 117.66 A3.00007 3.00007 -180 0 0 97.5 114.66 L97.5 83.16					 A3.00007 3.00007 -180 0 0 94.5 80.16 L3 80.16 A3.00007 3.00007 -180 0 0 -0 83.16 L0 114.66 Z" class="st4"></path>		<text x="15.01" y="102.51" class="st5" v:langid="1033"><v:paragraph v:horizalign="1"></v:paragraph><v:tablist></v:tablist>Waylandsink</text>		</g>	<g id="group48-49" transform="translate(576.125,-14.7814)" v:mid="48" v:groupcontext="group">		<title>Sheet.48</title>		<g id="shape7-50" 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.0271" cy="111.358" width="54.06" height="12.6"></v:textrect>			<rect x="0" y="105.058" width="54.0543" height="12.6" class="st9"></rect>			<text x="0" y="114.51" class="st10" v:langid="1033"><v:paragraph></v:paragraph><v:tablist></v:tablist>Qualcomm  </text>			</g>		<g id="shape8-53" v:mid="8" v:groupcontext="shape" transform="translate(-9.99201E-16,-0.218619)">			<title>Sheet.8</title>			<path d="M0 116.16 A1.50003 1.50003 -180 0 0 1.5 117.66 L10.5 117.66 A1.50003 1.50003 -180 0 0 12 116.16 L12 107.16						 A1.50003 1.50003 -180 0 0 10.5 105.66 L1.5 105.66 A1.50003 1.50003 -180 0 0 -0 107.16 L0 116.16 Z" class="st8"></path>		</g>		<g id="shape10-55" 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="111.358" width="21" height="12.6"></v:textrect>			<rect x="0" y="105.058" width="21" height="12.6" class="st9"></rect>			<text x="0" y="114.85" class="st11" v:langid="1033"><v:paragraph></v:paragraph><v:tablist></v:tablist>开源</text>			</g>		<g id="shape11-58" v:mid="11" v:groupcontext="shape" transform="translate(73.9363,-0.218619)">			<title>Sheet.11</title>			<path d="M0 116.16 A1.50003 1.50003 -180 0 0 1.5 117.66 L10.5 117.66 A1.50003 1.50003 -180 0 0 12 116.16 L12 107.16						 A1.50003 1.50003 -180 0 0 10.5 105.66 L1.5 105.66 A1.50003 1.50003 -180 0 0 -0 107.16 L0 116.16 Z" class="st4"></path>		</g>	</g></g>
</svg>

## 1080p 转 1080p – 水平和垂直翻转

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

用例展示了如何对摄像头流场景进行水平翻转。

Note: 要翻转场景，请在以下命令中将 `flip-horizontal`替换为 `flip-vertical`，反之亦然。有关更多信息，请参阅 [qtivtransform](https://docs.qualcomm.com/doc/80-70022-50SC/topic/qtivtransform.html)。

使用以下命令在目标设备上运行用例：
- Qualcomm Computer Vision SDK（fcv）引擎：

        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 ! qtivtransform engine=fcv flip-horizontal=true ! waylandsink fullscreen=trueCopy to clipboard
- GLES 引擎：

        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 ! qtivtransform engine=gles flip-horizontal=true ! waylandsink fullscreen=trueCopy to clipboard

显示来自摄像头的转换流。

要停止用例，请按 CTRL + C。

下图展示了 pipeline 执行的流程：

Figure : 显示翻转图像的 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_rotation_display_display_camera_source.svg pipeline_rotation_display_displ -->
<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="5.9375in" height="1.3029in" viewbox="0 0 427.5 93.809" xml:space="preserve" color-interpolation-filters="sRGB" class="st11"><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: #d2d7e1; stroke: none; stroke-linecap: butt; stroke-width: 0.75 }
.svg-5 .st3 { fill: #2a2aea; stroke: none; stroke-linecap: butt; stroke-width: 0.75 }
.svg-5 .st4 { fill: #ffffff; font-family: Roboto; font-size: 1.00001em }
.svg-5 .st5 { stroke: #000000; stroke-linecap: butt; stroke-width: 0.75 }
.svg-5 .st6 { fill: #000000; stroke: none; stroke-linecap: butt; stroke-width: 0.75 }
.svg-5 .st7 { fill: #007884; 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: Roboto; font-size: 0.874992em }
.svg-5 .st10 { fill: #000000; font-family: SimHei; font-size: 0.874992em }
.svg-5 .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>pipeline_rotation_display_displ</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.375034)">		<title>Sheet.3</title>		<path d="M0 88.18 A5.62513 5.62513 -180 0 0 5.63 93.81 L421.13 93.81 A5.62513 5.62513 -180 0 0 426.75 88.18 L426.75 6.38					 A5.62513 5.62513 -180 0 0 421.13 0.75 L5.63 0.75 A5.62513 5.62513 -180 0 0 -0 6.38 L0 88.18 Z" class="st1"></path>	</g>	<g id="shape4-3" v:mid="4" v:groupcontext="shape">		<title>Sheet.4</title>		<path d="M421.5 0.75 C424.39 0.75 426.75 3.11 426.75 6 L426.75 87.81 C426.75 90.7 424.39 93.06 421.5 93.06 L6 93.06 C3.11					 93.06 0.75 90.7 0.75 87.81 L0.75 6 C0.75 3.11 3.11 0.75 6 0.75 L421.5 0.75 ZM421.5 0 L6 0 C2.69 0 0 2.69					 0 6 L0 87.81 C0 91.12 2.69 93.81 6 93.81 L421.5 93.81 C424.81 93.81 427.5 91.12 427.5 87.81 L427.5 6 C427.5					 2.69 424.81 0 421.5 0 Z" class="st2"></path>	</g>	<g id="shape14-5" v:mid="14" v:groupcontext="shape" transform="translate(153.75,-42)">		<title>Sheet.14</title>		<desc>qtivtransform</desc>		<v:textblock v:margins="rect(0,0,0,0)"></v:textblock>		<v:textrect cx="60" cy="75.059" width="120" height="37.5"></v:textrect>		<path d="M0 90.81 A3.00007 3.00007 -180 0 0 3 93.81 L117 93.81 A3.00007 3.00007 -180 0 0 120 90.81 L120 59.31 A3.00007					 3.00007 -180 0 0 117 56.31 L3 56.31 A3.00007 3.00007 -180 0 0 0 59.31 L0 90.81 Z" class="st3"></path>		<text x="23.82" y="78.66" class="st4" v:langid="1033"><v:paragraph v:horizalign="1"></v:paragraph><v:tablist></v:tablist>qtivtransform</text>		</g>	<g id="shape17-8" v:mid="17" v:groupcontext="shape" transform="translate(273.75,-60.75)">		<title>Sheet.17</title>		<path d="M0 93.81 L14.44 93.81" class="st5"></path>	</g>	<g id="shape18-11" v:mid="18" v:groupcontext="shape" transform="translate(287.319,-57.7582)">		<title>Sheet.18</title>		<path d="M0 93.81 L5.18 90.82 L0 87.83 L0 93.81 Z" class="st6"></path>	</g>	<g id="shape20-13" v:mid="20" v:groupcontext="shape" transform="translate(135,-60.75)">		<title>Sheet.20</title>		<path d="M0 93.81 L14.44 93.81" class="st5"></path>	</g>	<g id="shape21-16" v:mid="21" v:groupcontext="shape" transform="translate(148.569,-57.7582)">		<title>Sheet.21</title>		<path d="M0 93.81 L5.18 90.82 L0 87.83 L0 93.81 Z" class="st6"></path>	</g>	<g id="shape23-18" v:mid="23" v:groupcontext="shape" transform="translate(292.5,-42)">		<title>Sheet.23</title>		<desc>Waylandsink</desc>		<v:textblock v:margins="rect(0,0,0,0)"></v:textblock>		<v:textrect cx="60" cy="75.059" width="120" height="37.5"></v:textrect>		<path d="M0 90.81 A3.00007 3.00007 -180 0 0 3 93.81 L117 93.81 A3.00007 3.00007 -180 0 0 120 90.81 L120 59.31 A3.00007					 3.00007 -180 0 0 117 56.31 L3 56.31 A3.00007 3.00007 -180 0 0 0 59.31 L0 90.81 Z" class="st7"></path>		<text x="26.26" y="78.66" class="st4" v:langid="1033"><v:paragraph v:horizalign="1"></v:paragraph><v:tablist></v:tablist>Waylandsink</text>		</g>	<g id="shape26-21" v:mid="26" v:groupcontext="shape" transform="translate(15,-42)">		<title>Sheet.26</title>		<desc>camsrc</desc>		<v:textblock v:margins="rect(0,0,0,0)"></v:textblock>		<v:textrect cx="60" cy="75.059" width="120" height="37.5"></v:textrect>		<path d="M0 90.81 A3.00007 3.00007 -180 0 0 3 93.81 L117 93.81 A3.00007 3.00007 -180 0 0 120 90.81 L120 59.31 A3.00007					 3.00007 -180 0 0 117 56.31 L3 56.31 A3.00007 3.00007 -180 0 0 0 59.31 L0 90.81 Z" class="st7"></path>		<text x="40.07" y="78.66" class="st4" v:langid="1033"><v:paragraph v:horizalign="1"></v:paragraph><v:tablist></v:tablist>camsrc</text>		</g>	<g id="group28-24" transform="translate(302.375,-14.7814)" v:mid="28" v:groupcontext="group">		<title>Sheet.28</title>		<g id="shape7-25" v:mid="7" v:groupcontext="shape" transform="translate(15.1882,1.42109E-14)">			<title>Sheet.7</title>			<desc>Qualcomm</desc>			<v:textblock v:margins="rect(0,0,0,0)"></v:textblock>			<v:textrect cx="28.9021" cy="87.509" width="57.81" height="12.6"></v:textrect>			<rect x="0" y="81.209" width="57.8042" height="12.6" class="st8"></rect>			<text x="-0" y="90.66" class="st9" v:langid="1033"><v:paragraph></v:paragraph><v:tablist></v:tablist>Qualcomm  </text>			</g>		<g id="shape8-28" v:mid="8" v:groupcontext="shape" transform="translate(9.99201E-16,-0.21863)">			<title>Sheet.8</title>			<path d="M0 92.31 A1.50003 1.50003 -180 0 0 1.5 93.81 L10.5 93.81 A1.50003 1.50003 -180 0 0 12 92.31 L12 83.31 A1.50003						 1.50003 -180 0 0 10.5 81.81 L1.5 81.81 A1.50003 1.50003 -180 0 0 0 83.31 L0 92.31 Z" class="st3"></path>		</g>		<g id="shape10-30" v:mid="10" v:groupcontext="shape" transform="translate(89.1246,1.42109E-14)">			<title>Sheet.10</title>			<desc>开源</desc>			<v:textblock v:margins="rect(0,0,0,0)"></v:textblock>			<v:textrect cx="10.5" cy="87.509" width="21.01" height="12.6"></v:textrect>			<rect x="0" y="81.209" width="21" height="12.6" class="st8"></rect>			<text x="0" y="91" class="st10" v:langid="1033"><v:paragraph></v:paragraph><v:tablist></v:tablist>开源</text>			</g>		<g id="shape11-33" v:mid="11" v:groupcontext="shape" transform="translate(73.9363,-0.21863)">			<title>Sheet.11</title>			<path d="M0 92.31 A1.50003 1.50003 -180 0 0 1.5 93.81 L10.5 93.81 A1.50003 1.50003 -180 0 0 12 92.31 L12 83.31 A1.50003						 1.50003 -180 0 0 10.5 81.81 L1.5 81.81 A1.50003 1.50003 -180 0 0 -0 83.31 L0 92.31 Z" class="st7"></path>		</g>	</g></g>
</svg>

## 离线 1080p 转 1080p – 水平和垂直翻转

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

用例展示了如何水平翻转场景。

Note: 要翻转场景，请在以下命令中将 `flip-horizontal`替换为 `flip-vertical`，反之亦然。有关更多信息，请参阅 [qtivtransform](https://docs.qualcomm.com/doc/80-70022-50SC/topic/qtivtransform.html)。

使用以下命令在目标设备上运行用例：
- Qualcomm Computer Vision SDK（fcv）引擎：

        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 ! qtivtransform engine=fcv flip-horizontal=true ! waylandsink fullscreen=trueCopy to clipboard
- GLES 引擎：

        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 ! qtivtransform engine=gles flip-horizontal=true ! waylandsink fullscreen=trueCopy to clipboard

显示来自文件源的转换流。

要停止用例，请按 CTRL + C。

下图展示了 pipeline 执行的流程：

Figure : 显示翻转图像的 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_rotation_display_display_file_source.svg pipeline_rotation_display_displ -->
<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.73958in" height="1.63414in" viewbox="0 0 701.25 117.658" xml:space="preserve" color-interpolation-filters="sRGB" class="st12"><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: #2a2aea; stroke: none; stroke-linecap: butt; stroke-width: 0.75 }
.svg-6 .st9 { fill: none; stroke: none; stroke-linecap: butt; stroke-width: 0.75 }
.svg-6 .st10 { fill: #000000; font-family: Roboto; font-size: 0.874992em }
.svg-6 .st11 { fill: #000000; font-family: SimHei; font-size: 0.874992em }
.svg-6 .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_rotation_display_displ</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.374886)">		<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="350.25" cy="59.2038" width="700.5" height="116.908"></v:textrect>		<path d="M0 112.03 A5.62513 5.62513 -180 0 0 5.63 117.66 L694.87 117.66 A5.62513 5.62513 -180 0 0 700.5 112.03 L700.5					 6.37 A5.62513 5.62513 -180 0 0 694.87 0.75 L5.62 0.75 A5.62513 5.62513 -180 0 0 -0 6.37 L0 112.03 Z" class="st1"></path>		<text x="327.45" 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="M695.25 0.75 C698.14 0.75 700.5 3.11 700.5 6 L700.5 111.66 C700.5 114.55 698.14 116.91 695.25 116.91 L6 116.91					 C3.11 116.91 0.75 114.55 0.75 111.66 L0.75 6 C0.75 3.11 3.11 0.75 6 0.75 L695.25 0.75 ZM695.25 0 L6 0 C2.69					 0 0 2.69 0 6 L0 111.66 C0 114.97 2.69 117.66 6 117.66 L695.25 117.66 C698.56 117.66 701.25 114.97 701.25					 111.66 L701.25 6 C701.25 2.69 698.56 0 695.25 0 Z" class="st3"></path>	</g>	<g id="shape16-6" v:mid="16" v:groupcontext="shape" transform="translate(15,-42)">		<title>Sheet.16</title>		<desc>filesrc</desc>		<v:textblock v:margins="rect(0,0,0,0)"></v:textblock>		<v:textrect cx="48.75" cy="98.9079" width="97.5" height="37.5"></v:textrect>		<path d="M0 114.66 A3.00007 3.00007 -180 0 0 3 117.66 L94.5 117.66 A3.00007 3.00007 -180 0 0 97.5 114.66 L97.5 83.16					 A3.00007 3.00007 -180 0 0 94.5 80.16 L3 80.16 A3.00007 3.00007 -180 0 0 0 83.16 L0 114.66 Z" class="st4"></path>		<text x="32.31" y="102.51" class="st5" v:langid="1033"><v:paragraph v:horizalign="1"></v:paragraph><v:tablist></v:tablist>filesrc</text>		</g>	<g id="shape19-9" v:mid="19" v:groupcontext="shape" transform="translate(112.5,-60.75)">		<title>Sheet.19</title>		<path d="M0 117.66 L14.98 117.66" class="st6"></path>	</g>	<g id="shape20-12" v:mid="20" v:groupcontext="shape" transform="translate(126.717,-58.1322)">		<title>Sheet.20</title>		<path d="M0 117.66 L4.53 115.04 L0 112.42 L0 117.66 Z" class="st7"></path>	</g>	<g id="shape22-14" v:mid="22" v:groupcontext="shape" transform="translate(131.25,-42)">		<title>Sheet.22</title>		<desc>qtdemux</desc>		<v:textblock v:margins="rect(0,0,0,0)"></v:textblock>		<v:textrect cx="48.75" cy="98.9079" width="97.51" height="37.5"></v:textrect>		<path d="M0 114.66 A3.00007 3.00007 -180 0 0 3 117.66 L94.5 117.66 A3.00007 3.00007 -180 0 0 97.5 114.66 L97.5 83.16					 A3.00007 3.00007 -180 0 0 94.5 80.16 L3 80.16 A3.00007 3.00007 -180 0 0 0 83.16 L0 114.66 Z" class="st4"></path>		<text x="25.28" y="102.51" class="st5" v:langid="1033"><v:paragraph v:horizalign="1"></v:paragraph><v:tablist></v:tablist>qtdemux</text>		</g>	<g id="shape25-17" v:mid="25" v:groupcontext="shape" transform="translate(228.75,-60.75)">		<title>Sheet.25</title>		<path d="M0 117.66 L14.98 117.66" class="st6"></path>	</g>	<g id="shape26-20" v:mid="26" v:groupcontext="shape" transform="translate(242.967,-58.1322)">		<title>Sheet.26</title>		<path d="M0 117.66 L4.53 115.04 L0 112.42 L0 117.66 Z" class="st7"></path>	</g>	<g id="shape28-22" v:mid="28" v:groupcontext="shape" transform="translate(247.5,-42)">		<title>Sheet.28</title>		<desc>h264parse</desc>		<v:textblock v:margins="rect(0,0,0,0)"></v:textblock>		<v:textrect cx="48.75" cy="98.9079" width="97.5" height="37.5"></v:textrect>		<path d="M0 114.66 A3.00007 3.00007 -180 0 0 3 117.66 L94.5 117.66 A3.00007 3.00007 -180 0 0 97.5 114.66 L97.5 83.16					 A3.00007 3.00007 -180 0 0 94.5 80.16 L3 80.16 A3.00007 3.00007 -180 0 0 0 83.16 L0 114.66 Z" class="st4"></path>		<text x="20.4" y="102.51" class="st5" v:langid="1033"><v:paragraph v:horizalign="1"></v:paragraph><v:tablist></v:tablist>h264parse</text>		</g>	<g id="shape31-25" v:mid="31" v:groupcontext="shape" transform="translate(345,-60.75)">		<title>Sheet.31</title>		<path d="M0 117.66 L14.98 117.66" class="st6"></path>	</g>	<g id="shape32-28" v:mid="32" v:groupcontext="shape" transform="translate(359.216,-58.1322)">		<title>Sheet.32</title>		<path d="M0 117.66 L4.53 115.04 L0 112.42 L0 117.66 Z" class="st7"></path>	</g>	<g id="shape34-30" v:mid="34" v:groupcontext="shape" transform="translate(363.75,-42)">		<title>Sheet.34</title>		<desc>v4l2h264dec</desc>		<v:textblock v:margins="rect(0,0,0,0)"></v:textblock>		<v:textrect cx="45" cy="98.9079" width="90" height="37.5"></v:textrect>		<path d="M0 114.66 A3.00007 3.00007 -180 0 0 3 117.66 L87 117.66 A3.00007 3.00007 -180 0 0 90 114.66 L90 83.16 A3.00007					 3.00007 -180 0 0 87 80.16 L3 80.16 A3.00007 3.00007 -180 0 0 -0 83.16 L0 114.66 Z" class="st4"></path>		<text x="10.78" y="102.51" class="st5" v:langid="1033"><v:paragraph v:horizalign="1"></v:paragraph><v:tablist></v:tablist>v4l2h264dec</text>		</g>	<g id="shape37-33" v:mid="37" v:groupcontext="shape" transform="translate(453.75,-60.75)">		<title>Sheet.37</title>		<path d="M0 117.66 L14.98 117.66" class="st6"></path>	</g>	<g id="shape38-36" v:mid="38" v:groupcontext="shape" transform="translate(467.966,-58.1322)">		<title>Sheet.38</title>		<path d="M0 117.66 L4.53 115.04 L0 112.42 L0 117.66 Z" class="st7"></path>	</g>	<g id="shape40-38" v:mid="40" v:groupcontext="shape" transform="translate(472.5,-42)">		<title>Sheet.40</title>		<desc>qtivtransform</desc>		<v:textblock v:margins="rect(0,0,0,0)"></v:textblock>		<v:textrect cx="48.75" cy="98.9079" width="97.5" height="37.5"></v:textrect>		<path d="M0 114.66 A3.00007 3.00007 -180 0 0 3 117.66 L94.5 117.66 A3.00007 3.00007 -180 0 0 97.5 114.66 L97.5 83.16					 A3.00007 3.00007 -180 0 0 94.5 80.16 L3 80.16 A3.00007 3.00007 -180 0 0 0 83.16 L0 114.66 Z" class="st8"></path>		<text x="12.57" y="102.51" class="st5" v:langid="1033"><v:paragraph v:horizalign="1"></v:paragraph><v:tablist></v:tablist>qtivtransform</text>		</g>	<g id="shape43-41" v:mid="43" v:groupcontext="shape" transform="translate(570,-60.75)">		<title>Sheet.43</title>		<path d="M0 117.66 L14.98 117.66" class="st6"></path>	</g>	<g id="shape44-44" v:mid="44" v:groupcontext="shape" transform="translate(584.216,-58.1322)">		<title>Sheet.44</title>		<path d="M0 117.66 L4.53 115.04 L0 112.42 L0 117.66 Z" class="st7"></path>	</g>	<g id="shape46-46" v:mid="46" v:groupcontext="shape" transform="translate(588.75,-42)">		<title>Sheet.46</title>		<desc>Waylandsink</desc>		<v:textblock v:margins="rect(0,0,0,0)"></v:textblock>		<v:textrect cx="48.75" cy="98.9079" width="97.51" height="37.5"></v:textrect>		<path d="M0 114.66 A3.00007 3.00007 -180 0 0 3 117.66 L94.5 117.66 A3.00007 3.00007 -180 0 0 97.5 114.66 L97.5 83.16					 A3.00007 3.00007 -180 0 0 94.5 80.16 L3 80.16 A3.00007 3.00007 -180 0 0 -0 83.16 L0 114.66 Z" class="st4"></path>		<text x="15.01" y="102.51" class="st5" v:langid="1033"><v:paragraph v:horizalign="1"></v:paragraph><v:tablist></v:tablist>Waylandsink</text>		</g>	<g id="group48-49" transform="translate(576.125,-14.7814)" v:mid="48" v:groupcontext="group">		<title>Sheet.48</title>		<g id="shape7-50" 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.0271" cy="111.358" width="54.06" height="12.6"></v:textrect>			<rect x="0" y="105.058" width="54.0543" height="12.6" class="st9"></rect>			<text x="0" y="114.51" class="st10" v:langid="1033"><v:paragraph></v:paragraph><v:tablist></v:tablist>Qualcomm  </text>			</g>		<g id="shape8-53" v:mid="8" v:groupcontext="shape" transform="translate(-9.99201E-16,-0.218619)">			<title>Sheet.8</title>			<path d="M0 116.16 A1.50003 1.50003 -180 0 0 1.5 117.66 L10.5 117.66 A1.50003 1.50003 -180 0 0 12 116.16 L12 107.16						 A1.50003 1.50003 -180 0 0 10.5 105.66 L1.5 105.66 A1.50003 1.50003 -180 0 0 -0 107.16 L0 116.16 Z" class="st8"></path>		</g>		<g id="shape10-55" 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="111.358" width="21" height="12.6"></v:textrect>			<rect x="0" y="105.058" width="21" height="12.6" class="st9"></rect>			<text x="0" y="114.85" class="st11" v:langid="1033"><v:paragraph></v:paragraph><v:tablist></v:tablist>开源</text>			</g>		<g id="shape11-58" v:mid="11" v:groupcontext="shape" transform="translate(73.9363,-0.218619)">			<title>Sheet.11</title>			<path d="M0 116.16 A1.50003 1.50003 -180 0 0 1.5 117.66 L10.5 117.66 A1.50003 1.50003 -180 0 0 12 116.16 L12 107.16						 A1.50003 1.50003 -180 0 0 10.5 105.66 L1.5 105.66 A1.50003 1.50003 -180 0 0 -0 107.16 L0 116.16 Z" class="st4"></path>		</g>	</g></g>
</svg>

## 4 K 转 1080p – 水平和垂直翻转并降低分辨率

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

用例展示了如何将 4k 分辨率的视频流降低到 1080p 并水平翻转场景。

Note: 要翻转场景，请在以下命令中将 `flip-horizontal`替换为 `flip-vertical`，反之亦然。有关更多信息，请参阅 [qtivtransform](https://docs.qualcomm.com/doc/80-70022-50SC/topic/qtivtransform.html)。

使用以下命令在目标设备上运行用例：
- Qualcomm Computer Vision SDK（fcv）引擎：

        gst-launch-1.0 -e qtiqmmfsrc name=camsrc video_0::type=video video_1::type=preview ! video/x-raw,format=NV12,width=3840,height=2160,framerate=30/1 ! qtivtransform engine=fcv flip-vertical=true ! video/x-raw,format=NV12,width=1920,height=1080 ! waylandsink fullscreen=trueCopy to clipboard
- GLES 引擎：

        gst-launch-1.0 -e qtiqmmfsrc name=camsrc video_0::type=video video_1::type=preview ! video/x-raw,format=NV12,width=3840,height=2160,framerate=30/1 ! qtivtransform engine=gles flip-vertical=true ! video/x-raw,format=NV12,width=1920,height=1080 ! waylandsink fullscreen=trueCopy to clipboard

将显示来自摄像头的转换流。

要停止用例，请按 CTRL + C。

下图展示了 pipeline 执行的流程：

Figure : 显示经过翻转和降低分辨率的图像的 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_rotation_display_display_camera_source.svg pipeline_rotation_display_displ -->
<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="5.9375in" height="1.3029in" viewbox="0 0 427.5 93.809" 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 { fill: #2a2aea; stroke: none; stroke-linecap: butt; stroke-width: 0.75 }
.svg-7 .st4 { fill: #ffffff; font-family: Roboto; font-size: 1.00001em }
.svg-7 .st5 { stroke: #000000; stroke-linecap: butt; stroke-width: 0.75 }
.svg-7 .st6 { fill: #000000; stroke: none; stroke-linecap: butt; stroke-width: 0.75 }
.svg-7 .st7 { fill: #007884; 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: 0.874992em }
.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>pipeline_rotation_display_displ</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.375034)">		<title>Sheet.3</title>		<path d="M0 88.18 A5.62513 5.62513 -180 0 0 5.63 93.81 L421.13 93.81 A5.62513 5.62513 -180 0 0 426.75 88.18 L426.75 6.38					 A5.62513 5.62513 -180 0 0 421.13 0.75 L5.63 0.75 A5.62513 5.62513 -180 0 0 -0 6.38 L0 88.18 Z" class="st1"></path>	</g>	<g id="shape4-3" v:mid="4" v:groupcontext="shape">		<title>Sheet.4</title>		<path d="M421.5 0.75 C424.39 0.75 426.75 3.11 426.75 6 L426.75 87.81 C426.75 90.7 424.39 93.06 421.5 93.06 L6 93.06 C3.11					 93.06 0.75 90.7 0.75 87.81 L0.75 6 C0.75 3.11 3.11 0.75 6 0.75 L421.5 0.75 ZM421.5 0 L6 0 C2.69 0 0 2.69					 0 6 L0 87.81 C0 91.12 2.69 93.81 6 93.81 L421.5 93.81 C424.81 93.81 427.5 91.12 427.5 87.81 L427.5 6 C427.5					 2.69 424.81 0 421.5 0 Z" class="st2"></path>	</g>	<g id="shape14-5" v:mid="14" v:groupcontext="shape" transform="translate(153.75,-42)">		<title>Sheet.14</title>		<desc>qtivtransform</desc>		<v:textblock v:margins="rect(0,0,0,0)"></v:textblock>		<v:textrect cx="60" cy="75.059" width="120" height="37.5"></v:textrect>		<path d="M0 90.81 A3.00007 3.00007 -180 0 0 3 93.81 L117 93.81 A3.00007 3.00007 -180 0 0 120 90.81 L120 59.31 A3.00007					 3.00007 -180 0 0 117 56.31 L3 56.31 A3.00007 3.00007 -180 0 0 0 59.31 L0 90.81 Z" class="st3"></path>		<text x="23.82" y="78.66" class="st4" v:langid="1033"><v:paragraph v:horizalign="1"></v:paragraph><v:tablist></v:tablist>qtivtransform</text>		</g>	<g id="shape17-8" v:mid="17" v:groupcontext="shape" transform="translate(273.75,-60.75)">		<title>Sheet.17</title>		<path d="M0 93.81 L14.44 93.81" class="st5"></path>	</g>	<g id="shape18-11" v:mid="18" v:groupcontext="shape" transform="translate(287.319,-57.7582)">		<title>Sheet.18</title>		<path d="M0 93.81 L5.18 90.82 L0 87.83 L0 93.81 Z" class="st6"></path>	</g>	<g id="shape20-13" v:mid="20" v:groupcontext="shape" transform="translate(135,-60.75)">		<title>Sheet.20</title>		<path d="M0 93.81 L14.44 93.81" class="st5"></path>	</g>	<g id="shape21-16" v:mid="21" v:groupcontext="shape" transform="translate(148.569,-57.7582)">		<title>Sheet.21</title>		<path d="M0 93.81 L5.18 90.82 L0 87.83 L0 93.81 Z" class="st6"></path>	</g>	<g id="shape23-18" v:mid="23" v:groupcontext="shape" transform="translate(292.5,-42)">		<title>Sheet.23</title>		<desc>Waylandsink</desc>		<v:textblock v:margins="rect(0,0,0,0)"></v:textblock>		<v:textrect cx="60" cy="75.059" width="120" height="37.5"></v:textrect>		<path d="M0 90.81 A3.00007 3.00007 -180 0 0 3 93.81 L117 93.81 A3.00007 3.00007 -180 0 0 120 90.81 L120 59.31 A3.00007					 3.00007 -180 0 0 117 56.31 L3 56.31 A3.00007 3.00007 -180 0 0 0 59.31 L0 90.81 Z" class="st7"></path>		<text x="26.26" y="78.66" class="st4" v:langid="1033"><v:paragraph v:horizalign="1"></v:paragraph><v:tablist></v:tablist>Waylandsink</text>		</g>	<g id="shape26-21" v:mid="26" v:groupcontext="shape" transform="translate(15,-42)">		<title>Sheet.26</title>		<desc>camsrc</desc>		<v:textblock v:margins="rect(0,0,0,0)"></v:textblock>		<v:textrect cx="60" cy="75.059" width="120" height="37.5"></v:textrect>		<path d="M0 90.81 A3.00007 3.00007 -180 0 0 3 93.81 L117 93.81 A3.00007 3.00007 -180 0 0 120 90.81 L120 59.31 A3.00007					 3.00007 -180 0 0 117 56.31 L3 56.31 A3.00007 3.00007 -180 0 0 0 59.31 L0 90.81 Z" class="st7"></path>		<text x="40.07" y="78.66" class="st4" v:langid="1033"><v:paragraph v:horizalign="1"></v:paragraph><v:tablist></v:tablist>camsrc</text>		</g>	<g id="group28-24" transform="translate(302.375,-14.7814)" v:mid="28" v:groupcontext="group">		<title>Sheet.28</title>		<g id="shape7-25" v:mid="7" v:groupcontext="shape" transform="translate(15.1882,1.42109E-14)">			<title>Sheet.7</title>			<desc>Qualcomm</desc>			<v:textblock v:margins="rect(0,0,0,0)"></v:textblock>			<v:textrect cx="28.9021" cy="87.509" width="57.81" height="12.6"></v:textrect>			<rect x="0" y="81.209" width="57.8042" height="12.6" class="st8"></rect>			<text x="-0" y="90.66" class="st9" v:langid="1033"><v:paragraph></v:paragraph><v:tablist></v:tablist>Qualcomm  </text>			</g>		<g id="shape8-28" v:mid="8" v:groupcontext="shape" transform="translate(9.99201E-16,-0.21863)">			<title>Sheet.8</title>			<path d="M0 92.31 A1.50003 1.50003 -180 0 0 1.5 93.81 L10.5 93.81 A1.50003 1.50003 -180 0 0 12 92.31 L12 83.31 A1.50003						 1.50003 -180 0 0 10.5 81.81 L1.5 81.81 A1.50003 1.50003 -180 0 0 0 83.31 L0 92.31 Z" class="st3"></path>		</g>		<g id="shape10-30" v:mid="10" v:groupcontext="shape" transform="translate(89.1246,1.42109E-14)">			<title>Sheet.10</title>			<desc>开源</desc>			<v:textblock v:margins="rect(0,0,0,0)"></v:textblock>			<v:textrect cx="10.5" cy="87.509" width="21.01" height="12.6"></v:textrect>			<rect x="0" y="81.209" width="21" height="12.6" class="st8"></rect>			<text x="0" y="91" class="st10" v:langid="1033"><v:paragraph></v:paragraph><v:tablist></v:tablist>开源</text>			</g>		<g id="shape11-33" v:mid="11" v:groupcontext="shape" transform="translate(73.9363,-0.21863)">			<title>Sheet.11</title>			<path d="M0 92.31 A1.50003 1.50003 -180 0 0 1.5 93.81 L10.5 93.81 A1.50003 1.50003 -180 0 0 12 92.31 L12 83.31 A1.50003						 1.50003 -180 0 0 10.5 81.81 L1.5 81.81 A1.50003 1.50003 -180 0 0 -0 83.31 L0 92.31 Z" class="st7"></path>		</g>	</g></g>
</svg>

## 将 4K 分辨率降低到 1080p 并编码为 AVC MP4

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

用例使用 4k 分辨率视频流的两个副本。第一个副本被编码并复用为 MP4 文件。第二个副本被提供给 qtivtransform 以将分辨率降低到 1080p。然后，该 1080p 流被编码并复用为设备上的 MP4 文件。

使用以下命令在目标设备上运行用例：
- Qualcomm Computer Vision SDK（fcv）引擎：
Note: 此用例在 Ubuntu Server 上不受支持。

        gst-launch-1.0 -e qtiqmmfsrc name=camsrc video_0::type=video video_1::type=preview ! video/x-raw,format=NV12,width=3840,height=2160,framerate=30/1,interlace-mode=progressive,colorimetry=bt601 ! tee name=t_split t_split. ! queue ! v4l2h264enc capture-io-mode=4 output-io-mode=5 ! h264parse ! queue ! mp4mux ! queue ! filesink location=/opt/4k_video.mp4 t_split. ! qtivtransform engine=fcv ! video/x-raw,format=NV12,width=1920,height=1080,framerate=30/1,interlace-mode=progressive,colorimetry=bt601 ! queue ! v4l2h264enc capture-io-mode=4 output-io-mode=5 ! h264parse ! queue ! mp4mux ! queue ! filesink location=/opt/downscaled_1080p_video.mp4Copy to clipboard
- GLES 引擎：

        gst-launch-1.0 -e qtiqmmfsrc name=camsrc video_0::type=video video_1::type=preview ! video/x-raw,format=NV12,width=3840,height=2160,framerate=30/1,interlace-mode=progressive,colorimetry=bt601 ! tee name=t_split t_split. ! queue ! v4l2h264enc capture-io-mode=4 output-io-mode=5 ! h264parse ! queue ! mp4mux ! queue ! filesink location=/opt/4k_video.mp4 t_split. ! qtivtransform engine=gles ! video/x-raw,format=NV12,width=1920,height=1080,framerate=30/1,interlace-mode=progressive,colorimetry=bt601 ! queue ! v4l2h264enc capture-io-mode=4 output-io-mode=5 ! h264parse ! queue ! mp4mux ! queue ! filesink location=/opt/downscaled_1080p_video.mp4Copy to clipboard

要停止用例，请使用 CTRL + C。

从目标设备中拉取录制的内容，然后在 Linux 主机上播放内容。

在主机的终端中，运行以下命令：

    scp root@<IP address of target device>:/opt/ <destination directory>Copy to clipboard

在主机的终端中，运行以下命令拉取文件内容：

    scp -r root@[DEVICE IP-ADDR]:/opt/4k_video.mp4 user1@[HOST IP-ADDR]:/workspaceCopy to clipboard

    scp -r root@[DEVICE IP-ADDR]:/opt/downscaled_1080p_video.mp4 user1@[HOST IP-ADDR]:/workspaceCopy to clipboard

您可以在媒体播放器上播放 MP4 文件。显示摄像头流。

下图展示了 pipeline 执行的流程：

Figure : 4k 视频 pipeline – 编码并将分辨率降低到 1080p
            
            <?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_4kvideo_encoding_downscaling_1080p.svg pipeline_4kvideo_encoding_downs -->
<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.3021in" height="2.14583in" viewbox="0 0 885.75 154.5" xml:space="preserve" color-interpolation-filters="sRGB" class="st12"><v:documentproperties v:langid="1033" v:viewmarkup="false"></v:documentproperties>
<style>.svg-8 .st1 { fill: #fafafa; stroke: none; stroke-linecap: butt; stroke-width: 0.75 }
.svg-8 .st2 { fill: #d2d7e1; stroke: none; stroke-linecap: butt; stroke-width: 0.75 }
.svg-8 .st3 { stroke: #000000; stroke-linecap: butt; stroke-width: 0.75 }
.svg-8 .st4 { fill: #000000; stroke: none; stroke-linecap: butt; stroke-width: 0.75 }
.svg-8 .st5 { fill: #007884; stroke: none; stroke-linecap: butt; stroke-width: 0.75 }
.svg-8 .st6 { fill: #ffffff; font-family: Roboto; font-size: 1.00001em }
.svg-8 .st7 { fill: none }
.svg-8 .st8 { fill: #2a2aea; stroke: none; stroke-linecap: butt; stroke-width: 0.75 }
.svg-8 .st9 { fill: none; stroke: none; stroke-linecap: butt; stroke-width: 0.75 }
.svg-8 .st10 { fill: #000000; font-family: Roboto; font-size: 0.874992em }
.svg-8 .st11 { fill: #000000; font-family: SimHei; font-size: 0.874992em }
.svg-8 .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_4kvideo_encoding_downs</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 148.87 A5.62513 5.62513 -180 0 0 5.62 154.5 L879.38 154.5 A5.62513 5.62513 -180 0 0 885 148.87 L885 6.38					 A5.62513 5.62513 -180 0 0 879.38 0.75 L5.62 0.75 A5.62513 5.62513 -180 0 0 -0 6.38 L0 148.87 Z" class="st1"></path>	</g>	<g id="shape4-3" v:mid="4" v:groupcontext="shape">		<title>Sheet.4</title>		<path d="M879.75 0.75 C882.64 0.75 885 3.11 885 6 L885 148.5 C885 151.39 882.64 153.75 879.75 153.75 L6 153.75 C3.11					 153.75 0.75 151.39 0.75 148.5 L0.75 6 C0.75 3.11 3.11 0.75 6 0.75 L879.75 0.75 ZM879.75 0 L6 0 C2.69 0 0					 2.69 0 6 L0 148.5 C0 151.81 2.69 154.5 6 154.5 L879.75 154.5 C883.06 154.5 885.75 151.81 885.75 148.5 L885.75					 6 C885.75 2.69 883.06 0 879.75 0 Z" class="st2"></path>	</g>	<g id="shape14-5" v:mid="14" v:groupcontext="shape" transform="translate(499.5,-120.75)">		<title>Sheet.14</title>		<path d="M0 154.5 L14.44 154.5" class="st3"></path>	</g>	<g id="shape15-8" v:mid="15" v:groupcontext="shape" transform="translate(513.069,-117.758)">		<title>Sheet.15</title>		<path d="M0 154.5 L5.18 151.51 L0 148.52 L0 154.5 Z" class="st4"></path>	</g>	<g id="shape17-10" v:mid="17" v:groupcontext="shape" transform="translate(518.25,-102)">		<title>Sheet.17</title>		<desc>h264parse</desc>		<v:textblock v:margins="rect(0,0,0,0)"></v:textblock>		<v:textrect cx="52.5" cy="135.75" width="105" height="37.5"></v:textrect>		<path d="M0 151.5 A3.00007 3.00007 -180 0 0 3 154.5 L102 154.5 A3.00007 3.00007 -180 0 0 105 151.5 L105 120 A3.00007					 3.00007 -180 0 0 102 117 L3 117 A3.00007 3.00007 -180 0 0 0 120 L0 151.5 Z" class="st5"></path>		<text x="24.15" y="139.35" class="st6" v:langid="1033"><v:paragraph v:horizalign="1"></v:paragraph><v:tablist></v:tablist>h264parse</text>		</g>	<g id="shape20-13" v:mid="20" v:groupcontext="shape" transform="translate(623.25,-120.75)">		<title>Sheet.20</title>		<path d="M0 154.5 L14.44 154.5" class="st3"></path>	</g>	<g id="shape21-16" v:mid="21" v:groupcontext="shape" transform="translate(636.819,-117.758)">		<title>Sheet.21</title>		<path d="M0 154.5 L5.18 151.51 L0 148.52 L0 154.5 Z" class="st4"></path>	</g>	<g id="shape23-18" v:mid="23" v:groupcontext="shape" transform="translate(642,-102)">		<title>Sheet.23</title>		<desc>mp4mux</desc>		<v:textblock v:margins="rect(0,0,0,0)"></v:textblock>		<v:textrect cx="52.5" cy="135.75" width="105" height="37.5"></v:textrect>		<path d="M0 151.5 A3.00007 3.00007 -180 0 0 3 154.5 L102 154.5 A3.00007 3.00007 -180 0 0 105 151.5 L105 120 A3.00007					 3.00007 -180 0 0 102 117 L3 117 A3.00007 3.00007 -180 0 0 0 120 L0 151.5 Z" class="st5"></path>		<text x="28.97" y="139.35" class="st6" v:langid="1033"><v:paragraph v:horizalign="1"></v:paragraph><v:tablist></v:tablist>mp4mux</text>		</g>	<g id="shape26-21" v:mid="26" v:groupcontext="shape" transform="translate(747,-120.75)">		<title>Sheet.26</title>		<path d="M0 154.5 L14.44 154.5" class="st3"></path>	</g>	<g id="shape27-24" v:mid="27" v:groupcontext="shape" transform="translate(760.569,-117.758)">		<title>Sheet.27</title>		<path d="M0 154.5 L5.18 151.51 L0 148.52 L0 154.5 Z" class="st4"></path>	</g>	<g id="shape29-26" v:mid="29" v:groupcontext="shape" transform="translate(765.75,-102)">		<title>Sheet.29</title>		<desc>filesink</desc>		<v:textblock v:margins="rect(0,0,0,0)"></v:textblock>		<v:textrect cx="52.5" cy="135.75" width="105" height="37.5"></v:textrect>		<path d="M0 151.5 A3.00007 3.00007 -180 0 0 3 154.5 L102 154.5 A3.00007 3.00007 -180 0 0 105 151.5 L105 120 A3.00007					 3.00007 -180 0 0 102 117 L3 117 A3.00007 3.00007 -180 0 0 0 120 L0 151.5 Z" class="st5"></path>		<text x="33.42" y="139.35" class="st6" v:langid="1033"><v:paragraph v:horizalign="1"></v:paragraph><v:tablist></v:tablist>filesink</text>		</g>	<g id="shape32-29" v:mid="32" v:groupcontext="shape" transform="translate(394.5,-102)">		<title>Sheet.32</title>		<desc>v4l2h264enc</desc>		<v:textblock v:margins="rect(0,0,0,0)"></v:textblock>		<v:textrect cx="52.5" cy="135.75" width="105.01" height="37.5"></v:textrect>		<path d="M0 151.5 A3.00007 3.00007 -180 0 0 3 154.5 L102 154.5 A3.00007 3.00007 -180 0 0 105 151.5 L105 120 A3.00007					 3.00007 -180 0 0 102 117 L3 117 A3.00007 3.00007 -180 0 0 -0 120 L0 151.5 Z" class="st5"></path>		<text x="18.36" y="139.35" class="st6" v:langid="1033"><v:paragraph v:horizalign="1"></v:paragraph><v:tablist></v:tablist>v4l2h264enc</text>		</g>	<g id="shape35-32" v:mid="35" v:groupcontext="shape" transform="translate(394.5,-42)">		<title>Sheet.35</title>		<desc>v4l2h264enc</desc>		<v:textblock v:margins="rect(0,0,0,0)"></v:textblock>		<v:textrect cx="52.5" cy="135.75" width="105.01" height="37.5"></v:textrect>		<path d="M0 151.5 A3.00007 3.00007 -180 0 0 3 154.5 L102 154.5 A3.00007 3.00007 -180 0 0 105 151.5 L105 120 A3.00007					 3.00007 -180 0 0 102 117 L3 117 A3.00007 3.00007 -180 0 0 0 120 L0 151.5 Z" class="st5"></path>		<text x="18.36" y="139.35" class="st6" v:langid="1033"><v:paragraph v:horizalign="1"></v:paragraph><v:tablist></v:tablist>v4l2h264enc</text>		</g>	<g id="shape38-35" v:mid="38" v:groupcontext="shape" transform="translate(499.5,-60.75)">		<title>Sheet.38</title>		<path d="M0 154.5 L14.44 154.5" class="st3"></path>	</g>	<g id="shape39-38" v:mid="39" v:groupcontext="shape" transform="translate(513.069,-57.7582)">		<title>Sheet.39</title>		<path d="M0 154.5 L5.18 151.51 L0 148.52 L0 154.5 Z" class="st4"></path>	</g>	<g id="shape41-40" v:mid="41" v:groupcontext="shape" transform="translate(518.25,-42)">		<title>Sheet.41</title>		<desc>h264parse</desc>		<v:textblock v:margins="rect(0,0,0,0)"></v:textblock>		<v:textrect cx="52.5" cy="135.75" width="105" height="37.5"></v:textrect>		<path d="M0 151.5 A3.00007 3.00007 -180 0 0 3 154.5 L102 154.5 A3.00007 3.00007 -180 0 0 105 151.5 L105 120 A3.00007					 3.00007 -180 0 0 102 117 L3 117 A3.00007 3.00007 -180 0 0 0 120 L0 151.5 Z" class="st5"></path>		<text x="24.15" y="139.35" class="st6" v:langid="1033"><v:paragraph v:horizalign="1"></v:paragraph><v:tablist></v:tablist>h264parse</text>		</g>	<g id="shape44-43" v:mid="44" v:groupcontext="shape" transform="translate(623.25,-60.75)">		<title>Sheet.44</title>		<path d="M0 154.5 L14.44 154.5" class="st3"></path>	</g>	<g id="shape45-46" v:mid="45" v:groupcontext="shape" transform="translate(636.819,-57.7582)">		<title>Sheet.45</title>		<path d="M0 154.5 L5.18 151.51 L0 148.52 L0 154.5 Z" class="st4"></path>	</g>	<g id="shape47-48" v:mid="47" v:groupcontext="shape" transform="translate(642,-42)">		<title>Sheet.47</title>		<desc>mp4mux</desc>		<v:textblock v:margins="rect(0,0,0,0)"></v:textblock>		<v:textrect cx="52.5" cy="135.75" width="105" height="37.5"></v:textrect>		<path d="M0 151.5 A3.00007 3.00007 -180 0 0 3 154.5 L102 154.5 A3.00007 3.00007 -180 0 0 105 151.5 L105 120 A3.00007					 3.00007 -180 0 0 102 117 L3 117 A3.00007 3.00007 -180 0 0 0 120 L0 151.5 Z" class="st5"></path>		<text x="28.97" y="139.35" class="st6" v:langid="1033"><v:paragraph v:horizalign="1"></v:paragraph><v:tablist></v:tablist>mp4mux</text>		</g>	<g id="shape50-51" v:mid="50" v:groupcontext="shape" transform="translate(747,-60.75)">		<title>Sheet.50</title>		<path d="M0 154.5 L14.44 154.5" class="st3"></path>	</g>	<g id="shape51-54" v:mid="51" v:groupcontext="shape" transform="translate(760.569,-57.7582)">		<title>Sheet.51</title>		<path d="M0 154.5 L5.18 151.51 L0 148.52 L0 154.5 Z" class="st4"></path>	</g>	<g id="shape53-56" v:mid="53" v:groupcontext="shape" transform="translate(765.75,-42)">		<title>Sheet.53</title>		<desc>filesink</desc>		<v:textblock v:margins="rect(0,0,0,0)"></v:textblock>		<v:textrect cx="52.5" cy="135.75" width="105" height="37.5"></v:textrect>		<path d="M0 151.5 A3.00007 3.00007 -180 0 0 3 154.5 L102 154.5 A3.00007 3.00007 -180 0 0 105 151.5 L105 120 A3.00007					 3.00007 -180 0 0 102 117 L3 117 A3.00007 3.00007 -180 0 0 0 120 L0 151.5 Z" class="st5"></path>		<text x="33.42" y="139.35" class="st6" v:langid="1033"><v:paragraph v:horizalign="1"></v:paragraph><v:tablist></v:tablist>filesink</text>		</g>	<g id="shape56-59" v:mid="56" v:groupcontext="shape" transform="translate(138.75,-72)">		<title>Sheet.56</title>		<desc>tee</desc>		<v:textblock v:margins="rect(0,0,0,0)"></v:textblock>		<v:textrect cx="52.5" cy="135.75" width="105" height="37.5"></v:textrect>		<path d="M0 151.5 A3.00007 3.00007 -180 0 0 3 154.5 L102 154.5 A3.00007 3.00007 -180 0 0 105 151.5 L105 120 A3.00007					 3.00007 -180 0 0 102 117 L3 117 A3.00007 3.00007 -180 0 0 -0 120 L0 151.5 Z" class="st5"></path>		<text x="44.18" y="139.35" class="st6" v:langid="1033"><v:paragraph v:horizalign="1"></v:paragraph><v:tablist></v:tablist>tee</text>		</g>	<g id="shape59-62" v:mid="59" v:groupcontext="shape" transform="translate(243.75,-60.75)">		<title>Sheet.59</title>		<path d="M0 130.75 L13.99 130.75 L13.99 154.5 L27.94 154.5 L0 130.75 Z" class="st7"></path>		<path d="M0 130.75 L13.99 130.75 L13.99 154.5 L27.94 154.5" class="st3"></path>	</g>	<g id="shape60-65" v:mid="60" v:groupcontext="shape" transform="translate(270.819,-57.7582)">		<title>Sheet.60</title>		<path d="M0 154.5 L5.18 151.51 L0 148.52 L0 154.5 Z" class="st4"></path>	</g>	<g id="shape62-67" v:mid="62" v:groupcontext="shape" transform="translate(120,-90.75)">		<title>Sheet.62</title>		<path d="M0 154.5 L14.44 154.5" class="st3"></path>	</g>	<g id="shape63-70" v:mid="63" v:groupcontext="shape" transform="translate(133.569,-87.7582)">		<title>Sheet.63</title>		<path d="M0 154.5 L5.18 151.51 L0 148.52 L0 154.5 Z" class="st4"></path>	</g>	<g id="shape65-72" v:mid="65" v:groupcontext="shape" transform="translate(276,-42)">		<title>Sheet.65</title>		<desc>qtivtransform</desc>		<v:textblock v:margins="rect(0,0,0,0)"></v:textblock>		<v:textrect cx="52.5" cy="135.75" width="105.01" height="37.5"></v:textrect>		<path d="M0 151.5 A3.00007 3.00007 -180 0 0 3 154.5 L102 154.5 A3.00007 3.00007 -180 0 0 105 151.5 L105 120 A3.00007					 3.00007 -180 0 0 102 117 L3 117 A3.00007 3.00007 -180 0 0 0 120 L0 151.5 Z" class="st8"></path>		<text x="16.31" y="139.35" class="st6" v:langid="1033"><v:paragraph v:horizalign="1"></v:paragraph><v:tablist></v:tablist>qtivtransform</text>		</g>	<g id="shape68-75" v:mid="68" v:groupcontext="shape" transform="translate(243.75,-97)">		<title>Sheet.68</title>		<path d="M146.44 130.75 L13.99 130.75 L13.99 154.5 L0 154.5 L146.44 130.75 Z" class="st7"></path>		<path d="M146.44 130.75 L13.99 130.75 L13.99 154.5 L0 154.5" class="st3"></path>	</g>	<g id="shape69-78" v:mid="69" v:groupcontext="shape" transform="translate(389.319,-117.758)">		<title>Sheet.69</title>		<path d="M0 148.52 L5.18 151.51 L0 154.5 L0 148.52 Z" class="st4"></path>	</g>	<g id="shape71-80" v:mid="71" v:groupcontext="shape" transform="translate(381,-60.75)">		<title>Sheet.71</title>		<path d="M0 154.5 L9.19 154.5" class="st3"></path>	</g>	<g id="shape72-83" v:mid="72" v:groupcontext="shape" transform="translate(389.319,-57.7582)">		<title>Sheet.72</title>		<path d="M0 154.5 L5.18 151.51 L0 148.52 L0 154.5 Z" class="st4"></path>	</g>	<g id="shape74-85" v:mid="74" v:groupcontext="shape" transform="translate(15,-72)">		<title>Sheet.74</title>		<desc>camsrc</desc>		<v:textblock v:margins="rect(0,0,0,0)"></v:textblock>		<v:textrect cx="52.5" cy="135.75" width="105" height="37.5"></v:textrect>		<path d="M0 151.5 A3.00007 3.00007 -180 0 0 3 154.5 L102 154.5 A3.00007 3.00007 -180 0 0 105 151.5 L105 120 A3.00007					 3.00007 -180 0 0 102 117 L3 117 A3.00007 3.00007 -180 0 0 -0 120 L0 151.5 Z" class="st5"></path>		<text x="32.57" y="139.35" class="st6" v:langid="1033"><v:paragraph v:horizalign="1"></v:paragraph><v:tablist></v:tablist>camsrc</text>		</g>	<g id="group86-88" transform="translate(760.625,-14.7814)" v:mid="86" v:groupcontext="group">		<title>Sheet.86</title>		<g id="shape7-89" v:mid="7" v:groupcontext="shape" transform="translate(15.1883,0)">			<title>Sheet.7</title>			<desc>Qualcomm</desc>			<v:textblock v:margins="rect(0,0,0,0)"></v:textblock>			<v:textrect cx="27.0269" cy="148.2" width="54.06" height="12.6"></v:textrect>			<rect x="0" y="141.9" width="54.0538" height="12.6" class="st9"></rect>			<text x="0" y="151.35" class="st10" v:langid="1033"><v:paragraph></v:paragraph><v:tablist></v:tablist>Qualcomm  </text>			</g>		<g id="shape8-92" v:mid="8" v:groupcontext="shape" transform="translate(6.29496E-14,-0.218607)">			<title>Sheet.8</title>			<path d="M0 153 A1.50003 1.50003 -180 0 0 1.5 154.5 L10.5 154.5 A1.50003 1.50003 -180 0 0 12 153 L12 144 A1.50003						 1.50003 -180 0 0 10.5 142.5 L1.5 142.5 A1.50003 1.50003 -180 0 0 0 144 L0 153 Z" class="st8"></path>		</g>		<g id="shape10-94" 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="148.2" width="21.01" height="12.6"></v:textrect>			<rect x="0" y="141.9" width="21" height="12.6" class="st9"></rect>			<text x="0" y="151.69" class="st11" v:langid="1033"><v:paragraph></v:paragraph><v:tablist></v:tablist>开源</text>			</g>		<g id="shape11-97" v:mid="11" v:groupcontext="shape" transform="translate(73.9363,-0.218607)">			<title>Sheet.11</title>			<path d="M0 153 A1.50003 1.50003 -180 0 0 1.5 154.5 L10.5 154.5 A1.50003 1.50003 -180 0 0 12 153 L12 144 A1.50003						 1.50003 -180 0 0 10.5 142.5 L1.5 142.5 A1.50003 1.50003 -180 0 0 0 144 L0 153 Z" class="st5"></path>		</g>	</g></g>
</svg>

## 更多转换和转码用例

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

在目标设备上运行以下用例。

### 视频转换用例

- 4K@30 AVC → 解码 → 旋转和缩小 → 1080p@30 AVC
    - Qualcomm Computer Vision SDK（fcv）引擎：

            gst-launch-1.0 -e filesrc location=/opt/<4K_H264/AVC_file>.mp4 ! qtdemux ! queue ! h264parse ! v4l2h264dec capture-io-mode=4 output-io-mode=4 ! video/x-raw,format=NV12 ! qtivtransform engine=fcv rotate=90CCW ! video/x-raw,format=NV12,width=1920,height=1080 ! v4l2h264enc capture-io-mode=4 output-io-mode=5 ! h264parse ! queue ! mp4mux ! queue ! filesink location=/opt/video.mp4Copy to clipboard
    - GLES 引擎：

            gst-launch-1.0 -e filesrc location=/opt/<4K_H264/AVC_file>.mp4 ! qtdemux ! queue ! h264parse ! v4l2h264dec capture-io-mode=4 output-io-mode=4 ! video/x-raw,format=NV12 ! qtivtransform engine=gles rotate=90CCW ! video/x-raw,format=NV12,width=1920,height=1080 ! v4l2h264enc capture-io-mode=4 output-io-mode=5 ! h264parse ! queue ! mp4mux ! queue ! filesink location=/opt/video.mp4Copy to clipboard
- 4K@30 AVC → 解码 → 翻转和缩小 → 1080p@30 AVC
    - Qualcomm Computer Vision SDK（fcv）引擎：

            gst-launch-1.0 -e filesrc location=/opt/<4K_H264/AVC_file>.mp4 ! qtdemux ! queue ! h264parse ! v4l2h264dec capture-io-mode=4 output-io-mode=4 ! video/x-raw,format=NV12 ! qtivtransform engine=fcv flip-vertical=true ! video/x-raw,format=NV12,width=1920,height=1080 ! v4l2h264enc capture-io-mode=4 output-io-mode=5 ! h264parse ! queue ! mp4mux ! queue ! filesink location=/opt/video.mp4Copy to clipboard
    - GLES 引擎：

            gst-launch-1.0 -e filesrc location=/opt/<4K_H264/AVC_file>.mp4 ! qtdemux ! queue ! h264parse ! v4l2h264dec capture-io-mode=4 output-io-mode=4 ! video/x-raw,format=NV12 ! qtivtransform engine=gles flip-vertical=true ! video/x-raw,format=NV12,width=1920,height=1080 ! v4l2h264enc capture-io-mode=4 output-io-mode=5 ! h264parse ! queue ! mp4mux ! queue ! filesink location=/opt/video.mp4Copy to clipboard
- Video\_qmmf\_Transform\_rotate\_counter\_clock\_3840 x 2160 @30fps
    - Qualcomm Computer Vision SDK（fcv）引擎：

            gst-launch-1.0 -e qtiqmmfsrc ! video/x-raw,format=NV12,width=3840,height=2160,framerate=30/1 ! qtivtransform engine=fcv rotate=90CCW ! queue ! v4l2h264enc capture-io-mode=4 output-io-mode=5 ! h264parse ! queue ! mp4mux ! queue ! filesink location=/opt/video.mp4Copy to clipboard
    - GLES 引擎：

            gst-launch-1.0 -e qtiqmmfsrc ! video/x-raw,format=NV12,width=3840,height=2160,framerate=30/1 ! qtivtransform engine=gles rotate=90CCW ! queue ! video/x-raw,format=NV12,width=3840,height=2160,framerate=30/1,interlace-mode=progressive,colorimetry=bt601 ! v4l2h264enc capture-io-mode=4 output-io-mode=5 ! h264parse ! queue ! mp4mux ! queue ! filesink location=/opt/video.mp4Copy to clipboard
- Video\_qmmf\_Transform\_scale\_down\_3840 x 2160 @30fps\_to\_1080p
    - Qualcomm Computer Vision SDK（fcv）引擎：

            gst-launch-1.0 -e qtiqmmfsrc ! video/x-raw,format=NV12,width=3840,height=2160,framerate=30/1 ! qtivtransform engine=fcv ! queue ! video/x-raw,format=NV12,width=1920,height=1080,framerate=30/1,interlace-mode=progressive,colorimetry=bt601 ! v4l2h264enc capture-io-mode=4 output-io-mode=5 ! h264parse ! queue ! mp4mux ! queue ! filesink location=/opt/video.mp4Copy to clipboard
    - GLES 引擎：

            gst-launch-1.0 -e qtiqmmfsrc ! video/x-raw,format=NV12,width=3840,height=2160,framerate=30/1 ! qtivtransform engine=gles ! queue ! video/x-raw,format=NV12,width=1920,height=1080,framerate=30/1,interlace-mode=progressive,colorimetry=bt601 ! v4l2h264enc capture-io-mode=4 output-io-mode=5 ! h264parse ! queue ! mp4mux ! queue ! filesink location=/opt/video.mp4Copy to clipboard
- Video\_qmmf\_Transform\_flip\_horizontal\_3840 x 2160 @30fps
    - Qualcomm Computer Vision SDK（fcv）引擎：

            gst-launch-1.0 -e qtiqmmfsrc ! video/x-raw,format=NV12,width=3840,height=2160,framerate=30/1 ! qtivtransform engine=fcv flip-horizontal=true ! video/x-raw,format=NV12,width=3840,height=2160,framerate=30/1,interlace-mode=progressive,colorimetry=bt601 ! v4l2h264enc capture-io-mode=4 output-io-mode=5 ! h264parse ! queue ! mp4mux ! queue ! filesink location=/opt/video_flip_h.mp4Copy to clipboard
    - GLES 引擎：

            gst-launch-1.0 -e qtiqmmfsrc ! video/x-raw,format=NV12,width=3840,height=2160,framerate=30/1 ! qtivtransform engine=gles flip-horizontal=true ! video/x-raw,format=NV12,width=3840,height=2160,framerate=30/1,interlace-mode=progressive,colorimetry=bt601 ! v4l2h264enc capture-io-mode=4 output-io-mode=5 ! h264parse ! queue ! mp4mux ! queue ! filesink location=/opt/video_flip_h.mp4Copy to clipboard
- Video\_qmmf\_Transform\_flip\_vertical\_3840 x 2160 @30fps
    - Qualcomm Computer Vision SDK（fcv）引擎：

            gst-launch-1.0 -e qtiqmmfsrc ! video/x-raw,format=NV12,width=3840,height=2160,framerate=30/1 ! qtivtransform engine=fcv flip-vertical=true ! video/x-raw,format=NV12,width=3840,height=2160,framerate=30/1,interlace-mode=progressive,colorimetry=bt601 ! v4l2h264enc capture-io-mode=4 output-io-mode=5 ! h264parse ! queue ! mp4mux ! queue ! filesink location=/opt/video_flip_v.mp4Copy to clipboard
    - GLES 引擎：

            gst-launch-1.0 -e qtiqmmfsrc ! video/x-raw,format=NV12,width=3840,height=2160,framerate=30/1 ! qtivtransform engine=gles flip-vertical=true ! video/x-raw,format=NV12,width=3840,height=2160,framerate=30/1,interlace-mode=progressive,colorimetry=bt601 ! v4l2h264enc capture-io-mode=4 output-io-mode=5 ! h264parse ! queue ! mp4mux ! queue ! filesink location=/opt/video_flip_v.mp4Copy to clipboard

### 视频转码用例

- 4k@30 HEVC → 解码 → 4k@30 AVC 编码：

        gst-launch-1.0 -e filesrc location=/opt/<4K_H265/HEVC_file>.mp4 ! qtdemux ! queue ! h265parse ! v4l2h265dec capture-io-mode=4 output-io-mode=4 ! v4l2h264enc capture-io-mode=4 output-io-mode=5 ! queue ! h264parse ! mp4mux ! queue ! filesink location=/opt/offline_hevc_to_avc.mp4Copy to clipboard
- 4k@30 AVC → 解码 → 4k@30 HEVC 编码：

        gst-launch-1.0 -e filesrc location=/opt/<4K_H264/AVC_file>.mp4 ! qtdemux ! queue ! h264parse ! v4l2h264dec capture-io-mode=4 output-io-mode=4 ! v4l2h265enc capture-io-mode=4 output-io-mode=5 ! queue ! h265parse ! mp4mux ! queue ! filesink location="/opt/offline_avc_to_hevc.mp4"Copy to clipboard

### 使用 qtivtransform 进行动态裁剪

**从单个 1080p 文件流中裁剪 ROI**
1. 显示流：

        gst-launch-1.0 filesrc location=/opt/<input_file>.mp4 ! qtdemux ! queue ! h264parse ! v4l2h264dec capture-io-mode=4 output-io-mode=4 ! queue ! qtivtransform flip-vertical=true crop="<480,270,960,540>" ! waylandsink fullscreen=trueCopy to clipboard
2. 对流数据进行编码：

        gst-launch-1.0 -e filesrc location=/opt/<input_file>.mp4 ! qtdemux ! queue ! h264parse ! v4l2h264dec capture-io-mode=4 output-io-mode=4 ! queue ! qtivtransform flip-horizontal=true crop="<480,270,960,540>" ! queue ! video/x-raw,format=NV12,width=1920,height=1080,framerate=30/1,interlace-mode=progressive,colorimetry=bt601 ! v4l2h264enc capture-io-mode=4 output-io-mode=5 ! h264parse ! queue ! mp4mux ! queue ! filesink location=/opt/offline_crop_vtransform.mp4Copy to clipboard

**从单个 1080p 摄像头流中裁剪 ROI**

1. 显示流：

        gst-launch-1.0 -e qtiqmmfsrc ! video/x-raw,format=NV12,width=1920,height=1080,framerate=30/1 ! queue ! qtivtransform flip-horizontal=true crop="<480,270,960,540>" ! waylandsink fullscreen=trueCopy to clipboard
2. 对流数据进行编码：

        gst-launch-1.0 -e qtiqmmfsrc ! video/x-raw,format=NV12,width=1920,height=1080,framerate=30/1 ! qtivtransform flip-horizontal=true crop="<480,270,960,540>" ! queue ! video/x-raw,format=NV12,width=1920,height=1080,framerate=30/1,interlace-mode=progressive,colorimetry=bt601 ! v4l2h264enc capture-io-mode=4 output-io-mode=5 ! h264parse ! queue ! mp4mux ! queue ! filesink location=/opt/cam_crop_vtransform.mp4Copy to clipboard

### 相关信息

[视频转码](https://docs.qualcomm.com/doc/80-70022-50SC/topic/gst-video-transcode-example.html)

Last Published: Nov 05, 2025

[Previous Topic
多摄像头/多客户端用例](https://docs.qualcomm.com/bundle/publicresource/80-70022-50SC/topics/multi-camera-multi-client-use-cases.md) [Next Topic
视频播放用例](https://docs.qualcomm.com/bundle/publicresource/80-70022-50SC/topics/video-playback-use-cases.md)