Skip to content

feat(video): JianYing Pro (剪映) draft project export for NLE post-editing - #622

Open
Alan5168 wants to merge 3 commits into
OpenMontageInc:mainfrom
Alan5168:feat/jianying-draft-export
Open

Alan5168 wants to merge 3 commits into
OpenMontageInc:mainfrom
Alan5168:feat/jianying-draft-export

Conversation

@Alan5168

@Alan5168 Alan5168 commented Sep 3, 2026

Copy link
Copy Markdown
Contributor

Closes #621.

What

Adds native export integration from OpenMontage into JianYing Pro (剪映专业版), allowing creators to take synthesized video scenes, narration voiceovers, BGM, SFX, and styled SRT subtitles straight into a desktop NLE for final post-production, timing micro-adjustments, and review.

  • tools/video/jianying_draft.py:
    • JianYingDraftExport: standard OpenMontage tool conforming to BaseTool contracts.
    • Assembles timeline elements into a complete JianYing draft folder using pyJianYingDraft.
    • Automatically registers the draft into JianYing's root_meta_info.json so the new project appears immediately on JianYing's home screen under Recent Projects.
    • Discovers default Windows JianYing installation and drafts paths with JIANYING_DRAFTS_PATH and JIANYING_EXE environment variable overrides.
    • Provides a CLI interface for standalone / scripted generation.
    • Clean error handling with helpful diagnostic messages when pyJianYingDraft is not installed.

Tests

Added full unit test suite in tests/tools/test_jianying_draft.py (6 tests, all passing):

  • test_tool_metadata: validates tool tier, capability, stability, and input schema.
  • test_get_default_jianying_drafts_path_from_env: tests path resolution override via env.
  • test_get_default_jianying_exe_from_env: tests exe discovery override via env.
  • test_register_draft_in_root_meta: verifies root_meta_info.json creation, data structures, and multi-project sequencing.
  • test_build_jianying_draft_and_execute: validates end-to-end draft build with media clips and root meta registration.
  • test_execute_with_manifest_file: verifies project creation via manifest file.

…ting

Provide native export integration from OpenMontage into JianYing Pro
(?????), enabling creators to seamlessly transition from AI synthesis
into desktop NLE editing, micro-timing adjustment, and final review.

- Add JianYingDraftExport tool in tools/video/jianying_draft.py:
  - Assembles timeline elements (video/image clips, transitions, narration voiceover,
    BGM with volume control, SFX, and styled SRT subtitles) via pyJianYingDraft.
  - Automatically registers drafts into root_meta_info.json so projects appear
    instantly in JianYing's Recent Projects on launch.
  - Resolves default JianYing drafts directory on Windows with env override
    (JIANYING_DRAFTS_PATH).
  - Standalone CLI interface for script / batch execution.
- Add comprehensive test suite in tests/tools/test_jianying_draft.py:
  - Tool contract metadata and input schema validation.
  - Environment variable resolution for draft path and executable.
  - root_meta_info.json registration and multi-draft sequencing.
  - End-to-end draft build and manifest file execution.

Closes OpenMontageInc#621
@Alan5168
Alan5168 requested a review from calesthio as a code owner September 3, 2026 18:35

@calesthio calesthio left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for adding a JianYing timeline export. Before this can be approved, please make replacement explicit and safe: build_jianying_draft unconditionally calls create_draft(..., allow_replace=True) in the user's real JianYing drafts folder. Reusing a draft_name can delete/replace an existing manually edited project, including when the requested media are missing (those clips are silently skipped). Default to refusing an existing draft, validate required media before creating it, and offer a deliberate overwrite/backup path with regression coverage. Please also keep the default offline test suite runnable without the optional SDK: 4 tests pass here, but the two integration tests fail because pyJianYingDraft is not installed rather than skipping or using a fixture. I checked the upstream create_draft contract: https://github.com/GuanYixuan/pyJianYingDraft/blob/main/pyJianYingDraft/draft_folder.py . I did not install the SDK or modify a real JianYing library.

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.

feat(video): JianYing Pro (剪映) draft project export for NLE post-editing

2 participants