From d1c57b46fb42c6e836b2ec3381c0e83c3580f41f Mon Sep 17 00:00:00 2001 From: Bowen Xue Date: Tue, 3 Nov 2026 17:01:36 +0000 Subject: [PATCH 01/26] Convert timed lines and cuts in a description to H3 timed prompt notation --- freevideo_engine/prompt_vlm/rules.py | 23 +++++- freevideo_engine/prompt_vlm/worker.py | 19 +++-- freevideo_engine/timed_prompt.py | 115 ++++++++++++++++++++++++++ scripts/test_freevideo_entry.mjs | 1 + web/editor.js | 15 +++- web/editor_genbar.js | 2 +- web/freevideo.js | 8 +- web/health.js | 2 +- web/studio.js | 10 ++- web/timed_prompt.js | 115 ++++++++++++++++++++++++++ web/tutorial/timed-lines-1.webp | Bin 0 -> 7678 bytes web/tutorial/timed-lines-2.webp | Bin 0 -> 8714 bytes web/tutorial_book_content.js | 23 ++++++ 13 files changed, 316 insertions(+), 17 deletions(-) create mode 100644 freevideo_engine/timed_prompt.py create mode 100644 web/timed_prompt.js create mode 100644 web/tutorial/timed-lines-1.webp create mode 100644 web/tutorial/timed-lines-2.webp diff --git a/freevideo_engine/prompt_vlm/rules.py b/freevideo_engine/prompt_vlm/rules.py index bb1e8eaf..569d4e5b 100644 --- a/freevideo_engine/prompt_vlm/rules.py +++ b/freevideo_engine/prompt_vlm/rules.py @@ -93,6 +93,9 @@ def instruction(value): The young woman (S1) says softly: [Chinese] 再见了。 The man (S2) replies: [English] Wait. Dialogue belongs only in the first section, not in the sound sections. """ + if TIMED_MARK.search(value['text']): + rule += ('The scene has fixed times. Keep every "At MM:SS.mmm" sentence and every [Shot n] At MM:SS.mmm cut ' + 'exactly as given, in the same order and at the same time; add the picture, camera and sound around them.\n') if value['mode'] == 'ref2va': rule += """subject_definitions: Name each visible subject literally , , etc., with its appearance and source or