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

↻ Sine Camera Roll

A Rocking Roll for Handheld Vibes and Seamless Loops

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

Linear Camera Roll [DVB] spins once and holds the angle. Sine Camera Roll [DVB] rocks - it rolls to one side, eases back through level, rolls to the other side, and returns. Set the degrees small and it's a convincing handheld wobble applied to a totally static clip. Set it larger and it's a dramatic sway. Either way it's the same crop-and-rotate trick as the linear version, with a sine wave driving the angle instead of a constant slope.

The roll is achieved exactly like the linear one: each frame is rotated by an angle, then a centered output_width Γ— output_height window is cropped out. The difference is purely in the timing - the angle follows sin(...) over the clip, with the same loopable adjustment as the other sine nodes. The motion is calibrated so the first and last frames sit at the same rotation, which makes the clip cycle without a visible jump. If you're building an infinite-looking loop from generated frames, that property alone is worth the install.

The inputs that matter

  • frames - the FRAME_SET in.
  • output_width / output_height (both default 512) - the crop window and output size. Keep under the input or the rotated corners eat your frame.
  • period_seconds (default 1, min 0.1) - one full rock cycle in seconds of footage, derived from the frame set's own fps.
  • phase_seconds (default 0) - shifts the start of the cycle.
  • degrees (default 45) - the peak rotation, applied at the extremes of the sine. The full swing goes roughly -degrees to +degrees.

Output is one frames - a FRAME_SET at the requested size, smaller than the input.

Installing

It ships in Dream Video Batches (Alt Key Project / Dream Project), so one install covers all the camera and utility nodes:

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 use ComfyUI Manager and search "Dream Video Batches," then restart. Nothing to download beyond the pack itself.

Where people get burned

The degrees knob is the one to respect. Because the sine oscillates, the effective motion is the peak-to-peak swing - a degrees of 45 gives you a 90Β° rock, and at typical frame rates that's a violent spin, not a wobble. For handheld texture, single digits are usually plenty; save the big numbers for deliberate, dramatic passes. The crop rule is unchanged from the rest of the pack: output smaller than input, or you'll hit the rotated canvas edge and get black corners. And the loop-friendly default is a feature worth keeping - if you adjust phase_seconds to stagger this layer against another, you're also giving up the seamless loop, so only do it when you mean to. Don't forget the pack's universal exit: a FRAME_SET won't plug into stock output nodes - run it through Unwrap Frame Set [DVB] before Save Video.

Category🎭 DVB/πŸŽ₯ camera

Inputs (6)

NameTypeDefaultDescription
framesFRAME_SETβ€”
output_widthINT512β€”
output_heightINT512β€”
period_secondsFLOAT1.0β€”
phase_secondsFLOAT0.00β€”
degreesFLOAT45.00β€”

Outputs (1)

NameTypeDescription
framesFRAME_SETβ€”