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 you can read a data source input stream or a model output stream.
Vertex AI Vision SDK
To send a request to read a model output stream you must install the Vertex AI Vision SDK.
Make the following variable substitutions:
- PROJECT_ID: Your Google Cloud project ID.
- LOCATION_ID: Your location ID. For example,
us-central1
. Supported regions. More information. - STREAM_ID: The stream ID that you created in the cluster
For example,
application-output-1234abcd
.
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:
Vertex AI Vision SDK
To send a request to save video output from a stream you must install the Vertex AI Vision SDK.
Make the following variable substitutions:
- PROJECT_ID: Your Google Cloud project ID.
- LOCATION_ID: Your location ID. For example,
us-central1
. Supported regions. More information. - STREAM_ID: The stream ID that you created in the cluster
For example,
application-output-1234abcd
. - OUTPUT_PATH: 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