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

RTSP सिम्युलेटर

कैमरे के बिना inference pipelines का परीक्षण करने के लिए अपलोड की गई video file को looping RTSP source के रूप में स्ट्रीम करें।

RTSP सिम्युलेटर एक एज कंटेनर सेवा है जो अपलोड की गई वीडियो फ़ाइल को लाइव RTSP स्ट्रीम में बदल देती है। इसका उपयोग भौतिक कैमरा इंस्टॉल होने से पहले डिवाइस पर इन्फ़रेंस पाइपलाइनों को बनाने और परीक्षण करने के लिए, या किसी ज्ञात क्लिप को Workflow के विरुद्ध दोबारा चलाने के लिए करें।

आप एक अपलोड करते हैं .mp4 फ़ाइल वेब इंटरफ़ेस या REST API के माध्यम से, या Deployment Manager से एक वीडियो चुनें। सेवा इसे RTSP-संगत प्रारूप में ट्रांसकोड करती है और जब तक आप इसे रोक नहीं देते, परिणाम को निरंतर लूप पर प्रकाशित करती रहती है।

RTSP सिम्युलेटर केवल Enterprise ग्राहकों के लिए उपलब्ध है। Roboflow बिक्री टीम से संपर्क करें अधिक जानने के लिए।

कनेक्शन विवरण

बदलें <device-ip> को Deployment Manager में डिवाइस पेज पर दिखाई गई IP पता से बदलें।

उद्देश्य
पता

RTSP स्ट्रीम

rtsp://<device-ip>:8554/stream

वेब UI, REST API, और Swagger दस्तावेज़

http://<device-ip>:8080

पोर्ट
प्रोटोकॉल
उद्देश्य

8080

HTTP

वेब UI, REST API, Swagger दस्तावेज़ यहाँ /docs

8554

RTSP (TCP)

वीडियो स्ट्रीम आउटपुट। UDP ट्रांसपोर्ट अक्षम है; जो क्लाइंट UDP को प्राथमिकता देते हैं वे TCP-interleaved पर डाउनग्रेड हो जाते हैं।

एक ही समय में कई क्लाइंट स्ट्रीम पढ़ सकते हैं।

वीडियो प्रारूप

वेब UI, CLI, और API केवल .mp4 फ़ाइलें स्वीकार करते हैं। अपलोड स्वतः ट्रांसकोड किए जाते हैं ताकि स्ट्रीम किसी भी RTSP क्लाइंट के साथ काम करे:

  • कोडेक: H.264, बेसलाइन प्रोफ़ाइल

  • पिक्सेल प्रारूप: yuv420p

  • ऑडियो: हटाया गया, केवल वीडियो

  • अधिकतम फ़ाइल आकार: डिफ़ॉल्ट रूप से 5 GB

Roboflow वीडियो का उपयोग

जब आप डिवाइस तक उसके स्थानीय नेटवर्क पर नहीं पहुँच सकते, तब Deployment Manager से वीडियो सेट करें। डिवाइस वीडियो डाउनलोड करता है और उसे स्ट्रीम करता है।

1

सेटिंग्स खोलें

डिवाइस के Configuration टैब पर, RTSP Simulator कार्ड पर "Configure" (गियर आइकन) चुनें।

2

अपलोड करें

"Video source" के अंतर्गत, "Roboflow video" चुनें, फिर "Upload Video" चुनें और एक .mp4 या .mov फ़ाइल चुनें। वीडियो आपके Workspace की Asset Library में सेव हो जाता है।

3

सहेजें

वैकल्पिक रूप से रूपांतरण और स्ट्रीमिंग सेटिंग्स बदलें। यदि साइट Secure Gateway के माध्यम से Roboflow तक पहुँचती है, तो उसका पता "Secure Gateway (optional)" में दर्ज करें। "Save Configuration" चुनें। परिवर्तन डिवाइस के पुनः आरंभ होने के बाद प्रभावी होता है।

कार्ड वीडियो का नाम, RTSP URL, और डाउनलोड तथा स्ट्रीम की स्थिति दिखाता है। जब कोई Roboflow वीडियो सेट होता है, तब स्थानीय वेब UI और CLI नियंत्रण लॉक रहते हैं। स्थानीय अपलोड पर वापस जाने के लिए, "Local upload" चुनें और सहेजें।

वेब इंटरफ़ेस का उपयोग

खोलें http://<device-ip>:8080 एक ब्राउज़र में।

1

अपलोड करें

एक .mp4 फ़ाइल को पेज पर खींचें। फ़ाइल अपलोड होती है और स्ट्रीमिंग प्रारूप में परिवर्तित हो जाती है।

