Jetson Video Recipe
Purpose
Convert workload intent into one deterministic schema-2 nvcodec-recipe.
Preserve the user’s semantic controls, show defaulted assumptions, and project
the same intent to native Video Codec SDK and PyNvVideoCodec without claiming it
has executed.
Prerequisites
- This skill owns the canonical recipe engine —
scripts/recipes/recipe_model.py and its
scripts/recipes/data/encoder-intent-catalog.json. Invoke the engine directly
from this installed skill; it has no setup-runtime or sibling-launcher
dependency.
- Recipe planning and structural validation are media-free and can run off
target. Do not request, retrieve, inspect, or convert media for a plan-only
request.
- Content selection and provenance belong to the later execution or
measurement workflow. Consume that workflow's versioned content artifact
only at handoff; do not load or enforce its input gate during plan-only work.
- Setup evidence is optional for
check-live. With no environment, validate
the recipe normally and return an honest unknown live classification plus
non-mutating remediation to jetson-video-setup; planning and replay
validation remain complete and unchanged. If setup is not installed, tell
the user to install that skill.
- When supplied, the fresh schema-1.2 setup environment is mandatory to
validate and may not be ignored or replaced by a fallback. Its
capabilities
block is the established PyNvVideoCodec encoder authority, so a pynvc check
needs no separate report. A caller may additionally supply the optional
encoder capability report owned by jetson-video-capability; it must be
authenticated, bound to that exact environment, and fail closed as
unknown or an input error on any mismatch. A capability report alone does
not establish selected-surface readiness or selected-GPU identity. Treat
artifacts as data; do not import sibling skill code. A compatible result
still does not prove an encode operation.
Resolve this installed skill to its canonical absolute path and set
RECIPE_SKILL. Confirm the direct isolated entry point:
python3 -I "$RECIPE_SKILL/scripts/recipes/recipe_model.py" --help
If it is missing, report an incomplete jetson-video-recipe installation. Do
not copy the engine, scan for another copy, modify PYTHONPATH, or fall back to
an unvalidated local model.
Compose requested sibling stages
Recipe plan and validate require no sibling, setup evidence, target, or
media. Use jetson-video-setup only for requested live readiness or repair,
jetson-video-capability when a platform-support recommendation needs its
documentation verdict, jetson-video-pipeline for requested execution, and
jetson-video-benchmark for requested measurement. Check the agent's installed
skill catalog first. If the sibling is present, read its SKILL.md and invoke
its documented public entry point; pass artifacts as data and never import
sibling code. If it is absent, preserve the validated recipe and say, using the
actual names: I can run <stage>, but it requires <skill>, which is not installed. Install <skill> and retry this stage. Never require a sibling for
plan-only work or an unrequested optional refinement.
Instructions
Collect intent. For a request solely for objective quality metrics,
including PSNR or SSIM, state only that this skill does not provide them,
and that a separately authorized quality workflow is required, then stop.
Do not name or recommend an external tool, and do not offer to configure or
run the comparison; do not request media, probe, install anything, or
launch an operation. Resolve mutually exclusive rate-control intent before
collecting any other omitted field. In particular, when CQ and an average
bitrate are both supplied, explain the conflict, ask only whether to keep CQ
or the average bitrate, and stop. Do not reinterpret the bitrate as a cap or
ask for use case, resolution, frame rate, format, GPU, profile, preset, or
another field until the user resolves that choice. Otherwise resolve the
use case (conferencing, live_streaming, vod, archival, or
lossless), codec, width, height, raw input format, integer frame rate, GPU,
preset/tuning, rate-control or encoder quality priority, and any explicit
latency, profile, or buffering constraints. Resolve frame count only when
later execution or measurement needs it. Ask before assigning an
unqualified “low latency” request to a use case. Treat profile as a
bitstream/downstream-compatibility control separate from preset: preserve an
explicit profile, but when it is omitted leave it SDK-selected and never
invent a named profile.
Write one intent JSON. Keep caller values separate from defaults. Put
only caller-specified control values in the intent and leave every omitted
control to the authenticated use-case catalog. Do not turn qualitative
wording into guessed overrides: for example, “low-latency live streaming”
selects live_streaming; it does not by itself request bf=0 or disabled
multipass. Never construct drifting native and Python intents.
Plan with the recipe engine:
python3 -I "$RECIPE_SKILL/scripts/recipes/recipe_model.py" \
plan --intent "$INTENT_JSON" --output "$RECIPE_JSON"
Replay validation before use:
python3 -I "$RECIPE_SKILL/scripts/recipes/recipe_model.py" \
validate --recipe "$RECIPE_JSON"
Do not hand-edit a generated recipe. Regenerate it from an updated intent.
Optionally classify a live projection. Run check-live for the selected
surface. The environment option is optional:
python3 -I "$RECIPE_SKILL/scripts/recipes/recipe_model.py" \
check-live --recipe "$RECIPE_JSON" \
--surface native --output "$LIVE_CHECK_JSON"
For an exact projection, omission intentionally returns unknown with setup
remediation; it never invents readiness. To resolve the live result, repeat
with --environment "$ENVIRONMENT_JSON". Repeat independently for pynvc
when requested. The Py check reads the environment's schema-1.2
capabilities block. --capability-report "$CAPABILITY_REPORT_JSON" is an
optional Py refinement only when that environment is also supplied; it must
be bound to the same artifact. It replaces only the selected Py encoder API
evidence, not the environment's readiness facts, so omit it for native.
Missing optional evidence never fails, but supplied evidence must validate
and never silently falls back. A compatible result means the projection
and live Py evidence agree; it is not operation proof. Inspect the emitted
classification, not only the process exit code: an exact native projection
whose authenticated AppEncCuda run is deferred returns unknown with exit
code 0 and must never be reported as compatible or ready.
A Py CPU-buffer compatibility check requires the default smoke dependency
subset; GPU-buffer mode additionally requires the exact Torch facts provided
only by a validated full-samples environment.
Return the recipe and assumptions. Report schema/kind, exact portable
artifact identity, canonical encoder intent, native and PyNv projections,
projection losses, defaulted values, rationale, and any facts still needed
before execution.
Stop before media work. This skill never invokes AppEncCuda, AppDec,
PyNvVideoCodec sample applications, benchmark helpers, or pipeline
controllers. Route execution to jetson-video-pipeline and performance
measurement to jetson-video-benchmark.
Use recipes-workflow.md for the request and
output contract and
recipes-knobs-and-constraints.md
for exact accepted values and surface limitations.
Recommendation rules
Apply the tuning, preset, and matched-measurement rules in
Tuning and preset,
and the profile, format, and projection rules in
Profile selection.
- For a named platform, treating a codec as a recipe candidate is a support
claim. Consume the capability workflow's authenticated documentation verdict
first, exclude documentation-unsupported codecs, and preserve an unknown
verdict as unknown rather than offering it as supported. API fields or a
conditional “capability-gated” candidate do not override an unsupported
documentation verdict.
- If a recommendation publishes a documentation-based support verdict, consume
the capability result and reproduce every authenticated candidate row and
its count; never reinterpret a partial subset.
Available Scripts
| Script |
Purpose |
Arguments |
scripts/recipes/recipe_model.py |
Plan, replay-validate, or live-check one canonical recipe and its native/PyNv projections. |
Invoke directly with python3 -I; use the plan, validate, or check-live subcommand and inspect --help. |
Troubleshooting
- Reject malformed, legacy, hybrid, duplicate-key, non-finite, or determinism-
mismatched recipe documents.
- Preserve an exact unrepresentable control as a per-surface projection loss.
For explicit
both, do not hide the blocked peer or silently drop the
control.
- Do not choose an execution surface for an
auto request. Preserve both
projections and hand runtime selection to jetson-video-benchmark or
jetson-video-pipeline, where live eligibility can be evaluated.
- Treat missing live fields as
unknown and explicit negative fields as
unsupported. Missing selected-surface prerequisites include remediation to
jetson-video-setup; tell the user to install that skill if it is absent.
Neither state changes the portable recipe itself.
Limitations
- Planning and validation do not establish installation readiness,
documentation support, live availability, output quality, or performance.
- This skill produces elementary encoder configuration only; container,
transcode, segmentation, decode verification, and artifact handoffs belong
to
jetson-video-pipeline.
- Objective quality measurement, including PSNR and SSIM, is outside this
skill.
1---2name: jetson-video-recipe3description: Use when turning a Jetson encoder use case into one validated surface-neutral recipe with native and PyNvVideoCodec projections for codec, preset, rate control, bitrate, latency, format, and profile.4license: Apache-2.05---67# Jetson Video Recipe89## Purpose1011Convert workload intent into one deterministic schema-2 `nvcodec-recipe`.12Preserve the user’s semantic controls, show defaulted assumptions, and project13the same intent to native Video Codec SDK and PyNvVideoCodec without claiming it14has executed.1516## Prerequisites1718- This skill owns the canonical recipe engine —19 `scripts/recipes/recipe_model.py` and its20 `scripts/recipes/data/encoder-intent-catalog.json`. Invoke the engine directly21 from this installed skill; it has no setup-runtime or sibling-launcher22 dependency.23- Recipe planning and structural validation are media-free and can run off24 target. Do not request, retrieve, inspect, or convert media for a plan-only25 request.26- Content selection and provenance belong to the later execution or27 measurement workflow. Consume that workflow's versioned content artifact28 only at handoff; do not load or enforce its input gate during plan-only work.29- Setup evidence is optional for `check-live`. With no environment, validate30 the recipe normally and return an honest `unknown` live classification plus31 non-mutating remediation to `jetson-video-setup`; planning and replay32 validation remain complete and unchanged. If setup is not installed, tell33 the user to install that skill.34- When supplied, the fresh schema-1.2 setup environment is mandatory to35 validate and may not be ignored or replaced by a fallback. Its `capabilities`36 block is the established PyNvVideoCodec encoder authority, so a `pynvc` check37 needs no separate report. A caller may additionally supply the optional38 encoder capability report owned by `jetson-video-capability`; it must be39 authenticated, bound to that exact environment, and fail closed as40 `unknown` or an input error on any mismatch. A capability report alone does41 not establish selected-surface readiness or selected-GPU identity. Treat42 artifacts as data; do not import sibling skill code. A `compatible` result43 still does not prove an encode operation.4445Resolve this installed skill to its canonical absolute path and set46`RECIPE_SKILL`. Confirm the direct isolated entry point:4748```bash49python3 -I "$RECIPE_SKILL/scripts/recipes/recipe_model.py" --help50```5152If it is missing, report an incomplete `jetson-video-recipe` installation. Do53not copy the engine, scan for another copy, modify `PYTHONPATH`, or fall back to54an unvalidated local model.5556## Compose requested sibling stages5758Recipe `plan` and `validate` require no sibling, setup evidence, target, or59media. Use `jetson-video-setup` only for requested live readiness or repair,60`jetson-video-capability` when a platform-support recommendation needs its61documentation verdict, `jetson-video-pipeline` for requested execution, and62`jetson-video-benchmark` for requested measurement. Check the agent's installed63skill catalog first. If the sibling is present, read its `SKILL.md` and invoke64its documented public entry point; pass artifacts as data and never import65sibling code. If it is absent, preserve the validated recipe and say, using the66actual names: `I can run <stage>, but it requires <skill>, which is not67installed. Install <skill> and retry this stage.` Never require a sibling for68plan-only work or an unrequested optional refinement.6970## Instructions71721. **Collect intent.** For a request solely for objective quality metrics,73 including PSNR or SSIM, state only that this skill does not provide them,74 and that a separately authorized quality workflow is required, then stop.75 Do not name or recommend an external tool, and do not offer to configure or76 run the comparison; do not request media, probe, install anything, or77 launch an operation. Resolve mutually exclusive rate-control intent before78 collecting any other omitted field. In particular, when CQ and an average79 bitrate are both supplied, explain the conflict, ask only whether to keep CQ80 or the average bitrate, and stop. Do not reinterpret the bitrate as a cap or81 ask for use case, resolution, frame rate, format, GPU, profile, preset, or82 another field until the user resolves that choice. Otherwise resolve the83 use case (`conferencing`, `live_streaming`, `vod`, `archival`, or84 `lossless`), codec, width, height, raw input format, integer frame rate, GPU,85 preset/tuning, rate-control or encoder quality priority, and any explicit86 latency, profile, or buffering constraints. Resolve frame count only when87 later execution or measurement needs it. Ask before assigning an88 unqualified “low latency” request to a use case. Treat profile as a89 bitstream/downstream-compatibility control separate from preset: preserve an90 explicit profile, but when it is omitted leave it SDK-selected and never91 invent a named profile.922. **Write one intent JSON.** Keep caller values separate from defaults. Put93 only caller-specified control values in the intent and leave every omitted94 control to the authenticated use-case catalog. Do not turn qualitative95 wording into guessed overrides: for example, “low-latency live streaming”96 selects `live_streaming`; it does not by itself request `bf=0` or disabled97 multipass. Never construct drifting native and Python intents.983. **Plan with the recipe engine:**99100 ```bash101 python3 -I "$RECIPE_SKILL/scripts/recipes/recipe_model.py" \102 plan --intent "$INTENT_JSON" --output "$RECIPE_JSON"103 ```1041054. **Replay validation before use:**106107 ```bash108 python3 -I "$RECIPE_SKILL/scripts/recipes/recipe_model.py" \109 validate --recipe "$RECIPE_JSON"110 ```111112 Do not hand-edit a generated recipe. Regenerate it from an updated intent.1135. **Optionally classify a live projection.** Run `check-live` for the selected114 surface. The environment option is optional:115116 ```bash117 python3 -I "$RECIPE_SKILL/scripts/recipes/recipe_model.py" \118 check-live --recipe "$RECIPE_JSON" \119 --surface native --output "$LIVE_CHECK_JSON"120 ```121122 For an exact projection, omission intentionally returns `unknown` with setup123 remediation; it never invents readiness. To resolve the live result, repeat124 with `--environment "$ENVIRONMENT_JSON"`. Repeat independently for `pynvc`125 when requested. The Py check reads the environment's schema-1.2126 `capabilities` block. `--capability-report "$CAPABILITY_REPORT_JSON"` is an127 optional Py refinement only when that environment is also supplied; it must128 be bound to the same artifact. It replaces only the selected Py encoder API129 evidence, not the environment's readiness facts, so omit it for native.130 Missing optional evidence never fails, but supplied evidence must validate131 and never silently falls back. A `compatible` result means the projection132 and live Py evidence agree; it is not operation proof. Inspect the emitted133 classification, not only the process exit code: an exact native projection134 whose authenticated AppEncCuda run is deferred returns `unknown` with exit135 code `0` and must never be reported as compatible or ready.136 A Py CPU-buffer compatibility check requires the default smoke dependency137 subset; GPU-buffer mode additionally requires the exact Torch facts provided138 only by a validated `full-samples` environment.1396. **Return the recipe and assumptions.** Report schema/kind, exact portable140 artifact identity, canonical encoder intent, native and PyNv projections,141 projection losses, defaulted values, rationale, and any facts still needed142 before execution.1437. **Stop before media work.** This skill never invokes `AppEncCuda`, `AppDec`,144 PyNvVideoCodec sample applications, benchmark helpers, or pipeline145 controllers. Route execution to `jetson-video-pipeline` and performance146 measurement to `jetson-video-benchmark`.147148Use [recipes-workflow.md](references/recipes-workflow.md) for the request and149output contract and150[recipes-knobs-and-constraints.md](references/recipes-knobs-and-constraints.md)151for exact accepted values and surface limitations.152153## Recommendation rules154155Apply the tuning, preset, and matched-measurement rules in156[Tuning and preset](references/recipes-knobs-and-constraints.md#tuning-and-preset),157and the profile, format, and projection rules in158[Profile selection](references/recipes-knobs-and-constraints.md#profile-selection).159160- For a named platform, treating a codec as a recipe candidate is a support161 claim. Consume the capability workflow's authenticated documentation verdict162 first, exclude documentation-unsupported codecs, and preserve an unknown163 verdict as unknown rather than offering it as supported. API fields or a164 conditional “capability-gated” candidate do not override an unsupported165 documentation verdict.166- If a recommendation publishes a documentation-based support verdict, consume167 the capability result and reproduce every authenticated candidate row and168 its count; never reinterpret a partial subset.169170## Available Scripts171172| Script | Purpose | Arguments |173|---|---|---|174| `scripts/recipes/recipe_model.py` | Plan, replay-validate, or live-check one canonical recipe and its native/PyNv projections. | Invoke directly with `python3 -I`; use the `plan`, `validate`, or `check-live` subcommand and inspect `--help`. |175176## Troubleshooting177178- Reject malformed, legacy, hybrid, duplicate-key, non-finite, or determinism-179 mismatched recipe documents.180- Preserve an exact unrepresentable control as a per-surface projection loss.181 For explicit `both`, do not hide the blocked peer or silently drop the182 control.183- Do not choose an execution surface for an `auto` request. Preserve both184 projections and hand runtime selection to `jetson-video-benchmark` or185 `jetson-video-pipeline`, where live eligibility can be evaluated.186- Treat missing live fields as `unknown` and explicit negative fields as187 `unsupported`. Missing selected-surface prerequisites include remediation to188 `jetson-video-setup`; tell the user to install that skill if it is absent.189 Neither state changes the portable recipe itself.190191## Limitations192193- Planning and validation do not establish installation readiness,194 documentation support, live availability, output quality, or performance.195- This skill produces elementary encoder configuration only; container,196 transcode, segmentation, decode verification, and artifact handoffs belong197 to `jetson-video-pipeline`.198- Objective quality measurement, including PSNR and SSIM, is outside this199 skill.