Loading...
Loading...
Compare original and translation side by side
curlcurlreferences/lvs-api.md/summarize/v1/summarize/models/recommended_config/metricsreferences/deploy-lvs-service.mdreferences/lvs-environment-variables.mdreferences/lvs-debugging.mdreferences/lvs.env.examplelvs-api.mddeploy-lvs-service.mdreferences/lvs-api.md/summarize/v1/summarize/models/recommended_config/metricsreferences/deploy-lvs-service.mdreferences/lvs-environment-variables.mdreferences/lvs-debugging.mdreferences/lvs.env.examplelvs-api.mddeploy-lvs-service.mdreferences/lvs-api.md/summarizedeployreferences/deploy-lvs-service.mdreferences/lvs-api.md/summarizedeployreferences/deploy-lvs-service.mdvios| Video duration | Backend | Endpoint |
|---|---|---|
| VLM NIM (OpenAI-compatible) | |
| LVS microservice | |
| VLM NIM + tell the user | |
⚠️ Note: Input videois<name>s long. Long Video Summarization (LVS) is not deployed, so this summary was produced by the VLM alone. Deploy the<N>profile for higher-quality long-video summaries.lvs
vios| 视频时长 | 后端服务 | 端点 |
|---|---|---|
| VLM NIM(兼容OpenAI) | |
| LVS微服务 | |
| VLM NIM + 告知用户 | |
⚠️ 注意: 输入视频时长为<name>秒。 长视频摘要(LVS)服务未部署,因此本摘要仅由VLM生成。部署<N>配置文件可获得更高质量的长视频摘要。lvs
$HOST_IPcurl -sf --max-time 5 "http://${HOST_IP}:8000/docs" >/dev/null \
&& curl -sf --max-time 5 "http://${HOST_IP}:38111/v1/ready" >/dev/null"The VSSprofile isn't running onlvs. Shall I deploy it now using the$HOST_IPskill with/deploy?"-p lvs
/deploy/deployreferences/deploy-lvs-service.mddeploy$HOST_IPcurl -sf --max-time 5 "http://${HOST_IP}:8000/docs" >/dev/null \
&& curl -sf --max-time 5 "http://${HOST_IP}:38111/v1/ready" >/dev/null"VSS配置文件未在lvs上运行。是否现在使用$HOST_IP技能并加上/deploy参数进行部署?"-p lvs
/deploy/deployreferences/deploy-lvs-service.mddeploy${VLM_BASE_URL}http://localhost:30082${LVS_BACKEND_URL}http://localhost:38111viosVLM_BASE_URLLVS_BACKEND_URL/v1VLM_BASE_URL/v1/...${VLM_NAME}nvidia/cosmos-reason2-8breferences/lvs-api.md/v1/ready200curlundefined${VLM_BASE_URL}http://localhost:30082${LVS_BACKEND_URL}http://localhost:38111viosVLM_BASE_URLLVS_BACKEND_URLVLM_BASE_URL/v1/v1/...${VLM_NAME}nvidia/cosmos-reason2-8breferences/lvs-api.md/v1/ready200curlundefined
**How to interpret the results:**
- `vlm_code = 200` and `lvs_code = 200` → normal routing (Step 2a for
`<60s`, Step 2b for `>=60s`).
- `vlm_code != 200` → fail; summarization cannot run without the VLM.
- `vlm_code = 200`, `lvs_code != 200` → LVS is truly unavailable; use
the VLM fallback path described above for long videos.
- A non-200 LVS code after the retry loop is the ONLY signal that LVS
is unavailable. Empty stdout, missing JSON fields, or a "weird"
response body are NOT "unavailable."
---
**结果解读:**
- `vlm_code = 200` 且 `lvs_code = 200` → 正常路由(短视频走步骤2a,长视频走步骤2b)。
- `vlm_code != 200` → 失败;无VLM则无法运行摘要服务。
- `vlm_code = 200`,`lvs_code != 200` → LVS确实不可用;长视频使用上述VLM fallback路径。
- 重试循环后LVS返回非200状态码是唯一的不可用信号。空标准输出、缺失JSON字段或"异常"响应体均不代表"不可用"。
---viosviosviosviosstreamIdsensor/listsensor/<id>/streams{startTime, endTime}endTime - startTime/storage/file/<streamId>/urlcontainer=mp4GET/url.videoUrldisableAudioviosviosviosstreamIdsensor/listsensor/<id>/streams{startTime, endTime}endTime - startTime/storage/file/<streamId>/urlcontainer=mp4GET/url.videoUrldisableAudioviosreferences/hitl-prompts.mdreferences/hitl-prompts.mdtextPROMPT='<confirmed_prompt_from_hitl>'
curl -s -X POST "${VLM_BASE_URL:-http://localhost:30082}/v1/chat/completions" \
-H "Content-Type: application/json" \
-d "$(jq -n \
--arg model "${VLM_NAME:-nvidia/cosmos-reason2-8b}" \
--arg text "$PROMPT" \
--arg url "<clip_url_from_vios>" \
'{
model: $model,
temperature: 0.0,
max_tokens: 1024,
messages: [{
role: "user",
content: [
{type: "text", text: $text},
{type: "video_url", video_url: {url: $url}}
]
}]
}')" | jq -r '.choices[0].message.content'choices[0].message.content<think>...</think><answer>...</answer>video_urltextPROMPT='<confirmed_prompt_from_hitl>'
curl -s -X POST "${VLM_BASE_URL:-http://localhost:30082}/v1/chat/completions" \
-H "Content-Type: application/json" \
-d "$(jq -n \
--arg model "${VLM_NAME:-nvidia/cosmos-reason2-8b}" \
--arg text "$PROMPT" \
--arg url "<clip_url_from_vios>" \
'{
model: $model,
temperature: 0.0,
max_tokens: 1024,
messages: [{
role: "user",
content: [
{type: "text", text: $text},
{type: "video_url", video_url: {url: $url}}
]
}]
}')" | jq -r '.choices[0].message.content'choices[0].message.content<think>...</think><answer>...</answer>video_urlmedia_infoschemareferences/lvs-api.mdmedia_infoschemareferences/lvs-api.mdreferences/hitl-prompts.mdreferences/hitl-prompts.md
If both `video_summary` and `events` come back empty, the clip probably
doesn't contain the requested events — re-run with different `events` or a
broader `scenario` rather than reporting "no content."
**Tuning:**
- `chunk_duration` (default `10`) — seconds per chunk. Smaller = finer
timestamps, more VLM calls. Use `0` to send the whole video in one chunk.
- `num_frames_per_chunk` (default `20`) — frames sampled per chunk.
- `seed` (default `1`) — reproducibility; change or omit to get variety.
---
如果`video_summary`和`events`均为空,可能是剪辑中不包含请求的事件——请使用不同的`events`或更宽泛的`scenario`重新运行,而非报告"无内容"。
**调优参数:**
- `chunk_duration`(默认值`10`)——每个分片的时长(秒)。值越小,时间戳越精细,VLM调用次数越多。设为`0`表示将整个视频作为一个分片发送。
- `num_frames_per_chunk`(默认值`20`)——每个分片采样的帧数。
- `seed`(默认值`1`)——用于结果复现;修改或省略该值可获得不同结果。
---vios$CLIP$DURATIONvios$CLIP$DURATION$DURATION < 60$DURATION < 60Submit/generate/refineSubmitPROMPTPROMPT='Describe in detail what is happening in this video,
including all visible people, vehicles, equipments, objects,
actions, and environmental conditions.
OUTPUT REQUIREMENTS:
[timestamp-timestamp] Description of what is happening.
EXAMPLE:
[0.0s-4.0s] <description of the first event>
[4.0s-12.0s] <description of the second event>'
curl -s -X POST "${VLM_BASE_URL:-http://localhost:30082}/v1/chat/completions" \
-H "Content-Type: application/json" \
-d "$(jq -n --arg url "$CLIP" --arg text "$PROMPT" \
--arg model "${VLM_NAME:-nvidia/cosmos-reason2-8b}" '{
model: $model,
temperature: 0.0,
max_tokens: 1024,
messages: [{role:"user", content:[
{type:"text", text:$text},
{type:"video_url", video_url:{url:$url}}
]}]
}')" | jq -r '.choices[0].message.content'Submit/generate/refinePROMPTPROMPT='详细描述视频中的内容,
包括所有可见的人物、车辆、设备、物体、
动作和环境条件。
输出要求:
[时间戳-时间戳] 内容描述。
示例:
[0.0s-4.0s] <第一个事件的描述>
[4.0s-12.0s] <第二个事件的描述>'
curl -s -X POST "${VLM_BASE_URL:-http://localhost:30082}/v1/chat/completions" \
-H "Content-Type: application/json" \
-d "$(jq -n --arg url "$CLIP" --arg text "$PROMPT" \
--arg model "${VLM_NAME:-nvidia/cosmos-reason2-8b}" '{
model: $model,
temperature: 0.0,
max_tokens: 1024,
messages: [{role:"user", content:[
{type:"text", text:$text},
{type:"video_url", video_url:{url:$url}}
]}]
}')" | jq -r '.choices[0].message.content'$DURATION >= 60$DURATION >= 60defaults$SCENARIO$EVENTS_JSON$OBJECTS_JSONLVS=${LVS_BACKEND_URL:-http://localhost:38111}defaults$SCENARIO$EVENTS_JSON$OBJECTS_JSONLVS=${LVS_BACKEND_URL:-http://localhost:38111}
---
---choices[0].message.contentcontentjq -r '.choices[0].message.content' | jq{video_summary, events}{error: ...}503v1/readychoices[0].message.contentcontentjq -r '.choices[0].message.content' | jq{video_summary, events}{error: ...}v1/readyPOST /v1/chat/completionsPOST /summarizeSummary of <video_name> (<duration>)<duration>Ns25sMm Ss3m 30svideo_summaryeventsstart_timeend_timetypedescriptiondescription**Summary of <name>** (<duration>, scenario: <scenario>)choices[0].message.content<think>...</think><answer>...</answer><think><answer>POST /v1/chat/completionsPOST /summarizeSummary of <video_name> (<duration>)<duration>Ns25sMm Ss3m 30svideo_summaryeventsstart_timeend_timetypedescriptiondescription**Summary of <name>** (<duration>, scenario: <scenario>)choices[0].message.content<think>...</think><answer>...</answer><think><answer>/v1/readysize=0headjqgrepcurl -s -o /dev/null -w '%{http_code}'viosviosjqcontentvideo_summarychoices[0].message.content/v1/readysize=0headjqgrepcurl -s -o /dev/null -w '%{http_code}'viosviosjqcontentvideo_summarychoices[0].message.contentbaselvsreferences/lvs-api.mdreferences/deploy-lvs-service.mdbaselvsreferences/lvs-api.mdreferences/deploy-lvs-service.md