nvidia/deepstream/deepstream-generate-pipeline
- community
Checking that the SKILL.md file is still in the repository.
Build DeepStream GStreamer pipelines interactively. Use when the user asks about pipelines for video/image inference, detection, tracking, or streaming — including natural phrases like 'pipeline to infer on image', 'run inference on video', 'detect objects in stream', 'save inference output', 'deepstream pipeline', 'gst-launch pipeline', 'process video with detection', 'build a pipeline', or any request involving GStreamer/DeepStream elements (nvinfer, nvstreammux, nvtracker, etc.).
Install
npx vskill@latest install nvidia/deepstream/deepstream-generate-pipelineSKILL.md
DeepStream Pipeline Builder
Generate ready-to-run gst-launch-1.0 pipelines for NVIDIA DeepStream SDK by collecting pipeline requirements through an interactive questionnaire, then assembling the pipeline using a standalone BM25 retrieval backend with structural metadata boosting (similarity search over 270+ verified pipelines, zero external dependencies).
Prerequisites
- Python: 3.8+ (stdlib only — no pip packages required)
- DeepStream SDK: Installed at
/opt/nvidia/deepstream/deepstream/(forgst-inspect-1.0validation and element verification) - GStreamer:
gst-launch-1.0andgst-inspect-1.0onPATH(installed with DeepStream) - Platform: x86 dGPU (T4, A100, L40, RTX, etc.) or aarch64 — Jetson (Orin, Xavier, Nano) / SBSA (Grace, GH200)
Usage Examples
Supported Configurations
| Parameter | Options | |
|---|---|---|
| Input | Local video (.mp4/.h264/.h265), local image (.jpg/.png), RTSP stream, USB camera, test pattern | |
| Inference | None, primary (nvinfer), primary+secondary, with preprocessor, Triton (nvinferserver) | |
| Tracker | None, NvDCF, IOU, NvSORT, DeepSORT | |
| Sink | Display (dGPU/Jetson), save (JPG/PNG/MP4/H264), RTSP out, fakesink | |
| Platform | x86 dGPU (T4, A100, L40, RTX, etc.) or aarch64 — Jetson (Orin, Xavier, Nano) / SBSA (Grace, GH200) | |
| Extras | Resize, rotate/flip, crop, color format conversion |
Scripts
| Script | Purpose | |
|---|---|---|
scripts/generate_pipeline.py | BM25 retrieval engine — scores and ranks pipelines from data/data.csv. Supports --format {json,compact,summary} (default json) | |
scripts/validate_pipeline.py | 4-stage validator: syntax, elements, properties, live parse. Supports --format {json,summary} (default json) | |
scripts/lint_data.py | Data quality linter for the pipeline CSV (--fix to auto-repair) |
Workflow
Step 1 — Collect Pipeline Requirements
You MUST `Read references/requirement-extraction.md` before doing this step.It contains the query-inference table, compound-extraction examples, the fullAskUserQuestionquestion bank (with the default-first ordering contract), theautomatic-OSD and extras/flip-method rules, and the dynamic question-reductionexamples that this step depends on. Apply them exactly.
Order of operations:
- Infer everything you can from the query using the inference table in
references/requirement-extraction.md. The goal is to identify which of the 7 parameters (input source, num sources, inference, tracker, sink, platform, extras) the user has already specified. - Ask the user about the unknowns via `AskUserQuestion` in a single call. Do not silently default tracker/sink/platform/extras — these are real choices the user should make explicitly (display vs save, no tracker vs NvDCF, x86 dGPU vs aarch64 Jetson/SBSA, etc.). Skip only the questions whose answer is already clear from the query.
- Quote the inferred parameters back to the user in the lead-in to the question call so they can see what you already extracted. Example: "From your query I have: 3 mp4 videos, primary inference. Just need a few more details:"
Follow the inference table, question bank, and OSD/extras rules in references/requirement-extraction.md to decide which questions to ask and how to place transform elements, then proceed to Step 2.
Step 2 — Build the Natural Language Query
From the user's answers, construct a single descriptive query string. Follow this pattern:
Examples of constructed queries:
| User Selections | Constructed Query | |
|---|---|---|
| Local video, 1 source, Primary detector, No tracker, Display, dGPU | "Please provide a GStreamer pipeline that performs primary inference on a single mp4 video and displays the output" | |
| RTSP, 4 sources, Primary+Secondary, NvDCF, Save MP4, dGPU | "Please provide a GStreamer pipeline that performs primary and secondary inference with NvDCF tracker on 4 RTSP streams and saves output to MP4 file" | |
| Local video, 2 sources, Primary with preprocessor, IOU, Display, Jetson | "Please provide a GStreamer pipeline that performs preprocessing before primary inference with IOU tracker on 2 mp4 streams and displays the output on Jetson" | |
| Local image, 1 source, None, No tracker, Save file, dGPU, Rotate 90° cw | "Please provide a GStreamer pipeline that rotates a single jpg image 90° clockwise before processing and saves it to a file" | |
| Local video, 3 sources, Primary detector, NvDCF, Save MP4, dGPU, Rotate 180° | "Please provide a GStreamer pipeline that rotates 3 mp4 videos 180° before primary inference with NvDCF tracker and saves output to MP4 file" |
Step 3 — Run the Pipeline Generator Script
Execute the backend script with the constructed query and user parameters:
Always pass `--format compact`. Thecompactmode returns only confidence + the top retrieved pipeline (~25 lines), instead of dumping all 10 retrievals as ~150 lines of JSON in the chat. Thejsonmode (default for backward compat) is only useful when debugging the retriever directly. Asummarymode (single human-readable line) also exists for non-Claude callers.
The script will (zero external dependencies — pure Python stdlib):
- Load the pipeline dataset (270+ verified DeepStream pipelines)
- Extract structural metadata from each pipeline (platform, source type, sink type, inference mode, tracker, stream count)
- Score with BM25 (document-length-normalized) + domain-specific synonym expansion on both queries and documents
- Apply structural boosting — results matching the user's platform/source/sink/inference get boosted, mismatches get penalized
- Return the top-K results as JSON with a
confidencefield (high/medium/low) based on the top score - Claude uses these retrieved examples + the assembly rules below to construct the final pipeline
When confidence is low, rely more heavily on the assembly rules below rather than the retrieved examples.
Step 4 — Validate the Pipeline
Before presenting, run the validation script to catch syntax errors, unknown elements, and linking issues:
Always pass `--format summary`. Summary prints a single status line (e.g.valid · 11 elements · 0 warnings · live-parse skipped (multi-stream)), with errors/warnings indented underneath only if present. The defaultjsonmode emits ~40 lines of structured output and is only useful for programmatic callers.
The validator performs 4 checks:
- Syntax check — unbalanced quotes, empty pipe segments, missing source/sink
- Element check — verifies each element exists via
gst-inspect-1.0 - Property check — validates known properties for DeepStream elements
- Live parse check — uses
gst-launch-1.0itself to construct the pipeline graph (with fakesrc/fakesink substituted), catching linking errors and pad mismatches. Automatically skipped for multi-stream pipelines (those with named pad refs likem.sink_0) since fakesrc cannot negotiate caps through named pads.
If validation fails ("valid": false), fix the errors and re-validate before presenting. Limit validation retries to a maximum of 2 attempts — if the pipeline still fails after 2 fixes, present it as-is (the remaining checks already cover syntax, element, property, and structural correctness). If there are only warnings, present the pipeline but mention the warnings to the user.
Step 5 — Present the Pipeline
5.1 — Output format (THE ONLY ACCEPTED FORM)
Your response must be exactly five blocks, in this order:
- One-line status badge (validation + confidence)
- Single bash code block containing the full
gst-launch-1.0 -e …command with concrete absolute paths, on one line (no\continuations, no shell variables, no shell wrapper) - Breakdown table grouped by stage
- Suggestions bullet list
- (only if pre-flight failed) a
⚠line above the status badge stating which default path is missing
That is the ONLY accepted output shape for this step. The Section 5.3 template in references/output-format.md is the literal template — match it.
5.2 — Pre-flight check (run before composing the response)
Run one Bash ls over the default paths the pipeline will reference (sample video, PGIE config, tracker lib/config). The result tells you whether to mark the badge with ⚠ default path not found: <path> and bump the matching "Use your own …" suggestion to the top.
5.3 / 5.4 — Worked example & forbidden anti-patterns
You MUST `Read references/output-format.md` before composing this response. It contains the literal Section 5.3 template your output must match exactly, and the Section 5.4 gallery of forbidden output shapes (heredoc wrappers, shell-var indirection,\line-continuations, stray "Run it" lines,Write-to-script). Mirror Section 5.3; never emit any Section 5.4 form.
5.5 — Self-check before sending the response
Before you emit your reply, mentally tick each box. If any check fails, rewrite the response.
- [ ] The pipeline is on exactly one line inside a single ```
`bash``` code block. - [ ] The pipeline begins with
gst-launch-1.0 -eand contains only literal absolute paths (e.g./opt/nvidia/deepstream/...) — no$VAR, no${VAR:-default}, nocat >, noEOF, no\line continuations. - [ ] The response does not contain any of:
cat > /tmp/pipeline.sh,bash /tmp/pipeline.sh,<<'EOF',${VAR:-. - [ ] The response does not call the
Writetool. (Save-to-file is offered as a suggestion bullet, not an action.) - [ ] The breakdown table is grouped by stage (Source / Mux / Inference / Tracking / Composition / Render — adapt names to the pipeline's actual stages, e.g. add an
Encode/Muxrow for file sinks). - [ ] The "Save it to a script?" line appears in the Suggestions list — never as a primary action.
5.6 — Pre-flight failure variant
If the Section 5.2 ls reported one or more missing default paths, prepend a ⚠ line above the status badge and bump the matching "Use your own …" suggestion to the top:
gst-launch-1.0 -e filesrc location=/opt/nvidia/deepstream/deepstream/samples/streams/sample_1080p_h264.mp4 ! …
This is the start of the file. Read the full SKILL.md on GitHub.
Security
- Security scanPassed, 95 of 100Pattern checks on the skill's files.
- Model reviewPassed
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingskills/deepstream-generate-pipeline/SKILL.md
Popularity
- Repository stars
- 246
- Repository forks
- 49
- 7-day trend score
- 28
Stars and forks are for the whole GitHub repository, not this skill alone. Not refreshed yet.
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/nvidia/deepstream/deepstream-generate-pipeline)