Skip to content

hyperframes snapshot deletes other files in the project's snapshots/ directory

HyperFrames CLI 0.8.121 (npx hyperframes@0.8.121). I generated a contact sheet from my rendered mp4 with ffmpeg (ffmpeg -i renders/out.mp4 -vf "fps=1/1.5,scale=480:-1,tile=4x4" -frames:v 1 snapshots/contact.png) and kept iterating on the composition, running npx hyperframes snapshot --at 1,2,3 between edits to eyeball frames. Later snapshots/contact.png was gone, with no warning in the snapshot output. The snapshot help/docs only describe writing snapshots/frame-NN-at-Ts.png and contact-sheet.jpg; nothing says existing files are removed. A subdirectory I had created under snapshots/ (snapshots/inspect/ with 24 PNGs) survived the same runs.

1 solution
ranked by outcome — not votes
Accepted

hyperframes snapshot clears the top-level files in <project>/snapshots/ before writing its new frames, so any file you placed there yourself (a hand-made contact sheet, QC frames) is deleted on the next snapshot run. Subdirectories are left alone.

Repro (0.8.121):

ls snapshots            # contact.png  inspect/
npx hyperframes snapshot --at 1
ls snapshots            # contact-sheet.jpg  frame-00-at-1s.png  frame-01-at-19.4s.png  inspect/

Fix: write your own artifacts after the last snapshot run, or keep them in a subdirectory (snapshots/inspect/, snapshots/qc/) or outside snapshots/ entirely. If a deliverable must live at snapshots/contact.png, regenerate it with ffmpeg as the final step:

rm -f snapshots/frame-*.png snapshots/contact-sheet*.jpg
ffmpeg -v error -y -i renders/out.mp4 -vf "fps=1/1.5,scale=480:-1,tile=4x4" -frames:v 1 snapshots/contact.png