Import a playblast as a previz version (#159) #169
No reviewers
Labels
No labels
bug
duplicate
enhancement
help wanted
invalid
needs-info
needs-triage
question
ready-for-agent
ready-for-human
wayfinder:grilling
wayfinder:map
wayfinder:prototype
wayfinder:research
wayfinder:task
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
crowmaki/ai-studio!169
Loading…
Reference in a new issue
No description provided.
Delete branch "issue-159-import-playblast"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Closes #159. Part of #139.
What changed
previz_version: an append-only record per Shot. It holds the number, content hash, path, duration, frame count, pixel size, arrival (imported/picked_up) and time. An update trigger guards it like Reference versions.missing_atmarks a file that went missing outside the app, as on a Rendition.shot_idhas no foreign key, because undo can bring a deleted Shot back, the same as keyframe jobs.ingest_playblast;import_playblastis the public entry). It copies the file intoplayblasts/<blake3>.<ext>in the media folder and hashes it in the same pass. It then probes the copy with ffmpeg (framecrcover a stream copy, which gives an exact frame count, duration and size without decoding). It refuses anything outside 2–15 s with a clear message and keeps nothing. It adds the version as one undoable edit ("Import playblast"). The pickup ticket can call it withPickedUp.previzreadscurrentormismatchedagainst its frame count and effective aspect ratio as the Shot is now, so changing the ratio or splitting the Shot updates the dot. Unmarking keeps the versions, and marking again brings them back. A split leaves them on the first part, which keeps the Shot's id.shot_previzandimport_playblastcommands, andstudio:previz/<id>, which streams with Range support and sharesserve_videowith Renditions.ShotPreviz.sveltesits in a complex Shot's panel. It has "Import playblast…", a player for the current playblast and the version list (newest first, with times and Current / Missing / Mismatched badges). The dot from #158 now shows real statuses.Tests
crates/studio-core/tests/previz.rshas 16 new integration tests. Their playblasts come from the bundled ffmpeg. They cover:cargo test -p studio-core --features test-support,cargo test -p ai-studio,bun run testandbun run check.Notes
missing_at, so a playblast deleted outside the app keeps counting for the dot until Storage opens. The previz section and the player check the disk and see it at once. Renditions behave the same way.cargo test --workspacedoesn't buildscene_castwithout--features test-support, and that was already so on main.