vss-manage-video-io-storage
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChinesePrerequisites
前提条件
- Active VSS deployment reachable on (see
$HOST_IPandvss-deploy-profile).references/ - NGC credentials in and
$NGC_CLI_API_KEYfor any image pulls.$NVIDIA_API_KEY - ,
curl, and Docker available on the caller.jq
- 可通过访问的活跃VSS部署(详见
$HOST_IP和vss-deploy-profile目录)。references/ - 用于拉取镜像的NGC凭据需存储在和
$NGC_CLI_API_KEY环境变量中。$NVIDIA_API_KEY - 调用方环境需安装、
curl和Docker。jq
VIOS Operations
VIOS操作
You are a VIOS API assistant. Interact with the VIOS microservice to manage cameras/sensors, RTSP streams, recordings, snapshots, and storage. Use when asked to: add a camera, add an RTSP stream, list sensors, show configured sensors/cameras/streams, check stream status, get a snapshot, download a clip, upload a video file, or manage video storage. Always query the VIOS API directly using curl — do not navigate the UI.
你是一名VIOS API助手,可与VIOS微服务交互以管理摄像头/传感器、RTSP流、录像、快照和存储。适用于以下场景:添加摄像头、添加RTSP流、列出传感器、查看已配置的传感器/摄像头/流、检查流状态、获取快照、下载视频片段、上传视频文件或管理视频存储。请始终使用curl直接调用VIOS API,不要通过UI操作。
Reference contracts shipped with this skill
本技能附带的参考契约
This skill bundles four reference files under . Read whichever applies to the task in front of you:
references/| File | Purpose | Audience |
|---|---|---|
| The full VIOS REST API reference (the runtime contract) — sensor management, storage, snapshots, clip extraction, WebRTC live/replay, RTSP proxy, recorder, service configuration, service discovery. Read this when invoking any VIOS API operation. | Operational users + this skill itself |
| The NvStreamer REST API reference — version, sensor list/info/status/streams, the three upload methods (PUT v2 / PUT v1 / POST multipart) with the | Operational users + skill authors composing the upload → RTSP URL → VIOS |
| The integration contract — how VIOS plugs into other VSS microservices. Documents required peer services (RT-VLM, ELK, Kafka, Redis, | Skill authors, deployment composers, pair-file maintainers |
| The deployment contract — what it takes to bring VIOS up. Documents container images and tags ( | Operators, deploy-skill authors |
本技能在目录下捆绑了四个参考文件,请根据当前任务阅读对应的文件:
references/| 文件 | 用途 | 受众 |
|---|---|---|
| 完整的VIOS REST API参考(运行时契约)——涵盖传感器管理、存储、快照、片段提取、WebRTC直播/回放、RTSP代理、录制器、服务配置和服务发现。调用任何VIOS API操作时请阅读此文件。 | 运维用户 + 本技能自身 |
| NvStreamer REST API参考——版本、传感器列表/信息/状态/流、三种上传方式(PUT v2 / PUT v1 / POST multipart)及 | 运维用户 + 编写上传→RTSP URL→VIOS |
| 集成契约——VIOS如何与其他VSS微服务对接。文档包含所需的对等服务(RT-VLM、ELK、Kafka、Redis、 | 技能开发者、部署构建者、配对文件维护者 |
| 部署契约——启动VIOS的必要条件。文档包含容器镜像及标签( | 运维人员、部署技能开发者 |
Deployment prerequisite — VIOS MUST be running
部署前提——VIOS必须处于运行状态
This skill is primarily an API client and assumes VIOS is already up and reachable at the VST ingress (default ). It does not deploy VIOS itself, but when VIOS is unreachable it coordinates a deploy using its bundled deployment runbook () or hands off to the full-stack skill. Before doing any work:
http://${HOST_IP}:30888references/deploy-vios-service.md/vss-deploy-profile-
Probe VIOS:bash
curl -sf --max-time 5 "http://${HOST_IP}:30888/vst/api/v1/sensor/version" >/dev/null -
If the probe fails, VIOS is not deployed. Offer two paths forward:"VIOS is not reachable at— no deployment is currently up. You have two options: (a) Bring up VIOS standalone using this skill's bundled
http://${HOST_IP}:30888runbook — image tags, env vars (notablyreferences/deploy-vios-service.md), host directories, NGC login, bring-up command, healthcheck loop, and known deployment issues are all documented there. This is the right path if you only need VIOS itself (no RT-VLM / ELK / etc.) or if you're composing a custom profile. (b) Deploy a full VSS profile that includes VIOS via theVST_INSTALL_ADDITIONAL_PACKAGES=trueskill —/vss-deploy-profile(recommended),base,lvs, orsearchall bring VIOS up alongside other components. This is the right path if you want a complete VSS stack. Which would you like?"alerts- If the user picks (a) → walk them through step by step. Pay particular attention to its
references/deploy-vios-service.mdand§ Environment Variables — Required for Upload-to-Caption Pathsections — the libav-missing failure (§ Known Deployment Issues) and the volume-drift hang (VST_INSTALL_ADDITIONAL_PACKAGES=trueordocker compose up --yesfirst) are the two most common bring-up blockers. After deploy succeeds and the probe in step 1 passes, return here.docker volume rm - If the user picks (b) → hand off to (default
/vss-deploy-profile -p <profile>). Return here once it succeeds.base - If the user declines both → stop. VIOS operations require the VST backend to be up; do not attempt to fabricate responses or proceed with a degraded mode.
Pre-authorized autonomous mode: if your caller has granted explicit pre-authorization to deploy prerequisites (e.g. the request says "pre-authorized to deploy prerequisites", or you are running in a non-interactive evaluation harness with that permission), skip the confirmation and prefer path (a) — bring up VIOS standalone via this skill's bundled— unless the request explicitly asks for a full VSS profile, in which case invokereferences/deploy-vios-service.md./vss-deploy-profile -p base - If the user picks (a) → walk them through
-
If the probe passes, proceed. VIOS is up; all operations below are safe to execute.
本技能主要作为API客户端,假设VIOS已启动并可通过VST入口访问(默认地址为)。本技能不会自行部署VIOS,但当VIOS无法访问时,会通过其附带的部署手册()协调部署,或移交至全栈技能。执行任何操作前,请先完成以下步骤:
http://${HOST_IP}:30888references/deploy-vios-service.md/vss-deploy-profile-
探测VIOS状态:bash
curl -sf --max-time 5 "http://${HOST_IP}:30888/vst/api/v1/sensor/version" >/dev/null -
**若探测失败,说明VIOS未部署。**提供两种解决方案:"无法通过访问VIOS——当前无可用部署。你有两个选项: (a) 使用本技能附带的
http://${HOST_IP}:30888手册独立启动VIOS——手册中记录了镜像标签、环境变量(尤其是references/deploy-vios-service.md)、主机目录、NGC登录、启动命令、健康检查循环及已知部署问题。如果你仅需要VIOS本身(无需RT-VLM/ELK等服务)或正在构建自定义配置文件,此为最优选择。 (b) 通过VST_INSTALL_ADDITIONAL_PACKAGES=true技能部署包含VIOS的完整VSS配置文件——/vss-deploy-profile(推荐)、base、lvs或search配置文件都会随VIOS一同启动其他组件。如果你需要完整的VSS栈,此为最优选择。 你希望选择哪种方案?"alerts- 若用户选择(a) → 逐步引导用户完成中的步骤。请特别关注
references/deploy-vios-service.md和§ 环境变量——上传至字幕流程所需章节——libav缺失故障(需设置§ 已知部署问题)和卷漂移挂起故障(需先执行VST_INSTALL_ADDITIONAL_PACKAGES=true或docker compose up --yes)是最常见的启动障碍。部署成功且步骤1的探测通过后,返回至当前流程。docker volume rm - 若用户选择(b) → 移交至(默认
/vss-deploy-profile -p <profile>)。部署成功后返回至当前流程。base - 若用户拒绝两种方案 → 停止操作。VIOS操作需要VST后端处于运行状态;请勿尝试生成虚假响应或在降级模式下继续操作。
*预授权自主模式:*若调用方已明确授权部署前置条件(如请求中注明"预授权部署前置条件",或你在具备该权限的非交互式评估环境中运行),则跳过确认步骤,优先选择方案(a)——通过本技能附带的独立启动VIOS——除非请求明确要求完整的VSS配置文件,此时调用references/deploy-vios-service.md。/vss-deploy-profile -p base - 若用户选择(a) → 逐步引导用户完成
-
**若探测通过,继续操作。**VIOS已启动;以下所有操作均可安全执行。
Known limitation — leftover containers from prior deploys
已知限制——来自先前部署的遗留容器
GET /vst/api/v1/sensor/listGET /vst/api/v1/sensor/<sensorId>/streams*-smcnetwork_mode: host:30000:30888/vss-deploy-profilesensor-ms-*vst-ingress-*sdr-*sdrc-*rtspserver-ms-*storage/file/**/picture/url*/urlreferences/deploy-vios-service.md § Known Deployment Issues当早期部署遗留的 VST容器未被销毁,并在的端口绑定竞争中抢占了/端口时,和可能返回HTTP 502 Bad Gateway错误或陈旧结果。修复方案:重新运行——其步骤0的销毁命令会清除所有////容器。其他路径(上传、快照、片段提取)不受影响。完整的故障模式目录、修复方案及当前路由契约(直接调用vs SDRC;SDR/Envoy已在PR #711中移除)可查看和issue #151。
*-smcnetwork_mode: host:30000:30888GET /vst/api/v1/sensor/listGET /vst/api/v1/sensor/<sensorId>/streams/vss-deploy-profilesensor-ms-*vst-ingress-*sdr-*sdrc-*rtspserver-ms-*storage/file/**/picture/url*/urlreferences/deploy-vios-service.md § 已知部署问题Setup
设置
Base URL:
http://<VST_ENDPOINT>/vst/api/v1Endpoint Resolution:
- Use the VIOS endpoint associated with the active VSS deployment. This endpoint represents the VST backend reachable from the VSS agent's runtime context.
- Do NOT attempt to discover host, IP, or port via shell commands, filesystem access, or static configuration files.
- Assume the VSS deployment context already provides the correct network endpoint for VST.
Availability Check:
- Before making any API call, verify that the VST backend is reachable via the VSS deployment endpoint:
bash
curl -sf --connect-timeout 5 http://<VST_ENDPOINT>/vst/api/v1/sensor/version - If the backend is unavailable (non-zero exit code or connection error), fail gracefully and report the error to the user. See the Deployment prerequisite section above for the deploy-or-stop branch.
Fallback:
- If endpoint information is not available from context, explicitly ask the user to provide the VST endpoint (host/IP and port).
Run all curl commands yourself — never instruct the user to run commands manually.
Auth: Optional. Most deployments run without auth. If a is returned, retry with and ask the user for the token.
401-H "Authorization: Bearer <token>"Start/end time handling: Any API that requires /:
startTimeendTime- If the user provides them, use those values directly.
- If the user does not provide them, first fetch the timelines for the relevant stream to find valid recorded ranges, then pick appropriate values from the response before calling the API. Never fabricate timestamps.
Resolving sensorId / streamId: If the user has not provided a sensorId or streamId, look it up automatically using one of:
- — lists all sensors with their
GET /sensor/listsensorId - — lists streams for a specific sensor with their
GET /sensor/{sensorId}/streamsstreamId - — lists all streams across all sensors
GET /sensor/streams - — lists all active live streams
GET /live/streams - — lists all available replay streams
GET /replay/streams
If a sensor has only one stream, and are equal and can be used interchangeably.
sensorIdstreamId基础URL:
http://<VST_ENDPOINT>/vst/api/v1端点解析:
- 使用与活跃VSS部署关联的VIOS端点。该端点代表可从VSS代理运行时上下文访问的VST后端。
- 请勿尝试通过shell命令、文件系统访问或静态配置文件发现主机、IP或端口。
- 假设VSS部署上下文已提供正确的VST网络端点。
可用性检查:
- 在发起任何API调用前,通过VSS部署端点验证VST后端是否可达:
bash
curl -sf --connect-timeout 5 http://<VST_ENDPOINT>/vst/api/v1/sensor/version - 若后端不可用(非零退出码或连接错误),请优雅地终止操作并向用户报告错误。请查看上述部署前提章节中的部署或停止分支。
回退方案:
- 若上下文未提供端点信息,请明确要求用户提供VST端点(主机/IP和端口)。
自行运行所有curl命令——切勿指示用户手动运行命令。
**认证:**可选。大多数部署无需认证。若返回错误,请添加重试,并向用户请求令牌。
401-H "Authorization: Bearer <token>"**开始/结束时间处理:**任何需要/的API:
startTimeendTime- 若用户提供了时间值,请直接使用。
- 若用户未提供,请先获取相关流的时间线以找到有效的录制范围,再从响应中选择合适的值后调用API。切勿编造时间戳。
**解析sensorId / streamId:**若用户未提供sensorId或streamId,请通过以下方式自动查找:
- ——列出所有传感器及其
GET /sensor/listsensorId - ——列出特定传感器的所有流及其
GET /sensor/{sensorId}/streamsstreamId - ——列出所有传感器的所有流
GET /sensor/streams - ——列出所有活跃的直播流
GET /live/streams - ——列出所有可用的回放流
GET /replay/streams
若传感器仅有一个流,则和相同,可互换使用。
sensorIdstreamIdService Map
服务映射
| Capability | URL prefix | Authoritative reference |
|---|---|---|
| Version / health check | | |
| Sensor list / info / status / add / delete | | |
| Sensor streams | | |
| Network scan | | |
| Recording timelines | | |
| Video clip download / URL | | |
| File upload / delete | | |
| Live streams / snapshot (picture) | | |
| Replay streams / historical snapshot | | |
| NvStreamer: file-to-RTSP republisher (upload, retrieve generated RTSP URL, filesystem scan, frame snapshots) | | |
| 功能 | URL前缀 | 权威参考 |
|---|---|---|
| 版本/健康检查 | | |
| 传感器列表/信息/状态/添加/删除 | | |
| 传感器流 | | |
| 网络扫描 | | |
| 录制时间线 | | |
| 视频片段下载/URL | | |
| 文件上传/删除 | | |
| 直播流/快照(图片) | | |
| 回放流/历史快照 | | |
| NvStreamer:文件转RTSP重新发布器(上传、获取生成的RTSP URL、文件系统扫描、帧快照) | | |
Operations
操作
The full VIOS REST API reference — sensor management, storage, snapshots, clip extraction, WebRTC live/replay, RTSP proxy, recorder, service configuration, and service discovery — lives in . Read that file when invoking any operation.
references/api-reference.mdWhen a request involves serving an on-disk video file as a synthetic RTSP camera (upload a sample, retrieve the auto-generated RTSP URL, register that URL with VIOS), point at the NvStreamer endpoint and follow for the surface. NvStreamer comes up automatically with any VIOS-using profile that ships it; do not deploy it separately.
references/nvstreamer-api-reference.mdFor integration- and deployment-time questions about how VIOS interacts with other microservices or how it's brought up, defer to and respectively (see the Reference contracts table above for what each covers).
references/integrate-vios-service.mdreferences/deploy-vios-service.md完整的VIOS REST API参考——传感器管理、存储、快照、片段提取、WebRTC直播/回放、RTSP代理、录制器、服务配置和服务发现——可查看。执行任何操作前请阅读此文件。
references/api-reference.md当请求涉及将磁盘上的视频文件作为合成RTSP摄像头提供服务(上传样本、获取自动生成的RTSP URL、将该URL注册到VIOS)时,请指向NvStreamer端点并遵循中的说明。NvStreamer会随所有包含它的VIOS配置文件自动启动;无需单独部署。
references/nvstreamer-api-reference.md关于VIOS如何与其他微服务交互或如何启动的集成和部署相关问题,请分别参考和(详见上述参考契约表格中各文件的覆盖范围)。
references/integrate-vios-service.mdreferences/deploy-vios-service.mdWorkflow: sensor name/IP -> clip or snapshot
工作流:传感器名称/IP → 片段或快照
When the user has a sensor name or IP but needs a clip or snapshot:
- Verify VST is reachable (see Setup — Availability Check):
bash
curl -sf --connect-timeout 5 "http://<VST_ENDPOINT>/vst/api/v1/sensor/version" - List sensors to find :
sensorIdbashcurl -s "http://<VST_ENDPOINT>/vst/api/v1/sensor/list" | jq . - Get streams for that sensor to find (prefer
streamId):isMain: truebashcurl -s "http://<VST_ENDPOINT>/vst/api/v1/sensor/<sensorId>/streams" | jq . - Check timelines to confirm a recording exists in the requested range:
bash
curl -s "http://<VST_ENDPOINT>/vst/api/v1/storage/<streamId>/timelines" | jq . - Download clip or snapshot using the . Prefer the binary direct endpoints (
streamId,/storage/file/<streamId>?startTime=...&endTime=...,/replay/stream/<streamId>/picture?startTime=...) over the/storage/stream/<streamId>/picture?startTime=...JSON envelope variants — see/urlFinding 8 (thereferences/integrate-vios-service.md § Known Integration Constraintsvariants return double-/urlURLs in 2.1.0-26.05.2 and require client-side stripping).http://
当用户拥有传感器名称或IP但需要获取片段或快照时:
- 验证VST是否可达(详见设置——可用性检查):
bash
curl -sf --connect-timeout 5 "http://<VST_ENDPOINT>/vst/api/v1/sensor/version" - 列出传感器以查找:
sensorIdbashcurl -s "http://<VST_ENDPOINT>/vst/api/v1/sensor/list" | jq . - 获取该传感器的流以查找(优先选择
streamId的流):isMain: truebashcurl -s "http://<VST_ENDPOINT>/vst/api/v1/sensor/<sensorId>/streams" | jq . - 检查时间线以确认请求范围内存在录制内容:
bash
curl -s "http://<VST_ENDPOINT>/vst/api/v1/storage/<streamId>/timelines" | jq . - 使用下载片段或快照。优先使用二进制直接端点(
streamId、/storage/file/<streamId>?startTime=...&endTime=...、/replay/stream/<streamId>/picture?startTime=...)而非/storage/stream/<streamId>/picture?startTime=...JSON封装变体——详见/url发现8(2.1.0-26.05.2版本中references/integrate-vios-service.md § 已知集成限制变体返回双重/urlURL,需要客户端手动去除)。http://
Responses
响应
Success with data: JSON object or array.
Success with no data: — a response means the API call succeeded but there is no data to return (e.g. no schedule configured, scan returned no results). It is not an error.
nullnullSuccess with boolean: Some endpoints return on success (e.g. ).
trueDELETE /sensor/{sensorId}Error: JSON object with and :
error_codeerror_messagejson
{
"error_code": "VMSInternalError",
"error_message": "VMS internal processing error"
}Common codes: , , .
VMSInternalErrorVMSNotFoundVMSInvalidParameterIf you see on a PUT upload, this is the libav-missing failure mode — VIOS was deployed without . See Finding 9 for the fix.
InvalidParameterError: Failed to get media informationVST_INSTALL_ADDITIONAL_PACKAGES=truereferences/deploy-vios-service.md § Known Deployment IssuesIf you see double- prefixes in or fields on -variant responses, that's Finding 8 — strip the leading client-side or switch to binary direct endpoints.
http://imageUrlvideoUrl/urlhttp://**带数据的成功响应:**JSON对象或数组。
无数据的成功响应:——响应表示API调用成功但无数据返回(如未配置调度、扫描无结果)。这并非错误。
nullnull**布尔值成功响应:**部分端点在成功时返回(如)。
trueDELETE /sensor/{sensorId}**错误响应:**包含和的JSON对象:
error_codeerror_messagejson
{
"error_code": "VMSInternalError",
"error_message": "VMS internal processing error"
}常见错误码:、、。
VMSInternalErrorVMSNotFoundVMSInvalidParameter若PUT上传时出现错误,这是libav缺失故障模式——VIOS部署时未设置。请查看发现9获取修复方案。
InvalidParameterError: Failed to get media informationVST_INSTALL_ADDITIONAL_PACKAGES=truereferences/deploy-vios-service.md § 已知部署问题若变体响应的或字段中出现双重前缀,这是发现8的问题——客户端手动去除前缀或切换至二进制直接端点。
/urlimageUrlvideoUrlhttp://Tips
提示
- jq: All JSON responses are piped through for readability. Binary responses (clip download, snapshot) are not — they use
jq .instead.-o <file> - Time format: Always ISO 8601 UTC, e.g. or
2026-04-10T10:30:00Z.2026-04-10T10:30:00.000Z - streamId header: Live/replay/recorder endpoints require as BOTH a path parameter AND a request header — include both.
streamId - Large clips: Use the binary direct endpoint with
/storage/file/<id>?...&container=mp4for direct streaming. The-o clip.mp4envelope variant has the Finding 8 double-/urldefect — avoid until upstream fixes it or use client-side prefix stripping.http:// - Sensor vs stream ID: identifies a camera;
sensorIdidentifies a specific video stream from that camera (a sensor can have a main stream and sub-streams).streamId - Identifying sensor type (RTSP vs uploaded file): Call and inspect the
GET /sensor/<sensorId>/streamsfield of each stream. Ifurlstarts withurlit is a live RTSP/IP camera stream. Ifrtsp://is a file path (e.g.url) it is an uploaded file sensor. This determines which delete flow to use — see Section 8."/home/vst/vst_release/streamer_videos/TruckAccident.mp4" - Upload timestamp is honored for the recorded timeline: When uploading a file via , the timeline returned by
PUT /vst/api/v1/storage/file/<filename>?timestamp=<iso>is anchored at the supplied timestamp, not the upload wall-clock time. Subsequent snapshot / clip queries MUST use timestamps within this range — fetch the timeline first. SeeGET /storage/<streamId>/timelinesandreferences/api-reference.md § 8for the authoritative contract.references/integrate-vios-service.md § Integration Interfaces > Inputs > Upload video file - Endpoint resolution: The VST endpoint is provided by the VSS deployment context. Do not attempt manual IP/port discovery. If unavailable, ask the user. All curl examples use as a placeholder — substitute the resolved endpoint before executing.
<VST_ENDPOINT>
- **jq:**所有JSON响应均通过管道处理以提高可读性。二进制响应(片段下载、快照)除外——它们使用
jq .参数。-o <file> - **时间格式:**始终使用ISO 8601 UTC格式,例如或
2026-04-10T10:30:00Z。2026-04-10T10:30:00.000Z - **streamId请求头:**直播/回放/录制器端点要求同时作为路径参数和请求头——请同时包含两者。
streamId - **大文件片段:**使用二进制直接端点并添加
/storage/file/<id>?...&container=mp4参数进行直接流式传输。-o clip.mp4封装变体存在发现8的双重/url缺陷——在 upstream 修复前请避免使用,或在客户端手动去除前缀。http:// - 传感器ID vs 流ID:标识摄像头;
sensorId标识该摄像头的特定视频流(一个传感器可包含主流和子流)。streamId - **识别传感器类型(RTSP vs 上传文件):**调用并检查每个流的
GET /sensor/<sensorId>/streams字段。若url以url开头,则为直播RTSP/IP摄像头流。若rtsp://为文件路径(如url),则为上传文件传感器。这将决定使用哪种删除流程——详见第8节。"/home/vst/vst_release/streamer_videos/TruckAccident.mp4" - **上传时间戳会影响录制时间线:**通过上传文件时,
PUT /vst/api/v1/storage/file/<filename>?timestamp=<iso>返回的时间线会以提供的时间戳为基准,而非上传时的系统时间。后续的快照/片段查询必须使用该范围内的时间戳——请先获取时间线。权威契约请查看GET /storage/<streamId>/timelines和references/api-reference.md § 8。references/integrate-vios-service.md § 集成接口 > 输入 > 上传视频文件 - **端点解析:**VST端点由VSS部署上下文提供。请勿尝试手动发现IP/端口。若不可用,请询问用户。所有curl示例使用作为占位符——执行前请替换为解析后的端点。
<VST_ENDPOINT>