# Live snapshot

The **gst-snapshot-stream-example** application allows you to generate two streams: a preview stream for live display and a snapshot stream that captures images and saves them as JPEG files.

Note

This sample application isn’t supported on Dragonwing IQ-8275 and Dragonwing IQ-9075.

For the snapshot stream, you can determine the number of snapshots.

The following figure shows the pipeline, which allows for simultaneous live preview and snapshot capture from the same video source.

For more information, see [Pipeline flow](https://docs.qualcomm.com/doc/80-80022-55/topic/gst-snapshot-stream-example.html#section-lny-sly-nbc).

<!--?xml version="1.0" encoding="UTF-8"?-->
<svg id="Layer_2" data-name="Layer 2" xmlns="http://www.w3.org/2000/svg" width="610" height="199.999999999999091" viewbox="0 0 610 199.999999999999091" aria-label="../../_images/gst_snapshot_stream_example_pipeline.svg">
  <g>
    <rect x=".50018310546875" y=".500122070311591" width="609" height="198.99951171875" rx="7.499999999999946" ry="7.499999999999946" style="fill: #fafafa;"></rect>
    <path d="M602,1c3.85986328125,0,7,3.140167236327216,7,7v183.999999999999091c0,3.859832763671875-3.14013671875,7-7,7H8c-3.859832763671875,0-7-3.140167236328125-7-7V8c0-3.859832763672784,3.140167236328125-7,7-7h594M602,0H8C3.581695556640625,0,0,3.581695556639716,0,8v183.999999999999091c0,4.418304443359375,3.581695556640625,8,8,8h594c4.4183349609375,0,8-3.581695556640625,8-8V8c0-4.418304443360284-3.5816650390625-8-8-8h0Z" style="fill: #d2d7e1;"></path>
  </g>
  <g>
    <rect x="282.815243323740106" y="90.269956005172389" width="139.999999999999091" height="56.666666666667879" rx="4" ry="4" style="fill: #007884;"></rect>
    <text transform="translate(319.444147109985352 124.069575786589667)" style="fill: #fff; font-family: Roboto-Regular, Roboto; font-size: 16px;"><tspan x="0" y="0">capsfilter</tspan></text>
    <rect x="282.815243323740106" y="21.807317705660353" width="139.999999999999091" height="56.666666666667879" rx="4" ry="4" style="fill: #007884;"></rect>
    <text transform="translate(319.444147109985352 55.606933593749091)" style="fill: #fff; font-family: Roboto-Regular, Roboto; font-size: 16px;"><tspan x="0" y="0">capsfilter</tspan></text>
    <g>
      <line x1="422.81524658203125" y1="50.140655517577216" x2="440.93194580078125" y2="50.140655517577216" style="fill: none; stroke: #000; stroke-miterlimit: 10;"></line>
      <polygon points="439.91064453125 53.631072998045966 445.95526123046875 50.140655517577216 439.91064453125 46.650207519530341 439.91064453125 53.631072998045966"></polygon>
    </g>
    <rect x="447.49993486727908" y="90.269956005172389" width="140" height="56.666666666667879" rx="4" ry="4" style="fill: #007884;"></rect>
    <g>
      <line x1="422.81524658203125" y1="118.603302001952216" x2="441.125244140625" y2="118.603302001952216" style="fill: none; stroke: #000; stroke-miterlimit: 10;"></line>
      <polygon points="440.10394287109375 122.093719482420966 446.1485595703125 118.603302001952216 440.10394287109375 115.112854003905341 440.10394287109375 122.093719482420966"></polygon>
    </g>
    <text transform="translate(474.148361206054688 124.069575786589667)" style="fill: #fff; font-family: Roboto-Regular, Roboto; font-size: 16px;"><tspan x="0" y="0">multifilesink</tspan></text>
    <rect x="447.49993486727908" y="21.807317705660353" width="140" height="56.666666666667879" rx="4" ry="4" style="fill: #007884;"></rect>
    <text transform="translate(473.597579956054688 55.606933593749091)" style="fill: #fff; font-family: Roboto-Regular, Roboto; font-size: 16px;"><tspan x="0" y="0">waylandsink</tspan></text>
    <rect x="94.664351120978608" y="56.0386201887477" width="140" height="56.666700000001583" rx="4" ry="4" style="fill: #2a2aea;"></rect>
    <text transform="translate(123.195587158203125 89.047500610350653)" style="fill: #fff; font-family: Roboto-Regular, Roboto; font-size: 16px;"><tspan x="0" y="0">qtiqmmfsrc</tspan></text>
    <g>
      <polyline points="275.5899658203125 119.128570556639716 257.9976806640625 119.128570556639716 257.9976806640625 49.615356445311591 275.5899658203125 49.615356445311591" style="fill: none; stroke: #000; stroke-miterlimit: 10;"></polyline>
      <polygon points="274.42279052734375 115.139526367186591 281.3309326171875 119.128570556639716 274.42279052734375 123.117645263670966 274.42279052734375 115.139526367186591"></polygon>
      <polygon points="274.42279052734375 53.604431152342841 281.3309326171875 49.615356445311591 274.42279052734375 45.626281738280341 274.42279052734375 53.604431152342841"></polygon>
    </g>
    <line x1="257.997651120978844" y1="84.371970188750311" x2="234.664351120978608" y2="84.371970188750311" style="fill: none; stroke: #000; stroke-miterlimit: 10;"></line>
    <line x1="94.664351120978608" y1="84.371970188748492" x2="71.331051120978373" y2="84.371970188748492" style="fill: none; stroke: #000; stroke-miterlimit: 10;"></line>
    <g>
      <path d="M53.019427835643,64.839572017720457h-12.207748856891158l-6.103874428446034,7.324649314137787h-7.324649314135968c-2.696861251786686,0-4.88309954275519,2.186238290963956-4.88309954275519,4.883099542752461v21.973947942406085c0,2.696863580229547,2.186238290968504,4.883099542759737,4.88309954275519,4.883099542759737h39.064796342054251c2.696863580230456,0,4.88309954275428-2.186235962530191,4.88309954275428-4.883099542759737v-21.973947942406085c0-2.696861251788505-2.186235962523824-4.883099542752461-4.88309954275428-4.883099542752461h-7.324649314135968l-6.103874428445124-7.324649314137787Z" style="fill: none; stroke: #000; stroke-linecap: round; stroke-linejoin: round; stroke-width: 2px;"></path>
      <circle cx="46.915553407197422" cy="84.371970188748037" r="7.324649314135968" style="fill: none; stroke: #000; stroke-linecap: round; stroke-linejoin: round; stroke-width: 2px;"></circle>
    </g>
    <g>
      <g>
        <text transform="translate(410.4283447265625 178.284194946288153)" style="font-family: Roboto-Regular, Roboto; font-size: 14px;"><tspan x="0" y="0">Qualcomm </tspan></text>
        <rect x="390.177359621126016" y="166.192697725065045" width="16" height="16" rx="2" ry="2" style="fill: #2a2aea;"></rect>
      </g>
      <g>
        <text transform="translate(509.0101318359375 178.284194946288153)" style="font-family: Roboto-Regular, Roboto; font-size: 14px;"><tspan x="0" y="0">Open source</tspan></text>
        <rect x="488.759141033979176" y="166.192697725065045" width="16" height="16" rx="2" ry="2" style="fill: #007884;"></rect>
      </g>
    </g>
  </g>
</svg>

**Figure : gst-snapshot-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, use the following command to run the use case. Specify the application with parameters, such as camera width, height, and the maximum snapshot count for dumping JPEG files.

gst-snapshot-stream-example -W 1280 -H 720 -w 3840 -h 2160 -c 5
        Copy to clipboard
3. To stop the use case, use **CTRL + C**.
4. In the terminal of the target device, run the following command in the SSH shell to display the available help options:

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

## Expected output

The application generates an output for preview on the display and dumps the JPEG files in the respective location on the device.

After the use case stops, the snapshot output files are available at the `/etc/media/` path.

## Pipeline flow

The following table lists the plugins used in the live snapshot pipeline:

| **Plugin** | **Description** |
| --- | --- |
| [qtiqmmfsrc](https://docs.qualcomm.com/doc/80-80022-50/topic/qtiqmmfsrc.html) | Captures the video stream and feeds it into the capsfilter. |
| Capsfilter | Branches the source into two separate pipelines. In one pipeline, the constraints on the raw video data are enforced, and then the video data is sent to [waylandsink](https://docs.qualcomm.com/doc/80-80022-50/topic/waylandsink.html) for live preview. |
| Capsfilter | <ol class="arabic simple"><br><li><p>In the other pipeline, the frames are written to multiple files using multi filesink.</p></li><br><li><p>The snapshots or frames from the video stream are saved to a disk.</p></li><br></ol> |
|  |  |

Last Published: May 17, 2026

[Previous Topic
Multistream](https://docs.qualcomm.com/bundle/publicresource/80-80022-55/topics/gst-multi-stream-example.md) [Next Topic
RTMP camera streaming](https://docs.qualcomm.com/bundle/publicresource/80-80022-55/topics/gst-rtmp-stream-example.md)

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