For the complete documentation index, see llms.txt. This page is also available as Markdown.

विज़न इवेंट वीडियो अपलोड करें

अपने कार्यक्षेत्र में एक वीडियो क्लिप अपलोड करें और उसे एक Vision Event से संलग्न करें, ताकि समीक्षक इसे डैशबोर्ड में चला सकें।

परिचय

एक वीडियो क्लिप दिखाती है कि उस क्षण के आसपास क्या हुआ जब विज़न इवेंट रिकॉर्ड किया गया था—ऐसी बात जो एक स्थिर छवि में छूट सकती है। आप हर इवेंट में अधिकतम चार क्लिप जोड़ सकते हैं। क्लिप डैशबोर्ड के इवेंट विवरण दृश्य में चलती हैं (देखें इवेंट का विवरण देखें).

वीडियो MP4 या MOV फ़ाइलें होनी चाहिए और उनका आकार 3 GB तक हो सकता है। इन्हें आपके Workspace पर अपलोड किया जाता है, किसी Project पर नहीं। ब्राउज़र में चलने वाली MP4 फ़ाइलें जैसी हैं वैसी ही संग्रहीत की जाती हैं। अन्य वीडियो को H.264 MP4 में बदला जाता है; बहुत लंबा वीडियो कन्वर्ज़न में विफल हो सकता है।

एज डिवाइस बैकअप डिवाइस पर रिकॉर्ड की गई क्लिप आपके लिए अपलोड करता है। REST API के ज़रिए इवेंट भेजते समय इस पेज के चरणों का उपयोग करें।

HTTP API

वीडियो जोड़ने के तीन चरण हैं:

  1. अपलोड तैयार करें। आपको एक videoIdएक signedUrlऔर requiredHeaders.

  2. वीडियो फ़ाइल भेजने के लिए PUT अनुरोध का उपयोग करें, signedUrlपर, और requiredHeadersमें दिए गए सभी हेडर के साथ। URL 60 मिनट बाद समाप्त हो जाता है।

  3. इवेंट बनाएँ में videoId को videos[].sourceId.

इवेंट बनाने से पहले Roboflow द्वारा वीडियो संसाधित किए जाने की प्रतीक्षा करने की ज़रूरत नहीं है। प्रोसेसिंग पूरी होते ही क्लिप डैशबोर्ड में चलने लगती है। प्रोसेसिंग विफल होने पर इवेंट बना रहता है और डैशबोर्ड वीडियो को विफल दिखाता है। अगर फ़ाइल कभी भेजी ही नहीं जाती, तो वीडियो pending रहता है और डैशबोर्ड उसे प्रोसेसिंग में दिखाता रहता है।

आवश्यक स्कोप: vision-events:write या device:update अपलोड तैयार करने के लिए, और vision-events:read या device:read स्थिति पढ़ने या प्लेबैक URL पाने के लिए।

अपलोड तैयार करें

Prepare a Vision Event Video Upload

post

Create a pending video in the workspace and return a signed URL to PUT the file to. Videos can be up to 3 GB. Reference the returned videoId in an event's videos array. Requires the vision-events:write or device:update scope.

Authorizations
AuthorizationstringRequired

Roboflow API key passed as a Bearer token.

Body
namestring · min: 1 · max: 1024Required

File name of the video.

Example: line-3-clip.mp4
contentTypestring · enumRequired

MIME type of the video file.

Example: video/mp4Possible values:
Responses
201

Upload prepared.

application/json
successbooleanOptionalExample: true
videoIdstringOptional

Put this in videos[].sourceId when you create the event.

Example: Kq4vX8mNp2RtY6wZ1bCd
signedUrlstringOptional

URL to PUT the video file to. It expires after 60 minutes.

Example: https://storage.googleapis.com/...
post/vision-events/videos/prepare-upload
POST /vision-events/videos/prepare-upload HTTP/1.1
Host: api.roboflow.com
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 52

{
  "name": "line-3-clip.mp4",
  "contentType": "video/mp4"
}
{
  "success": true,
  "videoId": "Kq4vX8mNp2RtY6wZ1bCd",
  "signedUrl": "https://storage.googleapis.com/...",
  "requiredHeaders": {
    "x-goog-content-length-range": "1,3221225472",
    "x-goog-if-generation-match": "0"
  }
}

इसके बाद फ़ाइल यहाँ भेजें: signedUrl। requiredHeaders से हर हेडर कॉपी करके अनुरोध में जोड़ें:

इसके बाद PUTके बाद कुछ और करने की ज़रूरत नहीं है। फ़ाइल पहुँचते ही Roboflow वीडियो प्रोसेस करना शुरू कर देता है।

