After you have started to ingest streaming data into a deployed application
you can view a stream's output.

## Read stream outputs

After you have successfully created an application that [saves results into a
stream](https://docs.cloud.google.com/vision-ai/docs/manage-app#view-app-output) you can read a data source input stream or a model
output stream.

### Gemini Enterprise Agent Platform Vision SDK

To send a request to read a model output stream you must
[install the Gemini Enterprise Agent Platform Vision SDK](https://docs.cloud.google.com/vision-ai/docs/cloud-environment.md.txt#install_the_streams_sdk).


> [!NOTE]
> **Note** : You may need to establish user access credentials by running the following command: `gcloud auth application-default login`. For more information about this command, see the [Gemini Enterprise Agent Platform Vision SDK
> reference documentation](https://docs.cloud.google.com/sdk/gcloud/reference/auth/application-default/login).

<br />

Make the following variable substitutions:

- <var translate="no">PROJECT_ID</var>: Your Google Cloud project ID.
- <var translate="no">LOCATION_ID</var>: Your location ID. For example, `us-central1`. [Supported regions](https://docs.cloud.google.com/vision-ai/docs/warehouse-supported-regions.md.txt). [More information](https://docs.cloud.google.com/about/locations).
- <var translate="no">STREAM_ID</var>: The stream ID that you created in the cluster For example, `application-output-1234abcd`.

<br />

**Print stream content:**

    # This will print packets from a stream to stdout.
    # This will work for *any* stream, independent of the data type.
    vaictl -p PROJECT_ID \
             -l LOCATION_ID \
             -c application-cluster-0 \
             --service-endpoint visionai.googleapis.com \
    receive streams packets STREAM_ID

## Save video from a stream

Use the following command to save video stream output. This command reads the
data from an ongoing live stream, and saves the video segments in an MP4 file
format to the user specified output directory:

### Gemini Enterprise Agent Platform Vision SDK

To send a request to save video output from a stream you must
[install the Gemini Enterprise Agent Platform Vision SDK](https://docs.cloud.google.com/vision-ai/docs/cloud-environment.md.txt#install_the_streams_sdk).


> [!NOTE]
> **Note** : You may need to establish user access credentials by running the following command: `gcloud auth application-default login`. For more information about this command, see the [Gemini Enterprise Agent Platform Vision SDK
> reference documentation](https://docs.cloud.google.com/sdk/gcloud/reference/auth/application-default/login).

<br />

Make the following variable substitutions:

- <var translate="no">PROJECT_ID</var>: Your Google Cloud project ID.
- <var translate="no">LOCATION_ID</var>: Your location ID. For example, `us-central1`. [Supported regions](https://docs.cloud.google.com/vision-ai/docs/warehouse-supported-regions.md.txt). [More information](https://docs.cloud.google.com/about/locations).
- <var translate="no">STREAM_ID</var>: The stream ID that you created in the cluster For example, `application-output-1234abcd`.
- <var translate="no">OUTPUT_PATH</var>: The output video path. The default value is `/tmp/`.

    vaictl -p PROJECT_ID \
             -l LOCATION_ID \
             -c application-cluster-0 \
             --service-endpoint visionai.googleapis.com \
    receive streams video-file STREAM_ID --output OUTPUT_PATH