Nodes/Simple Video Effects/Camera Move (Video File)
ComfyUI Node

Camera Move (Video File)

Add a camera pan to an existing video file — audio stays

By scofano·Created 10 months ago·Updated 20 days ago· 0
Camera Move (Video File)
    • output_path
    video_path
    horizontal_directionNone
    vertical_directionNone
    distance_px100
    easeEase_Out
    prefixcamera_move

    Your video render came out static. The model nailed the scene but the camera never moved, and a static shot reads as "AI video" faster than anything else. The Camera Move (Video File) node is the fix: it takes an existing video file and applies a pan or slide - left, right, up, down, or diagonal - across the whole clip, then writes out a new file with the audio preserved.

    This is the file-based cousin of the in-graph Camera Move node in the same pack, and honestly it's the more useful one for most people, because the input is "the video you already rendered." You don't need to reprocess a latent, re-render, or hold frames in VRAM. The node handles all the decode/process/re-encode itself.

    How it works

    The mechanism is straightforward: ffprobe reads duration, FPS and resolution; ffmpeg extracts every frame; the node applies the same translation logic as the image version - shifting the crop window across the frame in X/Y over time, with eased motion and edge clamping so you don't get ugly borders; then it re-encodes at the original FPS as H.264 and copies the original audio stream across with -c:a copy. Output lands in the same folder as the source with an auto-incrementing name.

    Inputs and output

    • video_path - the file to animate
    • horizontal_direction - None, Left, Right, or Random. "Left" pans right-to-left (camera moves left); "Right" is the opposite.
    • vertical_direction - None, Top, Bottom, Random. Combine a horizontal and a vertical direction to get a diagonal pan.
    • distance_px - total travel distance in pixels (default 100). Bigger = more dramatic slide; on a 1080p frame 100px is gentle, 300px+ is a real move.
    • ease - Linear, Ease_In, Ease_Out, Ease_In_Out. Ease_Out (the default) starts fast and settles, which reads as the most natural camera move.
    • prefix - output filename prefix, default camera_move.

    The single output output_path is the path string to the new file.

    Direction semantics trip people up once: selecting Left does not mean "move the footage left" so much as "the camera travels left across the scene," which means content appears to move right. If it looks backwards, flip the direction. With Random selected the node picks a direction per execution and forces a fresh roll each run so ComfyUI's cache doesn't skip it.

    Installing it

    It's one of ~25 nodes in the Simple Video Effects pack:

    cd ComfyUI/custom_nodes
    git clone https://github.com/scofano/ComfyUI-Simple-video-effects
    cd ComfyUI-Simple-video-effects
    pip install -r requirements.txt
    

    Restart ComfyUI, or use ComfyUI Manager and search "Simple Video Effects". No model downloads.

    Common issues

    Same pack-wide gotcha: ffmpeg and ffprobe must be on your system PATH - the node raises a "not found on PATH" error otherwise, and pip install ffmpeg-python won't help you. Install the real ffmpeg binaries.

    Beyond that, keep distance_px in proportion to your resolution, because a large distance on a small canvas crops a lot of the frame. And know that this is a re-encode: every run loses a little quality compared to the source, so don't chain this node ten times - do your pans in one pass, then branch the result.

    CategorySimple Video Effects/Video Processing

    Inputs (6)

    NameTypeDefaultDescription
    video_pathSTRING
    horizontal_directionCOMBONone4 options: None, Left, Right, Random
    vertical_directionCOMBONone4 options: None, Top, Bottom, Random
    distance_pxFLOAT100
    easeCOMBOEase_Out4 options: Linear, Ease_In, Ease_Out, Ease_In_Out
    prefixSTRINGcamera_move

    Outputs (1)

    NameTypeDescription
    output_pathSTRING