[[["易于理解","easyToUnderstand","thumb-up"],["解决了我的问题","solvedMyProblem","thumb-up"],["其他","otherUp","thumb-up"]],[["很难理解","hardToUnderstand","thumb-down"],["信息或示例代码不正确","incorrectInformationOrSampleCode","thumb-down"],["没有我需要的信息/示例","missingTheInformationSamplesINeed","thumb-down"],["翻译问题","translationIssue","thumb-down"],["其他","otherDown","thumb-down"]],["最后更新时间 (UTC):2025-08-11。"],[],[],null,["# Read and save stream data\n\nAfter you have started to ingest streaming data into a deployed application\nyou can view a stream's output.\n\nRead stream outputs\n-------------------\n\nAfter you have successfully created an application that [saves results into a\nstream](/vision-ai/docs/manage-app#view-app-output) you can read a data source input stream or a model\noutput stream. \n\n### Vertex AI Vision SDK\n\nTo send a request to read a model output stream you must\n[install the Vertex AI Vision SDK](/vision-ai/docs/cloud-environment#install_the_streams_sdk).\n\n\n| **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 [Vertex AI Vision SDK\n| reference documentation](/sdk/gcloud/reference/auth/application-default/login).\n\n\u003cbr /\u003e\n\nMake the following variable substitutions:\n\n- \u003cvar translate=\"no\"\u003ePROJECT_ID\u003c/var\u003e: Your Google Cloud project ID.\n- \u003cvar translate=\"no\"\u003eLOCATION_ID\u003c/var\u003e: Your location ID. For example, `us-central1`. [Supported regions](/vision-ai/docs/warehouse-supported-regions). [More information](/about/locations).\n- \u003cvar translate=\"no\"\u003eSTREAM_ID\u003c/var\u003e: The stream ID that you created in the cluster For example, `application-output-1234abcd`.\n\n\u003cbr /\u003e\n\n**Print stream content:** \n\n # This will print packets from a stream to stdout.\n # This will work for *any* stream, independent of the data type.\n vaictl -p \u003cvar translate=\"no\"\u003e\u003cspan class=\"devsite-syntax-nx\"\u003ePROJECT_ID\u003c/span\u003e\u003c/var\u003e \\\n -l \u003cvar translate=\"no\"\u003e\u003cspan class=\"devsite-syntax-nx\"\u003eLOCATION_ID\u003c/span\u003e\u003c/var\u003e \\\n -c application-cluster-0 \\\n --service-endpoint visionai.googleapis.com \\\n receive streams packets \u003cvar translate=\"no\"\u003e\u003cspan class=\"devsite-syntax-nx\"\u003eSTREAM_ID\u003c/span\u003e\u003c/var\u003e\n\nSave video from a stream\n------------------------\n\nUse the following command to save video stream output. This command reads the\ndata from an ongoing live stream, and saves the video segments in an MP4 file\nformat to the user specified output directory: \n\n### Vertex AI Vision SDK\n\nTo send a request to save video output from a stream you must\n[install the Vertex AI Vision SDK](/vision-ai/docs/cloud-environment#install_the_streams_sdk).\n\n\n| **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 [Vertex AI Vision SDK\n| reference documentation](/sdk/gcloud/reference/auth/application-default/login).\n\n\u003cbr /\u003e\n\nMake the following variable substitutions:\n\n- \u003cvar translate=\"no\"\u003ePROJECT_ID\u003c/var\u003e: Your Google Cloud project ID.\n- \u003cvar translate=\"no\"\u003eLOCATION_ID\u003c/var\u003e: Your location ID. For example, `us-central1`. [Supported regions](/vision-ai/docs/warehouse-supported-regions). [More information](/about/locations).\n- \u003cvar translate=\"no\"\u003eSTREAM_ID\u003c/var\u003e: The stream ID that you created in the cluster For example, `application-output-1234abcd`.\n- \u003cvar translate=\"no\"\u003eOUTPUT_PATH\u003c/var\u003e: The output video path. The default value is `/tmp/`.\n\n vaictl -p \u003cvar translate=\"no\"\u003ePROJECT_ID\u003c/var\u003e \\\n -l \u003cvar translate=\"no\"\u003eLOCATION_ID\u003c/var\u003e \\\n -c application-cluster-0 \\\n --service-endpoint visionai.googleapis.com \\\n receive streams video-file \u003cvar translate=\"no\"\u003eSTREAM_ID\u003c/var\u003e --output \u003cvar translate=\"no\"\u003eOUTPUT_PATH\u003c/var\u003e"]]