Loading...
Loading...
Use this skill when producing a VSS analysis report — Mode A per-clip VLM, Mode B incident-range via video-analytics. Not for real-time alerts or ad-hoc Q&A.
npx skill4agent add nvidia/skills vss-generate-video-reportPOST /generate| Mode | Trigger | Backend |
|---|---|---|
| A. Video clip | "report on | |
| B. Incident range | "report on incidents from | |
<sensor><sensor-id><sensor><t1><t2># Mode A — VST + VLM reachability
curl -sf --max-time 5 "http://${HOST_IP}:30888/vst/api/v1/sensor/version" >/dev/null
# Mode B — VA-MCP
curl -sf --max-time 5 "http://${HOST_IP}:9901/" >/dev/null/vss-deploy-profile-p base-p alerts${HOST_IP}:30888$VSS_PUBLIC_HOST$VSS_PUBLIC_PORT$VSS_PUBLIC_HTTP_PROTOCOL.envBROWSER_CLIP_URL=$(echo "$RAW_URL" | sed -E "s|^https?://[^/]+|${VSS_PUBLIC_HTTP_PROTOCOL}://${VSS_PUBLIC_HOST}:${VSS_PUBLIC_PORT}|")video_urllvscurl -sf --max-time 5 "http://${HOST_IP}:38111/v1/ready"/vss-summarize-video/v1/ready/vss-manage-video-io-storage<sensor-id>/storage/<streamId>/timelinesstartTimeendTimecurl -s "http://${HOST_IP}:30888/vst/api/v1/storage/file/<streamId>/url?startTime=<startTime>&endTime=<endTime>&container=mp4&disableAudio=true" | jq -r .videoUrlmp4VIDEO_URLBROWSER_CLIP_URL$VIDEO_URLVIDEO_URLlocalhostHOST_IPVLM_ENDPOINT/v1/modelschat/completions| Backend | Env vars | Typical host endpoint | Picked when |
|---|---|---|---|
| NIM Cosmos | | | |
| RT-VLM Cosmos | | | |
docker exec vss-agent env | grep -E '^(VLM_BASE_URL|VLM_NAME|VLM_MODE|RTVI_VLM_BASE_URL|RTVI_VLM_ENDPOINT|RTVI_VLM_MODEL_TO_USE)='if [ -n "${VLM_BASE_URL}" ] && [ "${VLM_MODE}" != "none" ]; then
VLM_ENDPOINT="${VLM_BASE_URL%/}/v1"
VLM_MODEL="${VLM_NAME}"
else
VLM_ENDPOINT="${RTVI_VLM_ENDPOINT:-${RTVI_VLM_BASE_URL%/}/v1}"
VLM_MODEL="${RTVI_VLM_MODEL_TO_USE}"
fi/v1/modelscurl -sf --max-time 5 "${VLM_ENDPOINT}/models" | jq -r '.data[].id'${VLM_MODEL}chat/completionsvideo_urlvideo_understandingsrc/vss_agents/tools/video_understanding.py_build_vlm_messagesPROMPT='Describe in detail what happens in the video, with timestamps (start–end in seconds from clip start) for each segment or event. Cover scenes, objects, people, vehicles, and notable actions.'
# Cosmos Reason 2 reasoning prompt suffix — matches video_understanding.py for is_cosmos_reason2 + reasoning=true.
# Drop this suffix for non-cosmos-reason2 VLMs.
PROMPT="${PROMPT}
Answer the question using the following format:
<think>
Your reasoning.
</think>
Write your final answer immediately after the </think> tag."
curl -s -X POST "${VLM_ENDPOINT}/chat/completions" \
-H "Content-Type: application/json" \
-d @- <<EOF | jq -r '.choices[0].message.content'
{
"model": "${VLM_MODEL}",
"messages": [
{
"role": "user",
"content": [
{"type": "text", "text": $(jq -Rs . <<< "${PROMPT}")},
{"type": "video_url", "video_url": {"url": "${VIDEO_URL}"}}
]
}
],
"max_tokens": 1024,
"temperature": 0.0
}
EOF<think>…</think></think># Video Analysis Report
## Basic Information
| Field | Value |
|-------|-------|
| **Report Identifier** | vss_report_<YYYYMMDD_HHMMSS> |
| **Date of Analysis** | <YYYY-MM-DD> |
| **Time of Analysis** | <HH:MM:SS> |
| **Video Source** | <sensor_id or filename> |
| **Clip Range** | <startTime> – <endTime> |
| **Clip URL** | `<BROWSER_CLIP_URL>` (apply the `$VSS_PUBLIC_HOST:$VSS_PUBLIC_PORT` rewrite — NEVER paste the raw `HOST_IP:30888` URL here) |
| **VLM** | <VLM_MODEL (NIM or RT-VLM)> |
| **Analysis Request** | <user's request> |
## Analysis Results
<VLM output: timestamped caption / summary>start_timeend_timeYYYY-MM-DDTHH:MM:SS.sssZsourcesource_type=sensor/vss-query-analytics/vss-query-analyticstools/call{
"name": "video_analytics__get_incidents",
"arguments": {
"source": "<sensor-id-or-omit>",
"source_type": "sensor",
"start_time": "<ISO>",
"end_time": "<ISO>",
"max_count": 100,
"includes": ["objectIds", "info"]
}
}idsensorIdtimestampendcategoryplace.nameinfo.verdictinfo.reasoningobjectIdsinfo.clip_urlclip_url$VSS_PUBLIC_HOST:$VSS_PUBLIC_PORTHOST_IP:30888# Incident Range Report
## Basic Information
| Field | Value |
|-------|-------|
| **Report Identifier** | vss_report_<YYYYMMDD_HHMMSS> |
| **Range** | <start_time> – <end_time> |
| **Scope** | <sensor_id> | all sensors |
| **Total Incidents** | <N> |
| **Confirmed / Rejected / Unverified** | <c> / <r> / <u> |
## Incidents
### <sensor_id_or_category>
- **<timestamp>** — <category> — verdict: **<confirmed|rejected|unverified>**
- <info.reasoning (1–2 lines)>
- clip: `<rewritten URL>` (omit row when the incident carries no clip URL — never paste a raw `HOST_IP:30888` URL)
- objects: <objectIds joined>
- …
## Summary
<2–4 sentences synthesizing what dominates the range — top categories, sensors with the most confirmed incidents, any clusters in time.>get_incidents/vss-manage-video-io-storage/vss-query-analytics/vss-ask-video/vss-summarize-videolvs