Gunakan perintah berikut untuk menyimpan output streaming video. Perintah ini membaca
data dari live stream yang sedang berlangsung, dan menyimpan segmen video dalam format file
MP4 ke direktori output yang ditentukan pengguna:
[[["Mudah dipahami","easyToUnderstand","thumb-up"],["Memecahkan masalah saya","solvedMyProblem","thumb-up"],["Lainnya","otherUp","thumb-up"]],[["Sulit dipahami","hardToUnderstand","thumb-down"],["Informasi atau kode contoh salah","incorrectInformationOrSampleCode","thumb-down"],["Informasi/contoh yang saya butuhkan tidak ada","missingTheInformationSamplesINeed","thumb-down"],["Masalah terjemahan","translationIssue","thumb-down"],["Lainnya","otherDown","thumb-down"]],["Terakhir diperbarui pada 2025-09-04 UTC."],[],[],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"]]