2

चलाएँ

स्ट्रीमिंग शुरू करने के लिए "Play" चुनें। वीडियो अनिश्चितकाल तक लूप होता है और RTSP सर्वर पर प्रकाशित होता है।

3

कनेक्ट करें

अपने इन्फ़रेंस पाइपलाइन, Deployment Manager स्ट्रीम, या किसी भी RTSP क्लाइंट को यहाँ इंगित करें rtsp://<device-ip>:8554/stream.

4

रोकें

स्ट्रीम समाप्त करने और परिवर्तित फ़ाइलें हटाने के लिए "Stop" चुनें।

सिम्युलेटेड स्ट्रीम को किसी deployment में उपयोग करने के लिए, इसे उसी तरह डिवाइस पर एक stream source के रूप में जोड़ें जैसे आप कैमरा जोड़ते हैं। देखें स्ट्रीम जोड़ें.

CLI का उपयोग

हेडलेस या केवल SSH-आधारित पहुँच के लिए, rtsp-cli टूल डिवाइस पर एक इंटरैक्टिव टर्मिनल इंटरफ़ेस प्रदान करता है।

वेब UI के बिना वीडियो आयात करने के लिए, पहले इसे इनपुट डायरेक्टरी में कॉपी करें, फिर CLI लॉन्च करें और I.

कुंजी
कमांड
विवरण

I

आयात करें

से एक वीडियो चुनें और परिवर्तित करें /data/input/

P

चलाएँ

RTSP स्ट्रीमिंग शुरू करें

S

रोकें

स्ट्रीमिंग रोकें और परिवर्तित फ़ाइलें हटाएँ

D

हटाएँ

वीडियो फ़ाइलें हटाएँ

C

कॉन्फ़िग

स्ट्रीम सेटिंग्स समायोजित करें (बिटरेट, बफ़र, देरी)

R

रीफ़्रेश

स्थिति प्रदर्शन को रीफ़्रेश करें

Q

बाहर निकलें

CLI से बाहर निकलें

स्ट्रीम का परीक्षण

स्ट्रीम लाइव है यह पुष्टि करने के लिए किसी भी RTSP प्लेयर से कनेक्ट करें।

स्ट्रीम केवल TCP पर सर्व की जाती है, इसलिए ffplay को पहले UDP आज़माने देने के बजाय TCP ट्रांसपोर्ट को मजबूर करें।

HTTP API

सभी endpoint JSON लौटाते हैं। इंटरैक्टिव Swagger दस्तावेज़ यहाँ सर्व किया जाता है http://<device-ip>:8080/docs. देखें सेवाएँ डिवाइस पर सभी सेवा APIs द्वारा साझा नियमों के लिए।

सामान्य प्रवाह

/stop डिस्क स्थान खाली करने के लिए मूल और परिवर्तित दोनों फ़ाइलें भी हटाता है, इसलिए अगले /play.

अपलोड करें

केवल .mp4 स्वीकार किया जाता है, और अपलोड शुरू होने से पहले सक्रिय स्ट्रीम रोक दी जाती है। वैकल्पिक सेटिंग्स भाग ट्रांसकोडिंग के दौरान लागू होने वाली रूपांतरण सेटिंग्स की एक JSON स्ट्रिंग है। क्योंकि वे परिवर्तित फ़ाइल में ही समाहित हो जाती हैं, बाद में उन्हें बदलने के लिए फिर से अपलोड करना आवश्यक है।

Upload a video file

post

Uploads a video and converts it to the RTSP streaming format. Only .mp4 is accepted. An active stream is stopped before the upload begins.

The optional settings part is a JSON string of conversion settings, applied during transcoding. Because they are baked into the converted file, changing them later requires re-uploading.

Body
filestring · binaryRequired

Video file to upload. Must be .mp4.

settingsstringOptional

Optional JSON string holding an UploadSettings object. It is a string part rather than a nested object because the service parses it with json.loads before validating, so the UploadSettings schema below documents the shape rather than being referenced here.

Example: {"target_fps": 30, "crf_quality": 23, "max_width": 1920}
Responses
200

Upload and conversion succeeded

