Tetap teratur dengan koleksi
Simpan dan kategorikan konten berdasarkan preferensi Anda.
Langkah pertama dalam menganalisis data video dengan aplikasi adalah membuat pipeline untuk aliran data yang berkelanjutan.
Streaming menawarkan kemampuan untuk menyerap data video real-time, yang kemudian
dapat digunakan sebagai input untuk model atau disimpan di Warehouse.
Membuat Feed
Agar dapat melakukan streaming data video, Anda harus membuat streaming terlebih dahulu.
Saat pertama kali membuat streaming di project baru, mungkin perlu waktu beberapa saat untuk membuat streaming.
Waktu ini sekitar 30 menit. Waktu ini disebabkan karena sistem perlu melakukan inisialisasi
cluster komputasi untuk komputasi berikutnya.
Jika video tidak memenuhi spesifikasi ini, Vertex AI Vision mungkin tidak
memproses input dengan baik.
Audio dihapus selama proses transfer.
Jika streaming adalah bagian dari aplikasi yang terhubung ke warehouse, parameter video
(seperti FPS atau resolusi) harus sama untuk seluruh streaming;
variasi dalam parameter data video RTSP atau parameter data video lokal
tidak didukung.
Karena latensi startup model, video yang ditransfer mungkin tidak memiliki konten beberapa detik pertama. Durasi ini dapat mencapai hingga lima belas detik.
Penghentian penyerapan dapat terjadi setelah koneksi yang lama
(~5 jam, rata-rata). Tidak ada kemampuan koneksi ulang dari alat vaictl; pengguna harus terhubung kembali secara manual.
Meskipun vaictl adalah alat yang berguna untuk menyerap data video, alat ini tidak
otomatis menangani pemulihan dari error jaringan. Error ini dapat berasal dari sisi sumber data atau sisi penyerapan Cloud. Pengguna bertanggung jawab untuk membuat
skrip mulai ulang guna menangani penghentian operasi vaictl yang tidak terduga.
Vertex AI Vision SDK
Untuk mengirim permintaan guna menyerap data video menggunakan streaming yang ada, Anda harus
menginstal Vertex AI Vision SDK.
LOCAL_FILE.EXT: Nama file video lokal. Contoh, my-video.mp4.
STREAM_ID: ID aliran data yang Anda buat di cluster
Misalnya, input-1.
RTSP_ADDRESS: Alamat feed Real Time Streaming Protocol
(RTSP) Anda. Misalnya, rtsp://my-ip-camera.
Data video lokal:
# This command streams a video file to a stream. Streaming ends when the video ends.
vaictl -p PROJECT_ID \
-l LOCATION_ID \
-c application-cluster-0 \
--service-endpoint visionai.googleapis.com \
send video-file to streams STREAM_ID --file-path LOCAL_FILE.EXT
Data video lokal (di-loop):
# This command streams a video file to a stream. Video is looped into the stream until you stop the command.
vaictl -p PROJECT_ID \
-l LOCATION_ID \
-c application-cluster-0 \
--service-endpoint visionai.googleapis.com \
send video-file to streams STREAM_ID --file-path LOCAL_FILE.EXT--loop
Data feed Real Time Streaming Protocol (RTSP):
# This command will send an RTSP feed into the stream.# This command has to run in the network that has direct access to the RTSP feed.
vaictl-pPROJECT_ID\-lLOCATION_ID\-capplication-cluster-0\--service-endpointvisionai.googleapis.com\
sendrtsptostreamsSTREAM_ID--rtsp-uriRTSP_ADDRESS
Memutar video yang ditransfer
Setelah membuat streaming dan mengirim konten video ke streaming, Anda dapat
memutar konten video.
Jika tab tampilan streaming dibiarkan terbuka selama lebih dari satu jam, Anda harus
memuat ulang halaman untuk terus memuat konten video.
Konsol
Putar video yang ditransfer di Google Cloud konsol.
[[["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-08-11 UTC."],[],[],null,["# Create streams and ingest data\n\nThe first step in analyzing your video data with an application is\ncreating a pipeline for the continuous flow of data.\nStreams offers the ability to ingest real-time video data, which then\ncan be used as input for models or stored in a Warehouse.\n\nCreate a Stream\n---------------\n\nTo be able to stream video data you must first create a stream.\n\n\nThe first time you create a stream in a new project it can take some time to create the stream.\nThis time is around 30 minutes. This time is due to the system needing to initialize a\ncomputation cluster for subsequent computations.\n\n\u003cbr /\u003e\n\n### Console\n\nCreate a stream in the Google Cloud console.\n\n1. Open the **Streams** tab of the Vertex AI Vision dashboard.\n\n [Go to the Streams tab](https://console.cloud.google.com/ai/vision-ai/video-streams)\n2. Click add**Register**.\n\n3. Enter the stream name and select a region. You can click **Add Row** to\n register multiple streams at the same time.\n\n4. Click the **Register** button to create one or more streams.\n\nIngest videos\n-------------\n\nAfter you have created a stream you can begin to ingest data using that stream.\n\n\nSome limitations and considerations apply to ingested video:\n\n- The input video source must have the following specifications:\n - [H.264 encoding](https://en.wikipedia.org/wiki/Advanced_Video_Coding)\n - \\\u003c= 1080p resolution\n - \\~25\n\n If the video doesn't meet these specifications Vertex AI Vision may not\n process the input well.\n- Audio is dropped during ingestion.\n- If the stream is part of an app connected to a warehouse, video parameters (such as FPS or resolution) must be the same for the whole stream ; variations in RTSP video data parameters or local video data parameters are not supported.\n- Due to model startup latency, ingested videos may have the first few seconds of content missing. This amount of time can reach up to fifteen seconds.\n- Ingestion termination can happen after long connection (\\~5 hours, on average). There's no reconnection capability from the `vaictl` tool ; users must manually reconnect.\n- While `vaictl` is a useful tool for ingesting video data, the tool does not automatically handle recovery from network errors. These errors may either come from the data-source side or the Cloud-ingestion side. It's the user's responsibility to create a restart script to handle unexpected `vaictl` operation terminations.\n\n\u003cbr /\u003e\n\n### Vertex AI Vision SDK\n\nTo send a request to ingest video data using an existing 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`. [More information](/about/locations). [Supported regions](/vision-ai/docs/warehouse-supported-regions).\n- \u003cvar translate=\"no\"\u003eLOCAL_FILE.EXT\u003c/var\u003e: The filename of a local video file. For example, `my-video.mp4`.\n- \u003cvar translate=\"no\"\u003eSTREAM_ID\u003c/var\u003e: The stream ID that you created in the cluster For example, `input-1`.\n- \u003cvar translate=\"no\"\u003eRTSP_ADDRESS\u003c/var\u003e: The address of your Real Time Streaming Protocol ([RTSP](https://en.wikipedia.org/wiki/Real_Time_Streaming_Protocol)) feed. For example, `rtsp://my-ip-camera`.\n\n**Local video data:** \n\n # This command streams a video file to a stream. Streaming ends when the video ends.\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 send video-file to streams \u003cvar translate=\"no\"\u003eSTREAM_ID\u003c/var\u003e --file-path \u003cvar translate=\"no\"\u003eLOCAL_FILE.EXT\u003c/var\u003e\n\n**Local video data (looped):** \n\n # This command streams a video file to a stream. Video is looped into the stream until you stop the command.\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 send video-file to streams \u003cvar translate=\"no\"\u003eSTREAM_ID\u003c/var\u003e --file-path \u003cvar translate=\"no\"\u003eLOCAL_FILE.EXT\u003c/var\u003e --loop\n\n**Real Time Streaming Protocol (RTSP) feed data:** \n\n # This command will send an RTSP feed into the stream.\n # This command has to run in the network that has direct access to the RTSP feed.\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 send rtsp to streams \u003cvar translate=\"no\"\u003eSTREAM_ID\u003c/var\u003e --rtsp-uri \u003cvar translate=\"no\"\u003eRTSP_ADDRESS\u003c/var\u003e\n\nPlay ingested videos\n--------------------\n\nAfter you have created a stream and sent video content to the stream you can\nplay the video content.\n\nIf you leave the stream view tab open for more than one hour, you must\nrefresh the page to continue to load video contents. \n\n### Console\n\nPlay ingested video in the Google Cloud console.\n\n1. Open the **Streams** tab of the Vertex AI Vision dashboard.\n\n [Go to the Streams tab](https://console.cloud.google.com/ai/vision-ai/video-streams)\n2. Click on the stream name from the streams list.\n\n3. In the video stream detail page the ingested video live view\n automatically loads."]]