Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions changes/studio-review-feel.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
**Studio 审片顺手了:意见钉在你停下的地方,放大时时间轴跟着播放头走,"记下"点一次就成,分镜按镜头翻,长段落里点得到具体一镜**
- Why: 用一支 12 分钟的片子在 Studio 里审初版时,时间轴的时间跟不上播放,放大以后播放头跑出画面,"记下"要点两次,分镜按"第 n 页"翻,成片里一点就是 80 多秒的一整段。
- 成片的时间轴:点过某一秒再播放、暂停,意见框跟着落到停下的那一秒(以前还钉在点过的那一秒);时间轴上只留一根播放头的线。放大后播放时,播放头走到边上,时间轴就往后翻一页,自己横着滚过就不再跟,直到再按播放;最大能放到一秒约 100 像素,12 分钟的片子也看得清一镜、一句;横着滚时左边的轨名不动。标记分行放:没把握、请你听、检查发现的、我的意见各占一行,挨得太近的再错开一行,67 个点不再叠成一串。窗口在后台时,播放的时间照样往前走。
- 片子只在人自己点播放、按空格、点镜头或旁白的播放时才放(页面只在处理人自己的那一下点击、按键时开始播放):打开一站、点窗口把它提到前面的那一下、地址里的时间、页面自己的代码,都不会让它出声。选一段播放时,窗口在后台也停在这一段的结尾。离开成片页时片子还在放,也不再报错、不再去改下一页的意见框。(报告里"开站自己带声音放"那次没能复现,上面这些是把能放起来的路都堵上。)
- 意见框:按下"记下"时框不再缩回去,按钮不会从鼠标底下跑开,点一次就记下。框里 ↩ 换行,⌘↩(别处 Ctrl+↩)或按钮记下,这条规矩用字写在框下面(对话那一栏照旧是 ↩ 发送);逐条的意见框、交出去之前的整体意见框和改片对比里的回复框,也都在框下写着"↩ 换行"。用输入法上屏的那一下回车不算。多行的意见在列表里照原样分行。
- 不对着片子的话:意见框"对着"那一行多了"不对着片子",写下的话进整体意见,交出去时标着〔不对着片子〕,列表里没有时间、排在前面。对整片说的话也各占一条,交出去时前面多了〔整片〕这个标签(交出去的格式不变,还是整体意见那一段文字,只是内容里多了标签)。一条意见里哪怕有一行以〔…〕开头,也还是一条,× 删掉的是整条。
- 分镜:agent 按 6 镜一页切开的同一段("开场(1/2)""开场(2/2)")合回一页;页签写镜号和段名("S1–S13 开场"),不再是"第 n 页";← → 一镜一镜走,选中的那一镜亮起来,意见框对着它,小播放器跳到它,走到头进下一段。以前存下的 `board/<n>` 地址,现在按合并以后的段数算,打开的可能是另一段。
- 成片里点得到长段落里的一镜:用剪辑表做的片子,成片的渲染记录里本来记着每一段页面里的镜头;`bin/vh timeline --resolved` 给剪辑表的每一条加上 `inner`(里面的镜头,片子里的秒,切到这一条里面;渲染时用的不是这份剪辑表就不给,并说一声)。成片模块多一行"段落"(英文 Sections)放这些条目,镜头那一行画里面的镜头,点一下意见框写"镜头 S1_3(PROLOGUE 里)"。点不到的照实说一句:成片是按改动以前的剪辑表渲的,或者那一段是先渲好的一整段视频。`inner` 写进了 `tools/schemas/output/timeline.schema.json`。
- 新检查 `tools/desk/test_cut_page.py`:在真的无头 Chrome 里(像 Studio 的窗口那样允许自动播放),用一支 12 分 20 秒、67 个标记点的编造片子(WebM,哪个 Chromium 都放得了),真鼠标、真按键把上面这些走一遍,时间靠跳转和视频自己的事件推进(`tools/ci.sh` 的 console 组;找不到能放这支片子的浏览器时,和别的网页检查一样本机跳过、CI 上算失败);`timeline --resolved` 的那组加了剪辑表条目里镜头的用例。
39 changes: 37 additions & 2 deletions tools/ci.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4186,9 +4186,9 @@ const run = host(JSON.parse(fs.readFileSync(dataFile, "utf8")), false), h = {};
for (const m of ["idea", "outline", "board", "sound", "ship", "assets", "ledger"]) h[m] = draw(run, m);
want((h.idea.match(/class="ccard/g) || []).length === 2 && h.idea.includes("card-A.svg") && h.idea.includes(run("esc(D.ideas.same_topic)")) && /chip you-pick">/.test(h.idea), "idea: two cards with frames, the same-topic line, A picked (REVIEW.md)");
want(h.outline.includes("segbar") && (h.outline.match(/class="segc"/g) || []).length === 3 && h.outline.includes("HyperFrames"), "outline: the bar, three parts, the engine");
want(h.board.includes("第 1 页 · 开场") && (h.board.match(/class="shotc/g) || []).length === 2, "board: page 1, two shots");
want(h.board.includes("开场 · S1–S2") && h.board.includes(">S3–S4 两个鼓包<") && !/第 \d+ 页/.test(h.board) && (h.board.match(/class="shotc/g) || []).length === 2, "board: the first part, two shots, its tabs named by their shots, no pages");
run("SUB = '2'"); const b2 = draw(run, "board"); run("SUB = ''");
want(b2.includes("第 2 页 · 两个鼓包") && b2.includes("shotc unsure") && b2.includes("背面的鼓包会不会看不懂") && b2.includes("鼓包加大一点") && b2.includes("原理段,宁慢勿快") && b2.includes('id="shot-S04"'),
want(b2.includes("两个鼓包 · S3–S4") && b2.includes("shotc unsure") && b2.includes("背面的鼓包会不会看不懂") && b2.includes("鼓包加大一点") && b2.includes("原理段,宁慢勿快") && b2.includes('id="shot-S04"'),
"board: page 2 is the gate ② page's part (S04 unsure, its plan line, the part's note), not shots.json's");
want(h.sound.includes("-14.2") && /<article class="vcard on"[^>]*>\s*<h3><b>Charon<\/b>/.test(h.sound) && (h.sound.match(/<tr\b[\s\S]*?<\/tr>/g) || []).filter((r) => r.includes("chip wait")).length === 1
&& ["0:09.0", "0:21.3"].every((x) => h.sound.includes(x)), "sound: loudness, the voice in use, one fast line flagged, the lifts at their seconds");
Expand Down Expand Up @@ -4470,6 +4470,16 @@ PY
kill "$desk_pid"; wait "$desk_pid" 2>/dev/null
fi
rm -rf "$t"
# the cut page and the note box on a 12-minute made-up film with 67 marked places, in a real headless Chrome that may play
# unasked as Studio's window may (tools/desk/test_cut_page.py builds the films and their desk; real mouse presses and keys)
local rc
a=$(python3 tools/desk/test_cut_page.py 2>&1); rc=$?
case $rc in
0) ok "the cut page in a browser, on a 12-minute film: opening a stop or a click from code plays nothing; a second picked and played on, the note goes where the picture stopped, one line; zoomed in, about 100 px a second, the playhead in sight while it plays and the lanes' names kept; 67 marked places, no pin on another; ↩ a new line, one press of 记下 keeps the note (the button stays put), Ctrl+↩ too, the keys in words; a note not about the film goes marked; the storyboard a tab a part (its sheets joined) named by its shots, ← → shot by shot; an edit list's part shows the shots inside it to point at" ;;
3) skip "the cut page in a browser" "no ffmpeg" ;;
4) no_chrome "the cut page in a browser" ;;
*) bad "the cut page in a browser: $(printf '%s' "$a" | tr '\n' ';' | head -c 1500)" ;;
esac
}
studio_checks() { # bin/vh studio (tools/desk/studio.py, window.py) and its launcher icon, as a person meets them: in a temp
# HOME and TMPDIR (no console or window of this machine's is found or touched), the stand-in window, no screen needed.
Expand Down Expand Up @@ -9167,6 +9177,31 @@ sys.exit(0 if ok else 1)
PY
then ok "timeline --resolved on an edit list: shots, narration, captions and beats in seconds and frames, with each source's sha256; it takes bin/vh edit build's record while that is of this edit.json, the same code in memory with none; it writes nothing"
else bad "timeline --resolved on an edit list (exit $rc, $c): $(printf '%s' "$a" | tail -c 500)"; fi
# the shots inside an edit list's entries, as the film's render kept them (<entry>.<shot>, film seconds): each entry carries its own,
# cut to it; a render of another edit.json gives none, and says so
mkdir -p "$p/out"; printf 'x' > "$p/out/final.mp4"
python3 - "$p" <<'PY'
import hashlib, json, sys
p = sys.argv[1]; sha = hashlib.sha256(open(f"{p}/edit.json", "rb").read()).hexdigest()
shots = [{"id": "S01", "start": 0, "end": 1.0333, "kind": "color"}, {"id": "S01.A", "start": 0, "end": 0.4, "kind": "shot"}, {"id": "S01.B", "start": 0.4, "end": 1.5, "kind": "shot"},
{"id": "S02", "start": 1.0333, "end": 2.5333, "kind": "color"}]
json.dump({"fps": 30, "frames": 91, "edit": {"path": "edit.json", "sha256": sha}, "shots": shots}, open(f"{p}/out/final.mp4.render.json", "w"))
PY
a=$(vh timeline "$p" --resolved --json 2>&1); rc=$?
python3 -c 'import json, sys; f = sys.argv[1]; d = json.load(open(f)); d["edit"]["sha256"] = "0" * 64; json.dump(d, open(f, "w"))' "$p/out/final.mp4.render.json"
b=$(vh timeline "$p" --resolved --json 2>&1); c=$?
rm -f "$p/out/final.mp4" "$p/out/final.mp4.render.json"
if [ "$rc:$c" = 0:0 ] && python3 - "$a" "$b" <<'PY'
import json, sys
a, b = json.loads(sys.argv[1]), json.loads(sys.argv[2])
s = a["shots"]
ok = [x["id"] for x in s] == ["S01", "S02", "S03"] and "inner" not in s[1] and "inner" not in s[2]
ok = ok and [(x["id"], x["start"], x["start_frame"], x["end_frame"]) for x in s[0]["inner"]] == [("S01.A", 0, 0, 12), ("S01.B", 0.4, 12, 31)] and s[0]["inner"][1]["end"] == s[0]["end"]
ok = ok and not any("inner" in x for x in b["shots"]) and any("another edit.json" in m["why"] for m in b["missing"]) and not a["missing"]
sys.exit(0 if ok else 1)
PY
then ok "timeline --resolved on an edit list: each entry carries the shots inside it as its film's render kept them, cut to the entry; a render of another edit.json gives none, said"
else bad "timeline --resolved, the shots inside an edit list's entries (exit $rc, $c): $(printf '%s' "$a" | tail -c 600)"; fi
# a record of another edit.json is not taken; one that does not resolve is said, and the rest is there
python3 -c 'import json, sys; f = sys.argv[1]; d = json.load(open(f)); d["fps"] = 30; d["tracks"][0]["entries"][1]["dur"] = 2; json.dump(d, open(f, "w"))' "$p/edit.json"
a=$(vh timeline "$p" --resolved --json 2>&1 | python3 -c 'import json, sys; d = json.load(sys.stdin); print(d["shots"][1]["end_frame"], d["shots"][0].get("label"))' 2>&1)
Expand Down
Loading
Loading