application/json
successbooleanRequired
messagestringRequired
post/upload
POST /upload HTTP/1.1
Host: device-ip:8080
Content-Type: multipart/form-data
Accept: */*
Content-Length: 93

{
  "file": "binary",
  "settings": "{\"target_fps\": 30, \"crf_quality\": 23, \"max_width\": 1920}"
}
{
  "success": true,
  "message": "Video uploaded successfully",
  "video": {
    "filename": "factory_line.mp4",
    "size": 125000000,
    "size_mb": 119.21,
    "extension": ".mp4"
  }
}

स्ट्रीमिंग

Start streaming

post

Starts publishing the converted video to the RTSP server, looping until stopped. Uses the current stream settings.

Responses
200

Streaming started

application/json
successbooleanRequired
messagestringRequired
rtsp_urlstringRequired

RTSP stream URL as the service sees it, always naming localhost, on the port set by RTSP_PORT (8554 by default). Consumers off the device must substitute the device address; read rtsp_port from /info rather than assuming 8554.

post/play
POST /play HTTP/1.1
Host: device-ip:8080
Accept: */*
{
  "success": true,
  "message": "Streaming started",
  "rtsp_url": "rtsp://localhost:8554/stream"
}

Stop streaming and delete video files

post

Stops the stream and deletes both the original and converted files to free disk space. Uploading again is required before the next /play.

Responses
200

Streaming stopped and files deleted

application/json
successbooleanRequired
messagestringRequired
post/stop
POST /stop HTTP/1.1
Host: device-ip:8080
Accept: */*
{
  "success": true,
  "message": "text"
}

/delete स्ट्रीम चल रही हो यह आवश्यक नहीं है, वीडियो फ़ाइलें हटाता है; यदि कोई स्ट्रीम चल रही हो तो पहले उसे रोकता है।

Delete video files

post

Deletes the original and converted video files, stopping the stream first if it is running. Unlike /stop, this succeeds whether or not a stream is active.

Responses
200

Files deleted

application/json
successbooleanRequired
messagestringRequired
post/delete
POST /delete HTTP/1.1
Host: device-ip:8080
Accept: */*
{
  "success": true,
  "message": "text"
}

स्थिति

स्ट्रीमिंग सत्य होता है जब components.mediamtx.healthy (स्ट्रीमिंग सर्वर) और components.ffmpeg_process.running (ट्रांसकोड और प्रकाशन प्रक्रिया) दोनों सत्य होते हैं। components.stream एंट्री इसे नियंत्रित नहीं करती: components.stream.source_ready स्टार्टअप के दौरान थोड़ी देर के लिए असत्य हो सकता है जबकि स्ट्रीमिंग पहले से सत्य पढ़ रहा होता है, जो सामान्य है। टूटे हुए स्ट्रीम का स्थान पता लगाने का सबसे तेज़ तरीका यह विवरण है: जाँचें components यह देखने के लिए कि कौन सा भाग अस्वस्थ है, कुछ भी पुनः आरंभ करने से पहले।

Get streaming status

get

Returns whether the stream is live, plus the health of each component, which is the fastest way to localize a failure.

streaming is true when components.mediamtx.healthy and components.ffmpeg_process.running are both true; the components.stream entry does not gate it. components.stream.source_ready can be false briefly during startup, which is normal.

Responses
200

Current status

application/json
streamingbooleanRequired
rtsp_urlstring · nullableOptional

RTSP stream URL as the service sees it, always naming localhost, on the port set by RTSP_PORT (8554 by default). Null when not streaming. Consumers off the device must substitute the device address; read rtsp_port from /info rather than assuming 8554.

get/status
GET /status HTTP/1.1
Host: device-ip:8080
Accept: */*
200

Current status

{
  "streaming": true,
  "rtsp_url": "rtsp://localhost:8554/stream",
  "video": {
    "filename": "sample.mp4",
    "size": 1048576,
    "size_mb": 1,
    "extension": ".mp4"
  },
  "components": {
    "mediamtx": {
      "healthy": true,
      "error": null
    },
    "ffmpeg_process": {
      "exists": true,
      "pid": 1234,
      "running": true,
      "exit_code": null
    },
    "stream": {
      "api_available": true,
      "source_ready": true,
      "readers": 1,
      "error": null
    }
  }
}

/info सेवा जिन सीमाओं के साथ चल रही है उन्हें रिपोर्ट करता है, जिसमें खाली डिस्क स्थान और अधिकतम अपलोड आकार शामिल है, जिसे बड़ी फ़ाइल भेजने से पहले जाँचना उपयोगी है।

Get system information

get

Returns disk space, the upload size limit, accepted extensions, and the RTSP port.

Responses
200

System information

application/json
max_file_sizeintegerRequired

Maximum upload size in bytes, set by MAX_FILE_SIZE

max_file_size_gbnumberRequired
allowed_extensionsstring[]Required

Accepted file extensions. Only .mp4 today.

rtsp_portintegerRequired

Port the RTSP stream is served on, set by RTSP_PORT

get/info
GET /info HTTP/1.1
Host: device-ip:8080
Accept: */*
200