वीडियो को किसी इवेंट से जोड़ें

इवेंट के videoId को videos ऐरे में तब रखें, जब आप Vision Event बनाते हैं या इवेंट का बैच में निर्माण करते हैं.

केवल इस एंडपॉइंट से तैयार किए गए वीडियो ही जोड़े जा सकते हैं। किसी videoId को, जो डेटासेट वीडियो अपलोड से या किसी दूसरे वर्कस्पेस से आया हो, इवेंट में रखा जाता है, लेकिन चेतावनी मिलती है और वह चलता नहीं है।

अपलोड की स्थिति जाँचें

status यह pending होती है—अपलोड तैयार करने के समय से लेकर Roboflow द्वारा फ़ाइल की प्रोसेसिंग पूरी किए जाने तक—और फिर uploaded या failedहो जाती है। जिस वीडियो की फ़ाइल कभी पहुँचती ही नहीं, उसकी स्थिति बनी रहती है pending.

Get Vision Event Video Status

get

Read the processing status and details of a video prepared for Vision Events. Requires the vision-events:read or device:read scope.

Authorizations
AuthorizationstringRequired

Roboflow API key passed as a Bearer token.

Path parameters
videoIdstring · max: 256Required

The videoId returned by Prepare a Vision Event Video Upload.

Responses
200

Video status.

application/json
videoIdstringOptionalExample: Kq4vX8mNp2RtY6wZ1bCd
statusstring · enumOptional

pending from the moment the upload is prepared until Roboflow finishes processing the file, then uploaded or failed. A video whose file is never sent stays pending.

Possible values:
posterUrlstringOptional

Public URL of a still frame from the video. It returns 404 until status is uploaded.

durationSecondsnumber · nullableOptionalExample: 12.4
contentTypestring · nullableOptionalExample: video/mp4
sizeBytesinteger · nullableOptionalExample: 18350080
filenamestring · nullableOptionalExample: line-3-clip.mp4
get/vision-events/videos/{videoId}
GET /vision-events/videos/{videoId} HTTP/1.1
Host: api.roboflow.com
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
{
  "videoId": "Kq4vX8mNp2RtY6wZ1bCd",
  "status": "pending",
  "posterUrl": "text",
  "durationSeconds": 12.4,
  "contentType": "video/mp4",
  "sizeBytes": 18350080,
  "filename": "line-3-clip.mp4"
}

प्लेबैक URL प्राप्त करें

क्वेरी के नतीजों में हर वीडियो का केवल sourceId और label दिखता है। किसी वीडियो को चलाने या डाउनलोड करने वाला URL पाने के लिए इस एंडपॉइंट को कॉल करें। URL 60 मिनट तक काम करता है और null तब तक रहता है, जब तक status uploaded नहीं हो जाता। URL रखने वाला कोई भी व्यक्ति क्लिप चला सकता है, इसलिए इसे कैश या साझा न करें।

Get a Vision Event Video Playback URL

get

Return the video's status and details plus a signed URL that plays it. The response is sent with Cache-Control private, no-store. Requires the vision-events:read or device:read scope.

Authorizations
AuthorizationstringRequired

Roboflow API key passed as a Bearer token.

Path parameters
videoIdstring · max: 256Required

The videoId returned by Prepare a Vision Event Video Upload.

Responses
200

Video status and playback URL.

application/json
videoIdstringOptionalExample: Kq4vX8mNp2RtY6wZ1bCd
statusstring · enumOptional

pending from the moment the upload is prepared until Roboflow finishes processing the file, then uploaded or failed. A video whose file is never sent stays pending.

Possible values:
posterUrlstringOptional

Public URL of a still frame from the video. It returns 404 until status is uploaded.

durationSecondsnumber · nullableOptionalExample: 12.4
contentTypestring · nullableOptionalExample: video/mp4
sizeBytesinteger · nullableOptionalExample: 18350080
filenamestring · nullableOptionalExample: line-3-clip.mp4
urlstring · nullableOptional

Signed URL that plays the video. It expires after 60 minutes. null until status is uploaded.

get/vision-events/videos/{videoId}/url
GET /vision-events/videos/{videoId}/url HTTP/1.1
Host: api.roboflow.com
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
{
  "videoId": "Kq4vX8mNp2RtY6wZ1bCd",
  "status": "pending",
  "posterUrl": "text",
  "durationSeconds": 12.4,
  "contentType": "video/mp4",
  "sizeBytes": 18350080,
  "filename": "line-3-clip.mp4",
  "url": "text"
}

अंतिम अपडेट

क्या यह उपयोगी था?