Files
ausboss-ComfyUI-AusBoss/js/docs/AUSBOSS_NODES_VideoCropRotatePad.md
T
ausboss 7436cf0c12 Fix editor geometry parity, video seek performance, and preview route exposure
Review fixes verified against live ComfyUI 0.28.0:

- rotatedSize now reproduces Pillow's expand=True output exactly (transpose
  fast path at axis angles, corner extents elsewhere). The previous formula
  was 1px short on 34 of 78 sampled size/angle combos, so editor-predicted
  output dimensions disagreed with queued results at most free angles.
  Verified 0 mismatches across 6776 combinations and end-to-end on the
  server (predicted 848x496 == queued image and mask at 77.7 degrees).
- decode_video_frame seeks to the nearest keyframe and decodes forward
  instead of scanning from frame 0, with the sequential scan kept as the
  fallback for files without usable timestamps. Scrubbing long videos no
  longer decodes the entire prefix per preview request.
- Preview routes no longer serve arbitrary local paths to any HTTP client:
  local-path previews outside ComfyUI's input/output/temp folders now
  require AUSBOSS_TRANSFORM_LOCAL_PREVIEW=1, checked before touching the
  filesystem so denied requests cannot probe path existence. Queued
  workflows are unaffected.
- Editor: metadata is cached per source instead of refetched every scrub
  tick, timeline seeks fetch only the frame with a 70ms trailing debounce,
  AbortError from superseded requests no longer paints the error state,
  and switching source mode before picking a file no longer resets the
  transform.
- Tests: 13 -> 18 Python (seek vs sequential ground truth, time-mode seek,
  out-of-range clamp, preview gate), 8 -> 9 JS (Pillow-verified rotated-size
  fixtures including the odd/even transpose edge).
2026-07-24 22:00:27 -05:00

1.3 KiB

Video Crop + Rotate + Pad

Loads one exact video frame and applies the same rotate → crop → pad transform as the image node. It outputs an image and generated-area mask, not a re-encoded video.

Source and frame

  • video: Video inside ComfyUI's input folder. Use Upload video on the node to add one.
  • source_mode: input folder or local path. Local path mode avoids copying large files.
  • local_path: Absolute path used only in local path mode. Queued workflows always read it; the editor's live preview of paths outside ComfyUI's own folders requires starting ComfyUI with AUSBOSS_TRANSFORM_LOCAL_PREVIEW=1.
  • seek_mode: Exact zero-based frame index or time in seconds.
  • frame_index / frame_time: Saved timeline position.

The editor includes first/last, ±1, ±25, ±50, ±100, play/pause, keyboard arrows, and a full-width timeline. Only one frame preview request remains active; stale requests are cancelled.

Transform and outputs

Rotation, crop, padding, feathering, fill, canvas multiple, gestures, image, and mask match the image node. The output batch contains one frame.

Video metadata and preview routes validate extensions and return only the information needed by the editor. The node performs no remote network requests and does not rewrite the source video.