System information

{
  "disk_space": {
    "total": 1,
    "used": 1,
    "free": 1,
    "free_gb": 1
  },
  "max_file_size": 1,
  "max_file_size_gb": 1,
  "allowed_extensions": [
    "text"
  ],
  "rtsp_port": 1
}

स्ट्रीम सेटिंग्स एंडपॉइंट

प्लेबैक सेटिंग्स अपलोड सेटिंग्स से भिन्न होती हैं: वे स्ट्रीमिंग समय पर लागू होती हैं और बिना दोबारा अपलोड किए सत्रों के बीच बदली जा सकती हैं। एक अपडेट अगले /playपर प्रभावी होता है, न कि वर्तमान में चल रही स्ट्रीम पर।

Get stream settings

get

Returns the current playback settings.

Responses
200

Current settings

application/json

Playback settings, changeable between streaming sessions without re-uploading.

max_bitrate_kbpsinteger · min: 100 · max: 100000Optional

Maximum bitrate in kbps

Default: 5000
buffer_size_kbinteger · min: 100 · max: 50000Optional

Buffer size in KB

Default: 3000
max_delay_msinteger · min: 50 · max: 5000Optional

Maximum delay in milliseconds

Default: 500
get/stream-settings
GET /stream-settings HTTP/1.1
Host: device-ip:8080
Accept: */*
200

Current settings

{
  "max_bitrate_kbps": 5000,
  "buffer_size_kb": 3000,
  "max_delay_ms": 500
}

Update stream settings

post

Persists new playback settings. They apply to the next streaming session, not the one currently running.

Body

Playback settings, changeable between streaming sessions without re-uploading.

max_bitrate_kbpsinteger · min: 100 · max: 100000Optional

Maximum bitrate in kbps

Default: 5000
buffer_size_kbinteger · min: 100 · max: 50000Optional

Buffer size in KB

Default: 3000
max_delay_msinteger · min: 50 · max: 5000Optional

Maximum delay in milliseconds

Default: 500
Responses
200

Settings saved

application/json
successbooleanRequired
messagestringRequired
post/stream-settings
POST /stream-settings HTTP/1.1
Host: device-ip:8080
Content-Type: application/json
Accept: */*
Content-Length: 66

{
  "max_bitrate_kbps": 5000,
  "buffer_size_kb": 3000,
  "max_delay_ms": 500
}
{
  "success": true,
  "message": "text"
}

कॉन्फ़िगरेशन

पर्यावरण चर

इन्हें डिवाइस के Configuration टैब में सेवा पर सेट करें। देखें डिवाइस कॉन्फ़िगरेशन अपडेट करें.

चर
डिफ़ॉल्ट
विवरण

MAX_FILE_SIZE

5368709120

बाइट्स में अधिकतम अपलोड आकार (5 GB)

RTSP_PORT

8554

RTSP सर्वर पोर्ट

WEB_PORT

8080

वेब UI और API पोर्ट

LOG_LEVEL

INFO

लॉगिंग वर्बोसिटी: DEBUG, INFO, WARNING, या ERROR

अपलोड सेटिंग्स

इन्हें रूपांतरण के दौरान लागू किया जाता है, इसलिए इन्हें बदलने के लिए वीडियो को फिर से अपलोड करना पड़ता है।

सेटिंग
डिफ़ॉल्ट
विवरण

target_fps

मूल

लक्षित फ़्रेम दर, 1 से 120। मूल बनाए रखने के लिए छोड़ दें

crf_quality

23

गुणवत्ता स्तर, 0 से 51 (18 उच्च है, 23 मध्यम है, 28 निम्न है)

max_width

मूल

डाउनस्केलिंग के लिए अधिकतम चौड़ाई, 320 से 7680। मूल बनाए रखने के लिए छोड़ दें

स्ट्रीम सेटिंग्स

इन्हें प्लेबैक के समय लागू किया जाता है और CLI config मेनू या /stream-settings एंडपॉइंट से स्ट्रीमिंग सत्रों के बीच बदला जा सकता है।

सेटिंग
डिफ़ॉल्ट
विवरण

max_bitrate_kbps

5000

kbps में अधिकतम बिटरेट, 100 से 100,000

buffer_size_kb

3000

KB में बफ़र आकार, 100 से 50,000

max_delay_ms

500

मिलीसेकंड में अधिकतम देरी, 50 से 5,000

अंतिम अपडेट

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