# RTMP 摄像头流传输

Source: [https://docs.qualcomm.com/doc/80-70022-50SC/topic/gst-rtmp-stream-example.html](https://docs.qualcomm.com/doc/80-70022-50SC/topic/gst-rtmp-stream-example.html)

**gst-rtmp-stream-example** 应用程序使用来自 ISP 或 RTSP 摄像头源的输入在 Waylandsink 上生成 RTMP 流。您可以使用此应用程序作为开发和配置新应用程序的参考。

此应用程序主要用于安全系统和媒体广播，其中来自 RTSP 源或摄像头源的视频通过网络传输。您可以查看流或将其存档以供将来查看。

下图展示了不同源的 RTMP 流传输所涉及的 pipeline。关于此 pipeline 中使用的元素的更多信息，请参见 [Pipeline 流](https://docs.qualcomm.com/doc/80-70022-50SC/topic/gst-rtmp-stream-example.html#gst_rtmp_stream_example__section_jtb_hvv_ngc)。

Figure : gst-rtmp-stream-example pipeline
                    
                    <!--?xml version="1.0" encoding="UTF-8" standalone="no"?-->

<!-- Generated by Microsoft Visio, SVG Export gst-rtmp-stream-example.svg gst-rtmp-stream-example -->
<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="10.1042in" height="2.29167in" viewbox="0 0 727.5 165" xml:space="preserve" color-interpolation-filters="sRGB" class="st15"><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: 0.874992em }
.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 { font-size: 1em }
.svg-1 .st9 { fill: none }
.svg-1 .st10 { fill: none; stroke: #000000; stroke-linecap: round; stroke-linejoin: round; stroke-width: 1.5 }
.svg-1 .st11 { stroke: #000000; stroke-linecap: round; stroke-linejoin: round; stroke-width: 1.5 }
.svg-1 .st12 { fill: none; stroke: none; stroke-linecap: butt; stroke-width: 0.75 }
.svg-1 .st13 { fill: #000000; font-family: Roboto; font-size: 0.874992em }
.svg-1 .st14 { fill: #000000; font-family: SimHei; font-size: 0.874992em }
.svg-1 .st15 { 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>gst-rtmp-stream-example</title>	<v:pageproperties v:drawingscale="1" v:pagescale="1" v:drawingunits="19" v:shadowoffsetx="9" v:shadowoffsety="-9"></v:pageproperties>	<g id="shape2-1" v:mid="2" v:groupcontext="shape" transform="translate(0.375,-0.375114)">		<title>Sheet.2</title>		<path d="M0 159.37 A5.62513 5.62513 -180 0 0 5.63 165 L721.12 165 A5.62513 5.62513 -180 0 0 726.75 159.37 L726.75 6.37					 A5.62513 5.62513 -180 0 0 721.12 0.75 L5.62 0.75 A5.62513 5.62513 -180 0 0 0 6.37 L0 159.37 Z" class="st1"></path>	</g>	<g id="shape3-3" v:mid="3" v:groupcontext="shape">		<title>Sheet.3</title>		<path d="M721.5 0.75 C724.39 0.75 726.75 3.11 726.75 6 L726.75 159 C726.75 161.89 724.39 164.25 721.5 164.25 L6 164.25					 C3.11 164.25 0.75 161.89 0.75 159 L0.75 6 C0.75 3.11 3.11 0.75 6 0.75 L721.5 0.75 ZM721.5 0 L6 0 C2.69 0					 0 2.69 0 6 L0 159 C0 162.31 2.69 165 6 165 L721.5 165 C724.81 165 727.5 162.31 727.5 159 L727.5 6 C727.5					 2.69 724.81 0 721.5 0 Z" class="st2"></path>	</g>	<g id="shape12-5" v:mid="12" v:groupcontext="shape" transform="translate(51.8591,-39.3045)">		<title>Sheet.12</title>		<desc>qtiqmmfsrc</desc>		<v:textblock v:margins="rect(0,0,0,0)"></v:textblock>		<v:textrect cx="36" cy="142.5" width="72.01" height="45"></v:textrect>		<path d="M0 162 A3.00007 3.00007 -180 0 0 3 165 L69 165 A3.00007 3.00007 -180 0 0 72 162 L72 123 A3.00007 3.00007 -180					 0 0 69 120 L3 120 A3.00007 3.00007 -180 0 0 0 123 L0 162 Z" class="st3"></path>		<text x="8.79" y="146.1" class="st4" v:langid="1033"><v:paragraph v:horizalign="1"></v:paragraph><v:tablist></v:tablist>qtiqmmfsrc</text>		</g>	<g id="shape14-8" v:mid="14" v:groupcontext="shape" transform="translate(123.859,-61.8045)">		<title>Sheet.14</title>		<path d="M0 165 L9.48 165" class="st5"></path>	</g>	<g id="shape15-11" v:mid="15" v:groupcontext="shape" transform="translate(132.466,-58.8127)">		<title>Sheet.15</title>		<path d="M0 165 L5.18 162.01 L0 159.02 L0 165 Z" class="st6"></path>	</g>	<g id="shape16-13" v:mid="16" v:groupcontext="shape" transform="translate(42.3574,-61.8045)">		<title>Sheet.16</title>		<path d="M0 165 L9.5 165" class="st5"></path>	</g>	<g id="shape17-16" v:mid="17" v:groupcontext="shape" transform="translate(679.684,-94.725)">		<title>Sheet.17</title>		<path d="M0 165 L9.5 165" class="st5"></path>	</g>	<g id="shape18-19" v:mid="18" v:groupcontext="shape" transform="translate(137.699,-39.3045)">		<title>Sheet.18</title>		<desc>capsfilter</desc>		<v:textblock v:margins="rect(0,0,0,0)"></v:textblock>		<v:textrect cx="35.625" cy="142.5" width="71.25" height="45"></v:textrect>		<path d="M0 162 A3.00007 3.00007 -180 0 0 3 165 L68.25 165 A3.00007 3.00007 -180 0 0 71.25 162 L71.25 123 A3.00007 3.00007					 -180 0 0 68.25 120 L3 120 A3.00007 3.00007 -180 0 0 0 123 L0 162 Z" class="st7"></path>		<text x="13.73" y="146.1" class="st4" v:langid="1033"><v:paragraph v:horizalign="1"></v:paragraph><v:tablist></v:tablist>capsfilter</text>		</g>	<g id="shape20-22" v:mid="20" v:groupcontext="shape" transform="translate(208.949,-61.8045)">		<title>Sheet.20</title>		<path d="M0 165 L9.48 165" class="st5"></path>	</g>	<g id="shape21-25" v:mid="21" v:groupcontext="shape" transform="translate(217.556,-58.8127)">		<title>Sheet.21</title>		<path d="M0 165 L5.18 162.01 L0 159.02 L0 165 Z" class="st6"></path>	</g>	<g id="shape22-27" v:mid="22" v:groupcontext="shape" transform="translate(222.789,-39.3045)">		<title>Sheet.22</title>		<desc>v4l2h264enc</desc>		<v:textblock v:margins="rect(0,0,0,0)"></v:textblock>		<v:textrect cx="35.625" cy="142.5" width="71.25" height="45"></v:textrect>		<path d="M0 162 A3.00007 3.00007 -180 0 0 3 165 L68.25 165 A3.00007 3.00007 -180 0 0 71.25 162 L71.25 123 A3.00007 3.00007					 -180 0 0 68.25 120 L3 120 A3.00007 3.00007 -180 0 0 -0 123 L0 162 Z" class="st7"></path>		<text x="5.75" y="146.1" class="st4" v:langid="1033"><v:paragraph v:horizalign="1"></v:paragraph><v:tablist></v:tablist>v4l2h264enc</text>		</g>	<g id="shape24-30" v:mid="24" v:groupcontext="shape" transform="translate(294.039,-61.8045)">		<title>Sheet.24</title>		<path d="M0 165 L9.48 165" class="st5"></path>	</g>	<g id="shape25-33" v:mid="25" v:groupcontext="shape" transform="translate(302.646,-58.8127)">		<title>Sheet.25</title>		<path d="M0 165 L5.18 162.01 L0 159.02 L0 165 Z" class="st6"></path>	</g>	<g id="shape26-35" v:mid="26" v:groupcontext="shape" transform="translate(307.879,-39.3045)">		<title>Sheet.26</title>		<desc>h264parse</desc>		<v:textblock v:margins="rect(0,0,0,0)"></v:textblock>		<v:textrect cx="39.375" cy="142.5" width="78.76" height="45"></v:textrect>		<path d="M-0 162 A3.00007 3.00007 -180 0 0 3 165 L75.75 165 A3.00007 3.00007 -180 0 0 78.75 162 L78.75 123 A3.00007 3.00007					 -180 0 0 75.75 120 L3 120 A3.00007 3.00007 -180 0 0 0 123 L0 162 Z" class="st7"></path>		<text x="14.57" y="146.1" class="st4" v:langid="1033"><v:paragraph v:horizalign="1"></v:paragraph><v:tablist></v:tablist>h264parse</text>		</g>	<g id="shape28-38" v:mid="28" v:groupcontext="shape" transform="translate(386.629,-61.8045)">		<title>Sheet.28</title>		<path d="M0 165 L9.48 165" class="st5"></path>	</g>	<g id="shape29-41" v:mid="29" v:groupcontext="shape" transform="translate(395.236,-58.8127)">		<title>Sheet.29</title>		<path d="M0 165 L5.18 162.01 L0 159.02 L0 165 Z" class="st6"></path>	</g>	<g id="shape34-43" v:mid="34" v:groupcontext="shape" transform="translate(400.418,-39.3045)">		<title>Sheet.34</title>		<desc>flvmux</desc>		<v:textblock v:margins="rect(0,0,0,0)"></v:textblock>		<v:textrect cx="39.375" cy="142.5" width="78.76" height="45"></v:textrect>		<path d="M-0 162 A3.00007 3.00007 -180 0 0 3 165 L75.75 165 A3.00007 3.00007 -180 0 0 78.75 162 L78.75 123 A3.00007 3.00007					 -180 0 0 75.75 120 L3 120 A3.00007 3.00007 -180 0 0 0 123 L0 162 Z" class="st7"></path>		<text x="23.64" y="146.1" class="st4" v:langid="1033"><v:paragraph v:horizalign="1"></v:paragraph><v:tablist></v:tablist>flvmux</text>		</g>	<g id="shape36-46" v:mid="36" v:groupcontext="shape" transform="translate(479.168,-61.8045)">		<title>Sheet.36</title>		<path d="M0 165 L9.48 165" class="st5"></path>	</g>	<g id="shape37-49" v:mid="37" v:groupcontext="shape" transform="translate(487.775,-58.8127)">		<title>Sheet.37</title>		<path d="M0 165 L5.18 162.01 L0 159.02 L0 165 Z" class="st6"></path>	</g>	<g id="shape39-51" v:mid="39" v:groupcontext="shape" transform="translate(51.8591,-105.145)">		<title>Sheet.39</title>		<desc>rtspsrc</desc>		<v:textblock v:margins="rect(0,0,0,0)"></v:textblock>		<v:textrect cx="36" cy="142.5" width="72.01" height="45"></v:textrect>		<path d="M0 162 A3.00007 3.00007 -180 0 0 3 165 L69 165 A3.00007 3.00007 -180 0 0 72 162 L72 123 A3.00007 3.00007 -180					 0 0 69 120 L3 120 A3.00007 3.00007 -180 0 0 0 123 L0 162 Z" class="st7"></path>		<text x="19.62" y="146.1" class="st4" v:langid="1033"><v:paragraph v:horizalign="1"></v:paragraph><v:tablist></v:tablist>rtspsrc</text>		</g>	<g id="shape41-54" v:mid="41" v:groupcontext="shape" transform="translate(123.859,-127.645)">		<title>Sheet.41</title>		<path d="M0 165 L9.48 165" class="st5"></path>	</g>	<g id="shape42-57" v:mid="42" v:groupcontext="shape" transform="translate(132.466,-124.654)">		<title>Sheet.42</title>		<path d="M0 165 L5.18 162.01 L0 159.02 L0 165 Z" class="st6"></path>	</g>	<g id="shape43-59" v:mid="43" v:groupcontext="shape" transform="translate(42.3574,-127.645)">		<title>Sheet.43</title>		<path d="M0 165 L9.5 165" class="st5"></path>	</g>	<g id="shape44-62" v:mid="44" v:groupcontext="shape" transform="translate(137.699,-105.145)">		<title>Sheet.44</title>		<desc>rtph264 depay</desc>		<v:textblock v:margins="rect(0,0,0,0)"></v:textblock>		<v:textrect cx="35.625" cy="142.5" width="71.25" height="45"></v:textrect>		<path d="M0 162 A3.00007 3.00007 -180 0 0 3 165 L68.25 165 A3.00007 3.00007 -180 0 0 71.25 162 L71.25 123 A3.00007 3.00007					 -180 0 0 68.25 120 L3 120 A3.00007 3.00007 -180 0 0 0 123 L0 162 Z" class="st7"></path>		<text x="17.45" y="138.45" class="st4" v:langid="1033"><v:paragraph v:horizalign="1"></v:paragraph><v:tablist></v:tablist>rtph264<v:newlinechar></v:newlinechar><tspan x="21.6" dy="1.329em" class="st8">depay</tspan></text>		</g>	<g id="shape46-66" v:mid="46" v:groupcontext="shape" transform="translate(208.949,-127.645)">		<title>Sheet.46</title>		<path d="M0 165 L9.48 165" class="st5"></path>	</g>	<g id="shape47-69" v:mid="47" v:groupcontext="shape" transform="translate(217.556,-124.654)">		<title>Sheet.47</title>		<path d="M0 165 L5.18 162.01 L0 159.02 L0 165 Z" class="st6"></path>	</g>	<g id="shape48-71" v:mid="48" v:groupcontext="shape" transform="translate(222.789,-105.145)">		<title>Sheet.48</title>		<desc>h264parse</desc>		<v:textblock v:margins="rect(0,0,0,0)"></v:textblock>		<v:textrect cx="35.625" cy="142.5" width="71.25" height="45"></v:textrect>		<path d="M0 162 A3.00007 3.00007 -180 0 0 3 165 L68.25 165 A3.00007 3.00007 -180 0 0 71.25 162 L71.25 123 A3.00007 3.00007					 -180 0 0 68.25 120 L3 120 A3.00007 3.00007 -180 0 0 -0 123 L0 162 Z" class="st7"></path>		<text x="10.82" y="146.1" class="st4" v:langid="1033"><v:paragraph v:horizalign="1"></v:paragraph><v:tablist></v:tablist>h264parse</text>		</g>	<g id="shape50-74" v:mid="50" v:groupcontext="shape" transform="translate(294.039,-127.645)">		<title>Sheet.50</title>		<path d="M0 165 L9.48 165" class="st5"></path>	</g>	<g id="shape51-77" v:mid="51" v:groupcontext="shape" transform="translate(302.646,-124.654)">		<title>Sheet.51</title>		<path d="M0 165 L5.18 162.01 L0 159.02 L0 165 Z" class="st6"></path>	</g>	<g id="shape52-79" v:mid="52" v:groupcontext="shape" transform="translate(307.879,-105.145)">		<title>Sheet.52</title>		<desc>flvmux</desc>		<v:textblock v:margins="rect(0,0,0,0)"></v:textblock>		<v:textrect cx="39.375" cy="142.5" width="78.76" height="45"></v:textrect>		<path d="M-0 162 A3.00007 3.00007 -180 0 0 3 165 L75.75 165 A3.00007 3.00007 -180 0 0 78.75 162 L78.75 123 A3.00007 3.00007					 -180 0 0 75.75 120 L3 120 A3.00007 3.00007 -180 0 0 0 123 L0 162 Z" class="st7"></path>		<text x="23.64" y="146.1" class="st4" v:langid="1033"><v:paragraph v:horizalign="1"></v:paragraph><v:tablist></v:tablist>flvmux</text>		</g>	<g id="shape54-82" v:mid="54" v:groupcontext="shape" transform="translate(386.629,-127.645)">		<title>Sheet.54</title>		<path d="M0 165 L102.02 165" class="st5"></path>	</g>	<g id="shape55-85" v:mid="55" v:groupcontext="shape" transform="translate(487.775,-124.654)">		<title>Sheet.55</title>		<path d="M0 165 L5.18 162.01 L0 159.02 L0 165 Z" class="st6"></path>	</g>	<g id="shape60-87" v:mid="60" v:groupcontext="shape" transform="translate(492.956,-39.3045)">		<title>Sheet.60</title>		<desc>rtmp2sink</desc>		<v:textblock v:margins="rect(0,0,0,0)"></v:textblock>		<v:textrect cx="39.375" cy="142.5" width="78.76" height="45"></v:textrect>		<path d="M-0 162 A3.00007 3.00007 -180 0 0 3 165 L75.75 165 A3.00007 3.00007 -180 0 0 78.75 162 L78.75 123 A3.00007 3.00007					 -180 0 0 75.75 120 L3 120 A3.00007 3.00007 -180 0 0 0 123 L0 162 Z" class="st7"></path>		<text x="15.85" y="146.1" class="st4" v:langid="1033"><v:paragraph v:horizalign="1"></v:paragraph><v:tablist></v:tablist>rtmp2sink</text>		</g>	<g id="shape61-90" v:mid="61" v:groupcontext="shape" transform="translate(571.706,-61.8045)">		<title>Sheet.61</title>		<path d="M0 165 L13.79 165 L13.79 99.16 L0 99.16 L0 165 Z" class="st9"></path>		<path d="M0 165 L13.79 165 L13.79 99.16 L0 99.16" class="st5"></path>	</g>	<g id="shape63-93" v:mid="63" v:groupcontext="shape" transform="translate(492.956,-105.145)">		<title>Sheet.63</title>		<desc>rtmp2sink</desc>		<v:textblock v:margins="rect(0,0,0,0)"></v:textblock>		<v:textrect cx="39.375" cy="142.5" width="78.76" height="45"></v:textrect>		<path d="M-0 162 A3.00007 3.00007 -180 0 0 3 165 L75.75 165 A3.00007 3.00007 -180 0 0 78.75 162 L78.75 123 A3.00007 3.00007					 -180 0 0 75.75 120 L3 120 A3.00007 3.00007 -180 0 0 0 123 L0 162 Z" class="st7"></path>		<text x="15.85" y="146.1" class="st4" v:langid="1033"><v:paragraph v:horizalign="1"></v:paragraph><v:tablist></v:tablist>rtmp2sink</text>		</g>	<g id="shape66-96" v:mid="66" v:groupcontext="shape" transform="translate(25.3349,-123.07)">		<title>Sheet.66</title>		<path d="M0 157.37 C0 156.78 0.48 156.3 1.07 156.3 C1.27 156.3 1.46 156.36 1.63 156.46 L6.85 159.66 C7.35 159.97 7.51					 160.63 7.2 161.13 C7.11 161.28 6.99 161.4 6.85 161.49 L1.63 164.69 C1.12 165 0.47 164.84 0.16 164.34 C0.05					 164.17 0 163.98 0 163.78 L0 157.37 Z" class="st10"></path>	</g>	<g id="shape67-98" v:mid="67" v:groupcontext="shape" transform="translate(21.0601,-111.82)">		<title>Sheet.67</title>		<path d="M0 165 L14.25 165 L0 165 Z" class="st9"></path>		<path d="M0 165 L14.25 165" class="st11"></path>	</g>	<g id="shape68-101" v:mid="68" v:groupcontext="shape" transform="translate(13.9351,-117.52)">		<title>Sheet.68</title>		<path d="M0 163.5 A1.50003 1.50003 -180 0 0 1.5 165 L27 165 A1.50003 1.50003 -180 0 0 28.5 163.5 L28.5 146.55 A1.50003					 1.50003 -180 0 0 27 145.05 L1.5 145.05 A1.50003 1.50003 -180 0 0 -0 146.55 L0 163.5 Z" class="st10"></path>	</g>	<g id="shape69-103" v:mid="69" v:groupcontext="shape" transform="translate(600.893,-74.1847)">		<title>Sheet.69</title>		<desc>Waylandsink</desc>		<v:textblock v:margins="rect(0,0,0,0)"></v:textblock>		<v:textrect cx="39.3956" cy="144.46" width="78.8" height="41.0806"></v:textrect>		<path d="M0 162 A3.00007 3.00007 -180 0 0 3 165 L75.79 165 A3.00007 3.00007 -180 0 0 78.79 162 L78.79 126.92 A3.00007					 3.00007 -180 0 0 75.79 123.92 L3 123.92 A3.00007 3.00007 -180 0 0 0 126.92 L0 162 Z" class="st7"></path>		<text x="9.87" y="148.06" class="st4" v:langid="1033"><v:paragraph v:horizalign="1"></v:paragraph><v:tablist></v:tablist>Waylandsink</text>		</g>	<g id="shape72-106" v:mid="72" v:groupcontext="shape" transform="translate(13.9351,-50.4045)">		<title>Sheet.72</title>		<path d="M17.81 142.2 L10.69 142.2 L7.12 146.47 L2.85 146.47 C1.28 146.47 0 147.75 0 149.32 L0 162.15 C0 163.72 1.28					 165 2.85 165 L25.65 165 C27.22 165 28.5 163.72 28.5 162.15 L28.5 149.32 C28.5 147.75 27.22 146.47 25.65					 146.47 L21.37 146.47 L17.81 142.2 Z" class="st10"></path>	</g>	<g id="shape73-108" v:mid="73" v:groupcontext="shape" transform="translate(23.9101,-57.5295)">		<title>Sheet.73</title>		<ellipse cx="4.275" cy="160.725" rx="4.275" ry="4.275" class="st10"></ellipse>	</g>	<g id="shape75-110" v:mid="75" v:groupcontext="shape" transform="translate(585.494,-94.725)">		<title>Sheet.75</title>		<path d="M0 165 L11.63 165" class="st5"></path>	</g>	<g id="shape76-113" v:mid="76" v:groupcontext="shape" transform="translate(596.359,-92.1072)">		<title>Sheet.76</title>		<path d="M0 165 L4.53 162.38 L0 159.76 L0 165 Z" class="st6"></path>	</g>	<g id="shape78-115" v:mid="78" v:groupcontext="shape" transform="translate(688.565,-88.475)">		<title>Sheet.78</title>		<path d="M-0 162 A3.00007 3.00007 -180 0 0 3 165 L22 165 A3.00007 3.00007 -180 0 0 25 162 L25 150.5 A3.00007 3.00007					 -180 0 0 22 147.5 L3 147.5 A3.00007 3.00007 -180 0 0 -0 150.5 L0 162 Z" class="st10"></path>	</g>	<g id="shape79-117" v:mid="79" v:groupcontext="shape" transform="translate(696.065,-83.475)">		<title>Sheet.79</title>		<path d="M0 165 L10 165" class="st11"></path>	</g>	<g id="shape80-120" v:mid="80" v:groupcontext="shape" transform="translate(866.065,76.525) rotate(90)">		<title>Sheet.80</title>		<path d="M0 165 L5 165" class="st11"></path>	</g>	<g id="group81-123" transform="translate(603.44,-14.6359)" v:mid="81" v:groupcontext="group">		<title>Sheet.81</title>		<g id="shape7-124" 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.82" cy="158.7" width="55.64" height="12.6"></v:textrect>			<rect x="0" y="152.4" width="55.64" height="12.6" class="st12"></rect>			<text x="0" y="161.85" class="st13" v:langid="1033"><v:paragraph></v:paragraph><v:tablist></v:tablist>Qualcomm  </text>			</g>		<g id="shape8-127" v:mid="8" v:groupcontext="shape" transform="translate(-3.29736E-14,-0.218618)">			<title>Sheet.8</title>			<path d="M0 163.5 A1.50003 1.50003 -180 0 0 1.5 165 L10.5 165 A1.50003 1.50003 -180 0 0 12 163.5 L12 154.5 A1.50003						 1.50003 -180 0 0 10.5 153 L1.5 153 A1.50003 1.50003 -180 0 0 0 154.5 L0 163.5 Z" class="st3"></path>		</g>		<g id="shape10-129" 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="158.7" width="21" height="12.6"></v:textrect>			<rect x="0" y="152.4" width="21" height="12.6" class="st12"></rect>			<text x="-0" y="162.19" class="st14" v:langid="1033"><v:paragraph></v:paragraph><v:tablist></v:tablist>开源</text>			</g>		<g id="shape11-132" v:mid="11" v:groupcontext="shape" transform="translate(73.9363,-0.218618)">			<title>Sheet.11</title>			<path d="M0 163.5 A1.50003 1.50003 -180 0 0 1.5 165 L10.5 165 A1.50003 1.50003 -180 0 0 12 163.5 L12 154.5 A1.50003						 1.50003 -180 0 0 10.5 153 L1.5 153 A1.50003 1.50003 -180 0 0 -0 154.5 L0 163.5 Z" class="st7"></path>		</g>	</g></g>
</svg>

## 运行应用程序

1. 确保您已完成[前提条件](https://docs.qualcomm.com/doc/80-70022-50SC/topic/mm_sample_apps_prerequisites.html)。
2. 在目标设备的终端中，下载并运行 RTMP 服务器：

        docker pull tiangolo/nginx-rtmp
        docker run -d -p 1935:1935 --name nginx-rtmp tiangolo/nginx-rtmpCopy to clipboard
3. 在目标设备的终端中，选择以下任一用例并运行相应的命令：
    - **RTSP 摄像头 AVC 转 RTMP 用例：**

            gst-rtmp-stream-example  -u 0 -d rtmp://<192.168.1.171/>live/01 -r <rtsp://admin:qualcomm1@192.168.1.252:554/Streaming/Channels/101 ! >Copy to clipboard
    - **ISP 摄像头转 RTMP 用例：**

            gst-rtmi-camera-stream-example  -u 1 -d rtmp://192.168.1.171/live/01Copy to clipboard
4. 在目标设备的终端中，运行以下命令将 VLC 连接到流：

        rtmp://192.168.1.171/live/01Copy to clipboard

    在此命令中，将 rtmp://192.168.1.171/live/01 替换为设备的 IP 地址。
5. 在目标设备的终端中，运行以下命令停止 RTMP 服务器：

        docker stop nginx-rtmp
        docker rm nginx-rtmpCopy to clipboard
6. 要停止用例，请使用 CTRL +
                    C。
7. 在目标设备的终端中，在 SSH shell 中运行以下命令以显示可用的帮助选项：

        gst-rtmp-stream-example --helpCopy to clipboard

## 预期输出

输出显示在 Wayland 上。

## Pipeline 流

下表列出了 RTMP 流传输 pipeline 中使用的插件：

| 插件 | 说明 |
| --- | --- |
| [qtiqmmfsrc](https://docs.qualcomm.com/doc/80-70022-50SC/topic/qtiqmmfsrc.html) | 采集摄像头源并将其发送到 capsfilter 中。 |
| Capsfilter | 将源传递给 [Waylandsink](https://docs.qualcomm.com/doc/80-70022-50SC/topic/waylandsink.html) 进行显示。 |
| Capsfilter | 如果未提供显示选项，则将流传递给 appsink。 |
| [v4l2h264enc](https://docs.qualcomm.com/doc/80-70022-50SC/topic/v4l2h264enc.html) | 将视频编码为 AVC (H.264) 格式。 |
| h264parse | 渲染 H.264 视频。 |
| flvmux | 将视频封装到 FLV 容器中 |
| rtmp2sink | 传输到 RTMP 服务器进行实时流传输。 |
|  |  |

**Parent Topic:** [运行摄像头的示例应用程序](https://docs.qualcomm.com/doc/80-70022-50SC/topic/camera-sample-applications.html)

Last Published: Nov 05, 2025

[Previous Topic
实时拍照](https://docs.qualcomm.com/bundle/publicresource/80-70022-50SC/topics/gst-snapshot-stream-example.md) [Next Topic
动态配置](https://docs.qualcomm.com/bundle/publicresource/80-70022-50SC/topics/dynamic-configuration.md)