Skip to content

Write output frame by frame and check the output is writable up front - #71

Merged
joeljose merged 1 commit into
mainfrom
fix/68-save-video-copy
Sep 28, 2026
Merged

joeljose merged 1 commit into
mainfrom
fix/68-save-video-copy

Conversation

@joeljose

Copy link
Copy Markdown
Owner

Closes #68

  • save_video converts and writes one BGR frame at a time instead of building an (N, H, W, 3) copy first. That copy was 0.28 GB for face.mp4, plus full-size float temporaries for float input. The written file is byte-identical: I compared MD5s of old and new save_video on random float channels with NaN and out-of-range values.
  • main() exits 1 with Error: output directory is not writable: ... before loading, instead of failing after the whole run.
  • Tests: frame order, rounding, clipping and NaN handling of the per-frame writer; read-only output directory (skipped when running as root). CPU image 110 passed, 3 skipped.
  • CHANGELOG updated.

save_video assembled an (N, H, W, 3) uint8 copy of the whole video (plus
full-size float temporaries for float input) before writing. It now
converts and writes one BGR frame at a time; the file is byte-identical.
main() also rejects a read-only output directory before processing
instead of failing after the whole run.

Closes #68
@joeljose
joeljose merged commit e0b911a into main Sep 28, 2026
2 checks passed
@joeljose
joeljose deleted the fix/68-save-video-copy branch September 28, 2026 08:47
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.

save_video builds a second full copy of the video; output writability is only checked by existence

1 participant