Skip to content

fix(video-agent-kit): gate subtitle codecs by render mode - #121

Draft
Ricardo-M-L wants to merge 1 commit into
zai-org:mainfrom
Ricardo-M-L:fix/video-soft-subtitle-capabilities
Draft

Ricardo-M-L wants to merge 1 commit into
zai-org:mainfrom
Ricardo-M-L:fix/video-soft-subtitle-capabilities

Conversation

@Ricardo-M-L

Copy link
Copy Markdown

Plugin type (required)

  • UI Plugin
  • Standard plugin
  • Not applicable

Affected plugin: video-agent-kit.

What

subtitle_render(mode="soft") copies the existing video/audio streams and encodes only a mov_text subtitle track, but its unconditional preflight requires libx264, aac, and libass's subtitles filter. This rejects otherwise usable FFmpeg builds (including the local Homebrew FFmpeg 8.1 build without libass).

Validate the mode first, then check the capabilities each actual command uses:

  • soft: mov_text encoder, no filters or media encoders.
  • burn: libx264 encoder and ass filter; audio remains stream-copied.
  • both: the union of those requirements.

This does not change the generated FFmpeg commands, authentication, network access, or existing output-file side effects. Both manifests and the marketplace entry advance from 0.4.3 to 0.4.4. No new dependencies or third-party code are introduced.

Verified

  • Four focused Python tests pass, including actual FFmpeg muxing with the installed build and with a simulated minimal capability listing. Video and audio packet SHA-256 sequences are unchanged; extracting the output subtitle track confirms the expected text and 0–800 ms timing.
  • The same tests against the original source fail with seven failures (including parametrized mode cases).
  • python3 scripts/validate.py: all 51 plugins pass.
  • The existing build_zip implementation successfully builds the changed video-agent-kit archive.
  • pnpm install --frozen-lockfile and git diff --check pass.

Why this is a draft

The repository-wide packaging gate is not complete, so this PR is not requesting review:

  • pnpm build requires the entire UI-plugin catalog. After installing the pinned Rust 1.95.0 WASM target and checksum-verifying Trunk 0.21.14, Excalidraw and PhotoCraft built/staged successfully. VectorCraft passed its check build, but its optimized WASM build was stopped before completion to bound disk consumption. Remaining UI builds were not completed.
  • A real python3 scripts/build_dist.py run fails with UnsafeTree: vectorcraft: incomplete build; run pnpm build first. The targeted ZIP is not a substitute for this full gate.
  • The full Python discovery run reports 142 tests, 23 skips, and one existing import error: tests/test_parallel_publish.py imports scripts/publish_incremental.py, which is absent on the base commit. This is not reported as a passing suite.
  • Installation and execution through the real ZCode host were not verified; the actual public tool function and FFmpeg output were exercised locally.
  • This existing official plugin has only a Chinese README.md and no README_CN.md on the base. Its existing README was updated; a repository-wide documentation migration is not included.

Self-check

  • Existing plugin ownership, name, category, and non-UI type preserved.
  • Versions synchronized in both manifests and marketplace.json.
  • Both English and Chinese README files present and synchronized (existing layout limitation above).
  • No secrets, private endpoints, machine-specific paths, or new dependencies in the diff.
  • Full build_dist.py gate and real ZCode host verification complete.

AI-assisted implementation and tests, independently reviewed with a separate rerun of the focused real-FFmpeg tests. Remaining gates are deliberately left visible before requesting maintainer review.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant