# RTMP camera streaming

The **gst-rtmp-stream-example** application uses the input from ISP or RTSP camera source to generate RTMP streams on a Waylandsink. You can use this application as a reference to develop and configure new applications.

This application is primarily targeted for security systems and media broadcasting, where a video from RTSP source or camera source streams across a network. You can either view the stream or archive it for future review.

The following figure shows the pipeline involved in RTMP streaming with different sources. For more information about the elements used in this pipeline, see [Pipeline flow](https://docs.qualcomm.com/doc/80-80022-55/topic/gst-rtmp-stream-example.html#section-jtb-hvv-ngc).

<!--?xml version="1.0" encoding="UTF-8"?-->
<svg xmlns="http://www.w3.org/2000/svg" width="970" height="220" viewbox="0 0 970 220" aria-label="../../_images/gst-rtmp-stream-example.svg">
  <g id="Layer_2" data-name="Layer 2">
    <g>
      <rect x=".5" y=".499847412109375" width="969" height="219" rx="7.5" ry="7.5" style="fill: #fafafa;"></rect>
      <path d="M962,1c3.85986328125,0,7,3.140121459960938,7,7v204c0,3.85986328125-3.14013671875,7-7,7H8c-3.859878540039062,0-7-3.14013671875-7-7V8c0-3.859878540039062,3.140121459960938-7,7-7h954M962,0H8C3.581756591796875,0,0,3.581756591796875,0,8v204c0,4.418243408203125,3.581756591796875,8,8,8h954c4.41827392578125,0,8-3.581756591796875,8-8V8c0-4.418243408203125-3.58172607421875-8-8-8h0Z" style="fill: #d2d7e1;"></path>
    </g>
  </g>
  <g id="Layer_3" data-name="Layer 3">
    <g>
      <g>
        <g>
          <text transform="translate(777.8133544921875 196.285511016845703)" style="font-family: Roboto-Regular, Roboto; font-size: 14px;"><tspan x="0" y="0">Qualcomm </tspan></text>
          <rect x="757.562394401960773" y="184.194020001501485" width="16" height="16" rx="2" ry="2" style="fill: #2a2aea;"></rect>
        </g>
        <g>
          <text transform="translate(876.3951416015625 196.285511016845703)" style="font-family: Roboto-Regular, Roboto; font-size: 14px;"><tspan x="0" y="0">Open source</tspan></text>
          <rect x="856.144175814813934" y="184.194020001501485" width="16" height="16" rx="2" ry="2" style="fill: #007884;"></rect>
        </g>
      </g>
      <rect x="69.145450955307751" y="107.593948910038307" width="96" height="60" rx="4" ry="4" style="fill: #2a2aea;"></rect>
      <g>
        <line x1="165.145454406738281" y1="137.593963623046875" x2="177.788642883300781" y2="137.593963623046875" style="fill: none; stroke: #000; stroke-miterlimit: 10;"></line>
        <polygon points="176.621452331542969 141.5830078125 183.529632568359375 137.593963623046875 176.621452331542969 133.604888916015625 176.621452331542969 141.5830078125"></polygon>
      </g>
      <line x1="56.476488256204902" y1="137.593948910038307" x2="69.145450955307751" y2="137.593948910038307" style="fill: none; stroke: #000; stroke-miterlimit: 10;"></line>
      <line x1="906.245150735911011" y1="93.699979359564168" x2="918.91411343501386" y2="93.699979359564168" style="fill: none; stroke: #000; stroke-miterlimit: 10;"></line>
      <rect x="183.598927445163099" y="107.593948910038307" width="95" height="60" rx="3.999999999999999" ry="3.999999999999999" style="fill: #007884;"></rect>
      <g>
        <line x1="278.598926544189453" y1="137.593963623046875" x2="291.242122650146484" y2="137.593963623046875" style="fill: none; stroke: #000; stroke-miterlimit: 10;"></line>
        <polygon points="290.074930191040039 141.5830078125 296.983104705810547 137.593963623046875 290.074930191040039 133.604888916015625 290.074930191040039 141.5830078125"></polygon>
      </g>
      <rect x="297.052403935018447" y="107.593948910038307" width="95" height="60" rx="4" ry="4" style="fill: #007884;"></rect>
      <g>
        <line x1="392.052398681640625" y1="137.593963623046875" x2="404.695602416992188" y2="137.593963623046875" style="fill: none; stroke: #000; stroke-miterlimit: 10;"></line>
        <polygon points="403.528411865234375 141.5830078125 410.43658447265625 137.593963623046875 403.528411865234375 133.604888916015625 403.528411865234375 141.5830078125"></polygon>
      </g>
      <rect x="410.505880424874704" y="107.593948910038307" width="105" height="60" rx="4" ry="4" style="fill: #007884;"></rect>
      <g>
        <line x1="515.505889892578125" y1="137.593963623046875" x2="528.149078369140625" y2="137.593963623046875" style="fill: none; stroke: #000; stroke-miterlimit: 10;"></line>
        <polygon points="526.98187255859375 141.5830078125 533.890045166015625 137.593963623046875 526.98187255859375 133.604888916015625 526.98187255859375 141.5830078125"></polygon>
      </g>
      <text transform="translate(80.860061645507812 141.116058349609375)" style="fill: #fff; font-family: Roboto-Regular, Roboto; font-size: 14px;"><tspan x="0" y="0">qtiqmmfsrc</tspan></text>
      <text transform="translate(201.89912223815918 141.684967041015625)" style="fill: #fff; font-family: Roboto-Regular, Roboto; font-size: 14px;"><tspan x="0" y="0">capsfilter</tspan></text>
      <text transform="translate(304.719551086425781 141.685516357421875)" style="fill: #fff; font-family: Roboto-Regular, Roboto; font-size: 14px;"><tspan x="0" y="0">v4l2h264enc</tspan></text>
      <text transform="translate(429.937179565429688 141.685333251953125)" style="fill: #fff; font-family: Roboto-Regular, Roboto; font-size: 14px;"><tspan x="0" y="0">h264parse</tspan></text>
      <rect x="533.890058285567648" y="107.593948910038307" width="105" height="60" rx="4" ry="4" style="fill: #007884;"></rect>
      <g>
        <line x1="638.890045166015625" y1="137.593963623046875" x2="651.53326416015625" y2="137.593963623046875" style="fill: none; stroke: #000; stroke-miterlimit: 10;"></line>
        <polygon points="650.366058349609375 141.5830078125 657.27423095703125 137.593963623046875 650.366058349609375 133.604888916015625 650.366058349609375 141.5830078125"></polygon>
      </g>
      <text transform="translate(565.40728759765625 141.685333251953125)" style="fill: #fff; font-family: Roboto-Regular, Roboto; font-size: 14px;"><tspan x="0" y="0">flvmux</tspan></text>
      <rect x="69.145450955307751" y="19.806009809090028" width="96" height="60" rx="4" ry="4" style="fill: #007884;"></rect>
      <g>
        <line x1="165.145454406738281" y1="49.806015014648438" x2="177.788642883300781" y2="49.806015014648438" style="fill: none; stroke: #000; stroke-miterlimit: 10;"></line>
        <polygon points="176.621452331542969 53.795074462890625 183.529632568359375 49.806015014648438 176.621452331542969 45.816940307617188 176.621452331542969 53.795074462890625"></polygon>
      </g>
      <line x1="56.476488256204902" y1="49.806009809090028" x2="69.145450955307751" y2="49.806009809090028" style="fill: none; stroke: #000; stroke-miterlimit: 10;"></line>
      <rect x="183.598927445163099" y="19.806009809090021" width="95" height="60.000000000000007" rx="3.999999999999999" ry="3.999999999999999" style="fill: #007884;"></rect>
      <g>
        <line x1="278.598926544189453" y1="49.806015014648438" x2="291.242122650146484" y2="49.806015014648438" style="fill: none; stroke: #000; stroke-miterlimit: 10;"></line>
        <polygon points="290.074930191040039 53.795074462890625 296.983104705810547 49.806015014648438 290.074930191040039 45.816940307617188 290.074930191040039 53.795074462890625"></polygon>
      </g>
      <rect x="297.052403935018447" y="19.806009809090021" width="95" height="60.000000000000007" rx="4" ry="4" style="fill: #007884;"></rect>
      <g>
        <line x1="392.052398681640625" y1="49.806015014648438" x2="404.695602416992188" y2="49.806015014648438" style="fill: none; stroke: #000; stroke-miterlimit: 10;"></line>
        <polygon points="403.528411865234375 53.795074462890625 410.43658447265625 49.806015014648438 403.528411865234375 45.816940307617188 403.528411865234375 53.795074462890625"></polygon>
      </g>
      <rect x="410.505880424874704" y="19.806009809090028" width="105" height="60" rx="4" ry="4" style="fill: #007884;"></rect>
      <g>
        <line x1="515.505889892578125" y1="49.806015014648438" x2="651.53326416015625" y2="49.806015014648438" style="fill: none; stroke: #000; stroke-miterlimit: 10;"></line>
        <polygon points="650.366058349609375 53.795074462890625 657.27423095703125 49.806015014648438 650.366058349609375 45.816940307617188 650.366058349609375 53.795074462890625"></polygon>
      </g>
      <text transform="translate(93.578323364257812 53.328094482421875)" style="fill: #fff; font-family: Roboto-Regular, Roboto; font-size: 14px;"><tspan x="0" y="0">rtspsrc </tspan></text>
      <text transform="translate(205.13593864440918 46.497650146484375)" style="fill: #fff; font-family: Roboto-Regular, Roboto; font-size: 14px;"><tspan x="0" y="0">rtph264 </tspan><tspan x="5.52685546875" y="16.7998046875">depay </tspan></text>
      <text transform="translate(311.483711242675781 53.897552490234375)" style="fill: #fff; font-family: Roboto-Regular, Roboto; font-size: 14px;"><tspan x="0" y="0">h264parse</tspan></text>
      <text transform="translate(442.023117065429688 53.897369384765625)" style="fill: #fff; font-family: Roboto-Regular, Roboto; font-size: 14px;"><tspan x="0" y="0">flvmux</tspan></text>
      <rect x="657.274236146260591" y="107.593948910038307" width="105" height="60" rx="4.000000000000012" ry="4.000000000000012" style="fill: #007884;"></rect>
      <polyline points="762.274236146260591 137.593948910038307 780.658414006953535 137.593948910038307 780.658414006953535 49.806009809090028 762.274236146260591 49.806009809090028" style="fill: none; stroke: #000; stroke-miterlimit: 10;"></polyline>
      <text transform="translate(678.40765380859375 141.685333251953125)" style="fill: #fff; font-family: Roboto-Regular, Roboto; font-size: 14px;"><tspan x="0" y="0">rtmp2sink</tspan></text>
      <rect x="657.274236146260591" y="19.806009809090028" width="105" height="60" rx="4.000000000000012" ry="4.000000000000012" style="fill: #007884;"></rect>
      <text transform="translate(678.40765380859375 53.897369384765625)" style="fill: #fff; font-family: Roboto-Regular, Roboto; font-size: 14px;"><tspan x="0" y="0">rtmp2sink</tspan></text>
      <g>
        <path d="M33.780124720647109,45.731009809082025c.001471328735533-.787004137033364.640656757354918-1.423804998397827,1.427661800385067-1.422333669655927.261992549895695.000489234924316.518779277801514.073197698591684.742138576507386.210133647917246l6.961599159240905,4.273100137710571c.670529079437983.412030029296147.880082893370854,1.289617824553716.468052864074707,1.960146903991699-.117117404937744.190593242645264-.277459621429443.350935459136963-.468052864074707.468052864074707l-6.961599159240905,4.275000000001455c-.670951271057675.411341476439702-1.54832344055194.200887107846938-1.959664916992551-.470064163208008-.137610912322998-.224459171295166-.210345649718874-.482653808594478-.210135459899902-.745936489107407v-8.548099231724336Z" style="fill: none; stroke: #000; stroke-linecap: round; stroke-linejoin: round; stroke-width: 2px;"></path>
        <path d="M28.080124720647291,70.906009809088573h19" style="fill: none; stroke: #000; stroke-linecap: round; stroke-linejoin: round; stroke-width: 2px;"></path>
        <rect x="18.580124720647291" y="36.706009809087845" width="38" height="26.599999999998545" rx="2" ry="2" style="fill: none; stroke: #000; stroke-linecap: round; stroke-linejoin: round; stroke-width: 2px;"></rect>
      </g>
      <rect x="801.190190927387448" y="66.312908345025789" width="105.054959808523563" height="54.774142029076756" rx="4" ry="4" style="fill: #007884;"></rect>
      <text transform="translate(815.30291748046875 97.790924072265625)" style="fill: #fff; font-family: Roboto-Regular, Roboto; font-size: 14px;"><tspan x="0" y="0">waylandsink</tspan></text>
      <g>
        <path d="M42.330124720646381,122.393948910037579h-9.499999999998181l-4.750000000000909,5.700000000000728h-5.700000000001637c-2.098681926727295,0-3.799999999998363,1.701318073271977-3.799999999998363,3.799999999999272v17.099999999998545c0,2.098683738706313,1.701318073271068,3.80000000000291,3.799999999998363,3.80000000000291h30.400000000003274c2.098683738707223,0,3.799999999998363-1.701316261296597,3.799999999998363-3.80000000000291v-17.099999999998545c0-2.098681926727295-1.70131626129114-3.799999999999272-3.799999999998363-3.799999999999272h-5.700000000001637l-4.750000000000909-5.700000000000728Z" style="fill: none; stroke: #000; stroke-linecap: round; stroke-linejoin: round; stroke-width: 2px;"></path>
        <circle cx="37.580124720647291" cy="137.593948910038307" r="5.700000000001182" style="fill: none; stroke: #000; stroke-linecap: round; stroke-linejoin: round; stroke-width: 2px;"></circle>
      </g>
      <g>
        <line x1="780.65838623046875" y1="93.699981689453125" x2="796.16680908203125" y2="93.699981689453125" style="fill: none; stroke: #000; stroke-miterlimit: 10;"></line>
        <polygon points="795.1455078125 97.190399169921875 801.190185546875 93.699981689453125 795.1455078125 90.20953369140625 795.1455078125 97.190399169921875"></polygon>
      </g>
      <g>
        <rect x="918.086541946020589" y="78.699979359564168" width="33.333333333332121" height="23.333333333335744" rx="4" ry="4" style="fill: none; stroke: #000; stroke-linecap: round; stroke-linejoin: round; stroke-width: 2px;"></rect>
        <line x1="928.086541946011494" y1="108.699979359564168" x2="941.419875279341795" y2="108.699979359564168" style="fill: none; stroke: #000; stroke-linecap: round; stroke-linejoin: round; stroke-width: 2px;"></line>
        <line x1="934.75320861268483" y1="102.033312692899926" x2="934.75320861268483" y2="108.699979359564168" style="fill: none; stroke: #000; stroke-linecap: round; stroke-linejoin: round; stroke-width: 2px;"></line>
      </g>
    </g>
  </g>
</svg>

**Figure : gst-rtmp-stream-example pipeline**

## Run the application

1. Ensure that you complete the [Prerequisites](https://docs.qualcomm.com/doc/80-80022-55/topic/mm_sample_apps_prerequisites.html).
2. In the terminal of the target device, download and run the RTMP server:

docker pull tiangolo/nginx-rtmp
        docker run -d -p 1935:1935 --name nginx-rtmp tiangolo/nginx-rtmp
        Copy to clipboard
3. In the terminal of the target device, select any of the following use cases and run the respective command:

    - **RTSP camera AVC to RTMP use case:**

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 camera to RTMP use case:**

gst-rtmi-camera-stream-example  -u 1 -d rtmp://192.168.1.171/live/01
            Copy to clipboard
4. In the terminal of the target device, run the following command to connect VLC to the stream:

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

    In this command, replace `rtmp://192.168.1.171/live/01` with the IP address of your device.
5. In the terminal of the target device, run the following commands to stop the RTMP server:

docker stop nginx-rtmp
        docker rm nginx-rtmp
        Copy to clipboard
6. To stop the use case, use **CTRL + C**.
7. In the terminal of the target device, run the following command in the SSH shell to display the available help options:

gst-rtmp-stream-example --help
        Copy to clipboard

## Expected output

The output is displayed on a Waylandsink.

## Pipeline flow

The following table lists the plugins used in the RTMP stream pipeline:

| Plugin | Description |
| --- | --- |
| [qtiqmmfsrc](https://docs.qualcomm.com/doc/80-80022-50/topic/qtiqmmfsrc.html) | Captures the camera feed and sends it into the capsfilter. |
| Capsfilter | Passes the feed to [waylandsink](https://docs.qualcomm.com/doc/80-80022-50/topic/waylandsink.html) for display. |
| Capsfilter | If display option isn’t provided, passes the feed to appsink. |
| [v4l2h264enc](https://docs.qualcomm.com/doc/80-80022-50/topic/v4l2h264enc.html) | Encodes the video for AVC (H.264) format. |
| h264parse | Parses the H.264 video. |
| flvmux | Wraps the video into an FLV container |
| rtmp2sink | Transmits to an RTMP server for live streaming. |
|  |  |

Last Published: May 17, 2026

[Previous Topic
Live snapshot](https://docs.qualcomm.com/bundle/publicresource/80-80022-55/topics/gst-snapshot-stream-example.md) [Next Topic
Dynamic configuration](https://docs.qualcomm.com/bundle/publicresource/80-80022-55/topics/dynamic-configuration.md)

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