Nodes/Dream Video Batches/↻ Linear Camera Roll
ComfyUI Node

↻ Linear Camera Roll

Spinning the Camera on a Static Batch of Frames

By alt-key-projectΒ·Created 3 years agoΒ·Updated 8 months agoΒ· 95
↻ Linear Camera Roll
  • frames
  • frames
β—„output_width512β–Ί
β—„output_height512β–Ί
β—„degrees45.00β–Ί

Linear Camera Roll [DVB] rolls the camera around the z-axis - the lens axis, the one that spins the horizon instead of tilting it. It's the least used of the three linear moves, and honestly the easiest to overdo. Used small, it reads as a subtle Dutch-angle drift that makes a flat clip feel alive; cranked up, it's a full spin. Either way, it's pure crop math: no model involved, nothing re-rendered.

The mechanism is dead simple and that's the charm. Across the frame set, each frame gets rotated by degrees scaled by its position in the sequence - so a degrees of 45 means the first frame is unrotated and the last is rotated a full 45Β°, with steady linear progress between. Then a centered window of output_width Γ— output_height is cropped out of the rotated frame. Because rotation leaves empty corners, that crop has to be smaller than the input or you're asking for pixels that don't exist.

The inputs that matter

  • frames - the FRAME_SET in.
  • output_width / output_height (both default 512) - the crop window size, and the final output size. Keep them comfortably under the input dimensions.
  • degrees (default 45) - the total rotation across the whole set, in degrees. A fraction of a degree per frame at typical clip lengths; degrees is the cumulative total, not the per-frame step.

Output is a single frames output - a FRAME_SET of the smaller, rotated-and-cropped frames.

Installing

Part of Dream Video Batches, the utility pack by Alt Key Project / Dream Project built to support AnimateDiff Evolved, VideoHelperSuite, Frame Interpolation and Stable Video Diffusion:

cd ComfyUI/custom_nodes
git clone https://github.com/alt-key-project/comfyui-dream-video-batches.git
cd comfyui-dream-video-batches
pip install -r requirements.txt

Or find "Dream Video Batches" in ComfyUI Manager and install there. Restart afterward. No model files - this is pure image math.

Where people get burned

The rotation-crop combo is where the traps live. Keep output_width/output_height smaller than the input - a rotated frame's usable center shrinks, and a crop close to the input size will run off the rotated canvas and show black. If you want a full 360Β° roll over a long clip, do it as several passes rather than one huge degrees value; the crop has to stay valid for every frame. And one thing that surprises people: this is linear, so it's a constant-speed spin, which can look mechanical. If you wanted a handheld wobble or a sway that eases at the ends, the Sine Camera Roll [DVB] version is the one with the pendulum in it. As with everything in this pack, a FRAME_SET output won't plug into stock output nodes - unwrap it before it reaches Save Video.

Category🎭 DVB/πŸŽ₯ camera

Inputs (4)

NameTypeDefaultDescription
framesFRAME_SETβ€”
output_widthINT512β€”
output_heightINT512β€”
degreesFLOAT45.00β€”

Outputs (1)

NameTypeDescription
framesFRAME_SETβ€”